summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2009-08-27 08:36:28 +0200
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2009-08-27 08:36:28 +0200
commit0f279f336e8e0424a11e8222315ec47d07828e4a (patch)
treef816b9648fca43450a94fd77c409a29243e594f6
parent2dae2987a063454e3801bf7b8897829f0abaa542 (diff)
Fixes in the Description.xml editor page
The page was really too large in Eclipse 3.5 due to some bug introduced in this version. The labels have been shortened and the layout of the editor page is fixed.
-rw-r--r--core/source/org/openoffice/ide/eclipse/core/editors/main/AbstractOverviewSection.java2
-rw-r--r--core/source/org/openoffice/ide/eclipse/core/editors/main/GeneralSection.java2
-rw-r--r--core/source/org/openoffice/ide/eclipse/core/editors/main/PackageOverviewFormPage.java57
-rw-r--r--core/source/org/openoffice/ide/eclipse/core/editors/messages.properties8
-rwxr-xr-xcore/source/org/openoffice/ide/eclipse/core/i18n/ImageManager.properties56
5 files changed, 66 insertions, 59 deletions
diff --git a/core/source/org/openoffice/ide/eclipse/core/editors/main/AbstractOverviewSection.java b/core/source/org/openoffice/ide/eclipse/core/editors/main/AbstractOverviewSection.java
index 153f745..95ea862 100644
--- a/core/source/org/openoffice/ide/eclipse/core/editors/main/AbstractOverviewSection.java
+++ b/core/source/org/openoffice/ide/eclipse/core/editors/main/AbstractOverviewSection.java
@@ -1,5 +1,6 @@
package org.openoffice.ide.eclipse.core.editors.main;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.editor.FormPage;
@@ -27,6 +28,7 @@ public abstract class AbstractOverviewSection extends SectionPart {
super(pParent, pPage.getManagedForm().getToolkit(), pStyle);
initialize( pPage.getManagedForm() );
getManagedForm().addPart( this );
+ getSection( ).setLayoutData( new GridData( GridData.FILL_BOTH ) );
}
/**
diff --git a/core/source/org/openoffice/ide/eclipse/core/editors/main/GeneralSection.java b/core/source/org/openoffice/ide/eclipse/core/editors/main/GeneralSection.java
index 75b9271..54ff65a 100644
--- a/core/source/org/openoffice/ide/eclipse/core/editors/main/GeneralSection.java
+++ b/core/source/org/openoffice/ide/eclipse/core/editors/main/GeneralSection.java
@@ -67,7 +67,7 @@ public class GeneralSection extends LocalizedSection {
super( pParent, pPage, Section.TITLE_BAR );
- getSection().setText( Messages.getString("GeneralSection.Title") ); //$NON-NLS-1$
+ getSection( ).setText( Messages.getString("GeneralSection.Title") ); //$NON-NLS-1$
mModel = pPage.getModel();
loadData( );
diff --git a/core/source/org/openoffice/ide/eclipse/core/editors/main/PackageOverviewFormPage.java b/core/source/org/openoffice/ide/eclipse/core/editors/main/PackageOverviewFormPage.java
index e744001..8847526 100644
--- a/core/source/org/openoffice/ide/eclipse/core/editors/main/PackageOverviewFormPage.java
+++ b/core/source/org/openoffice/ide/eclipse/core/editors/main/PackageOverviewFormPage.java
@@ -47,10 +47,11 @@ import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.forms.IManagedForm;
@@ -110,29 +111,35 @@ public class PackageOverviewFormPage extends FormPage {
ScrolledForm form = pManagedForm.getForm();
form.setText( Messages.getString("PackageOverviewFormPage.Title") ); //$NON-NLS-1$
-
- form.getBody().setLayout( new GridLayout( ) );
+ Composite body = form.getBody( );
FormToolkit toolkit = getManagedForm().getToolkit();
toolkit.decorateFormHeading( form.getForm() );
- Label descrLbl = toolkit.createLabel( form.getBody(),
+ Label descrLbl = toolkit.createLabel( body,
Messages.getString("PackageOverviewFormPage.Description"), //$NON-NLS-1$
SWT.WRAP );
- descrLbl.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = 2;
+ descrLbl.setLayoutData( gd );
+
+ body.setLayout( new GridLayout( 2, false ) );
- Composite body = toolkit.createComposite( form.getBody() );
- body.setLayoutData( new GridData( GridData.FILL_BOTH ) );
- body.setLayout( new GridLayout( ) );
+ ArrayList<LocalizedSection> sections = createMainPage( toolkit, body );
// Create the locale selector line
- Composite bottomLine = toolkit.createComposite( form.getBody() );
- bottomLine.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+ Composite bottomLine = toolkit.createComposite( body );
+ gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = 2;
+ bottomLine.setLayoutData( gd );
bottomLine.setLayout( new GridLayout( ) );
- mLocaleSel = new LocaleSelector( toolkit, bottomLine );
+ mLocaleSel = new LocaleSelector( toolkit, bottomLine );
- createMainPage( toolkit, body );
+ // Set the locale listeners
+ for (LocalizedSection section : sections) {
+ mLocaleSel.addListener( section );
+ }
mLocaleSel.loadLocales( mModel.getAllLocales() );
@@ -148,21 +155,19 @@ public class PackageOverviewFormPage extends FormPage {
* @param pToolkit the toolkit used to create the page
* @param pParent the parent composite where to create the page.
*
- * @return the page control
+ * @return the localized sections of the page
*/
- private Control createMainPage( FormToolkit pToolkit, Composite pParent ) {
+ private ArrayList<LocalizedSection> createMainPage( FormToolkit pToolkit, Composite pParent ) {
- Composite body = pToolkit.createComposite( pParent );
- body.setLayoutData( new GridData( GridData.FILL_BOTH ) );
- body.setLayout( new GridLayout( 2, true ) );
+ ArrayList<LocalizedSection> localized = new ArrayList<LocalizedSection>();
- Composite leftColumn = pToolkit.createComposite( body );
- leftColumn.setLayoutData( new GridData( GridData.FILL_BOTH ));
+ Composite leftColumn = pToolkit.createComposite( pParent );
+ leftColumn.setLayoutData( new GridData( GridData.FILL_BOTH ) );
leftColumn.setLayout( new GridLayout( ) );
- Composite rightColumn = pToolkit.createComposite( body );
- rightColumn.setLayoutData( new GridData( GridData.FILL_BOTH ));
+ Composite rightColumn = pToolkit.createComposite( pParent );
+ rightColumn.setLayoutData( new GridData( GridData.FILL_BOTH ) );
rightColumn.setLayout( new GridLayout( ) );
/*
@@ -173,18 +178,18 @@ public class PackageOverviewFormPage extends FormPage {
* + Section "Release notes"
*/
GeneralSection generalSection = new GeneralSection( leftColumn, this );
- mLocaleSel.addListener( generalSection );
+ localized.add( generalSection );
mSections.add( generalSection );
IntegrationSection integrationSection = new IntegrationSection( leftColumn, this );
mSections.add( integrationSection );
PublisherSection publisherSection = new PublisherSection( leftColumn, this );
- mLocaleSel.addListener( publisherSection );
+ localized.add( publisherSection );
mSections.add( publisherSection );
ReleaseNotesSection releaseNotesSection = new ReleaseNotesSection( leftColumn, this );
- mLocaleSel.addListener( releaseNotesSection );
+ localized.add( releaseNotesSection );
mSections.add( releaseNotesSection );
MirrorsSection mirrorSection = new MirrorsSection( rightColumn, this );
@@ -194,13 +199,13 @@ public class PackageOverviewFormPage extends FormPage {
IProject project = input.getFile().getProject();
LicenseSection licenseSection = new LicenseSection( rightColumn, this, project );
mSections.add( licenseSection );
- mLocaleSel.addListener( licenseSection );
+ localized.add( licenseSection );
// Suspend the first dirty notifications in all sections
for ( AbstractOverviewSection section : mSections ) {
section.setNotifyChanges( false );
}
- return body;
+ return localized;
}
/**
diff --git a/core/source/org/openoffice/ide/eclipse/core/editors/messages.properties b/core/source/org/openoffice/ide/eclipse/core/editors/messages.properties
index 88ecb06..1cbcf30 100644
--- a/core/source/org/openoffice/ide/eclipse/core/editors/messages.properties
+++ b/core/source/org/openoffice/ide/eclipse/core/editors/messages.properties
@@ -3,7 +3,7 @@ RegDocumentProvider.RegviewError=Error while reading regview output
PackagePropertiesEditor.DescriptionParseError=Error parsing description.xml file
PackagePropertiesFormPage.PackagePropertiesText=Contents
ContentsSection.Title=Package content
-IntegrationSection.Description=Define the dependencies of the extension: OpenOffice.org version and compatible system.
+IntegrationSection.Description=Define the dependencies of the extension.
IntegrationSection.MaxOOoVersion=Maximum OOo version
IntegrationSection.MinOOoVersion=Minimum OOo version
IntegrationSection.Platforms=Platforms
@@ -26,20 +26,20 @@ GeneralSection.Identifier=Identifier
GeneralSection.Name=Name
GeneralSection.Title=General informations
GeneralSection.Version=Version
-LicenseSection.Description=License files are TXT files. They are localized and have to be selected here. If no file is selected for any locale, then no license will apply.
+LicenseSection.Description=License files are localized TXT files.\nIf no file is selected for any locale, then no license will apply.
LicenseSection.FileChooserTooltip=Choose the folder where to place the license files
LicenseSection.LicenseFile=License file
LicenseSection.SuppressUpdate=Do not ask to accept the license during an update.
LicenseSection.Title=License
LicenseSection.UserAccept=Every user have to accept the license or only the administrator.
MirrorsSection.Add=Add
-MirrorsSection.Description=List the URLs of the update sites to use for this extension. The first one is the primary mirror.
+MirrorsSection.Description=List the URLs of the update sites. The first one is the primary mirror.
MirrorsSection.MirrorTextTitle=Specify a new mirror URL
MirrorsSection.Remove=Remove
PublisherSection.Description=Define the localized informartions on the extension publisher.
PublisherSection.Name=Name
PublisherSection.Title=Provider informations
PublisherSection.Url=Url
-ReleaseNotesSection.Description=Defines the localized release notes web pages for this version.
+ReleaseNotesSection.Description=Defines the localized release notes web pages.
ReleaseNotesSection.Title=Release notes
ReleaseNotesSection.Url=Url
diff --git a/core/source/org/openoffice/ide/eclipse/core/i18n/ImageManager.properties b/core/source/org/openoffice/ide/eclipse/core/i18n/ImageManager.properties
index 2ada490..58691a7 100755
--- a/core/source/org/openoffice/ide/eclipse/core/i18n/ImageManager.properties
+++ b/core/source/org/openoffice/ide/eclipse/core/i18n/ImageManager.properties
@@ -1,29 +1,29 @@
-SDK_DIALOG_IMAGE = /icons/sdk_banner.gif
-OOO_DIALOG_IMAGE = /icons/ooo_banner.gif
-ERROR = /icons/error.gif
-UNO_PROJECT = /icons/uno_prj.gif
-NEWPROJECT_WIZ = /icons/newunoprj_wiz.gif
-NEWFILE_WIZ = /icons/newunofile_wiz.gif
-NEW_SERVICE_IMAGE = /icons/newservice_wiz.gif
-CHECKED = /icons/checked.gif
-UNCHECKED = /icons/unchecked.gif
-SERVICE = /icons/service.gif
-INTERFACE = /icons/interface.gif
-ABOUT_BANNER = /icons/aboutBanner.png
+SDK_DIALOG_IMAGE = /icons/sdk_banner.gif
+OOO_DIALOG_IMAGE = /icons/ooo_banner.gif
+ERROR = /icons/error.gif
+UNO_PROJECT = /icons/uno_prj.gif
+NEWPROJECT_WIZ = /icons/newunoprj_wiz.gif
+NEWFILE_WIZ = /icons/newunofile_wiz.gif
+NEW_SERVICE_IMAGE = /icons/newservice_wiz.gif
+CHECKED = /icons/checked.gif
+UNCHECKED = /icons/unchecked.gif
+SERVICE = /icons/service.gif
+INTERFACE = /icons/interface.gif
+ABOUT_BANNER = /icons/aboutBanner.png
NEW_INTERFACE_IMAGE = /icons/newinterface_wiz.gif
-URE_APP = /icons/ure_app.gif
-ATTRIBUTE = /icons/member.gif
-METHOD = /icons/method.gif
-STRUCT = /icons/struct.gif
-ENUM = /icons/enum.gif
-CONSTANTS = /icons/const.gif
-TYPEDEF = /icons/typedef.gif
-EXCEPTION = /icons/exception.gif
-PRJ_MODIFIER = /icons/prj_modifier.gif
-DB_MODIFIER = /icons/db_modifier.gif
-IDL_MODIFIER = /icons/idl_modifier.gif
-PACKAGE_EXPORT_WIZ = /icons/export_package_banner.gif
-URE_APP_WIZ = /icons/ure_app_wiz.png
-REFRESH = /icons/refresh.gif
-ADD = /icons/add.gif
-DELETE = /icons/delete.gif \ No newline at end of file
+URE_APP = /icons/ure_app.gif
+ATTRIBUTE = /icons/member.gif
+METHOD = /icons/method.gif
+STRUCT = /icons/struct.gif
+ENUM = /icons/enum.gif
+CONSTANTS = /icons/const.gif
+TYPEDEF = /icons/typedef.gif
+EXCEPTION = /icons/exception.gif
+PRJ_MODIFIER = /icons/prj_modifier.gif
+DB_MODIFIER = /icons/db_modifier.gif
+IDL_MODIFIER = /icons/idl_modifier.gif
+PACKAGE_EXPORT_WIZ = /icons/export_package_banner.gif
+URE_APP_WIZ = /icons/ure_app_wiz.png
+REFRESH = /icons/refresh.gif
+ADD = /icons/add.gif
+DELETE = /icons/delete.gif \ No newline at end of file