Author: timotei
Date: Sun Jul 10 22:47:02 2011
New Revision: 50261

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50261&view=rev
Log:
eclipse plugin: Add a button for opening the Addon
Upload preferences page from within the Addons view

Modified:
    
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/preferences/AddonUploadPreferencePage.java
    trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/AddonsView.java

Modified: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/preferences/AddonUploadPreferencePage.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/preferences/AddonUploadPreferencePage.java?rev=50261&r1=50260&r2=50261&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/preferences/AddonUploadPreferencePage.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/preferences/AddonUploadPreferencePage.java
 Sun Jul 10 22:47:02 2011
@@ -22,6 +22,8 @@
 
 public class AddonUploadPreferencePage extends AbstractPreferencePage
 {
+    public final static String ID_ADDON_PREFERENCE_PAGE = 
"org.wesnoth.preferences.AddonPage"; //$NON-NLS-1$
+
     /**
      * Holds the ports for each addon server as a (key, value) pair,
      * where:

Modified: trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/AddonsView.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/AddonsView.java?rev=50261&r1=50260&r2=50261&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/AddonsView.java 
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/AddonsView.java Sun 
Jul 10 22:47:02 2011
@@ -39,6 +39,7 @@
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.ui.part.ViewPart;
 import org.wesnoth.preferences.AddonUploadPreferencePage;
 import org.wesnoth.preferences.Preferences;
@@ -125,7 +126,17 @@
             }
         });
         btnRefresh.setText("Refresh");
-        new Label(grpOptions, SWT.NONE);
+
+        Button btnOpenAddonManager = new Button(grpOptions, SWT.NONE);
+        btnOpenAddonManager.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                PreferencesUtil.createPreferenceDialogOn( getViewSite( 
).getShell( ),
+                        AddonUploadPreferencePage.ID_ADDON_PREFERENCE_PAGE,
+                        null, null ).open( );
+            }
+        });
+        btnOpenAddonManager.setText("Open Addon Manager preferences");
 
         cmbAddonServer_.addSelectionListener( new SelectionAdapter( ) {
             @Override


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to