directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1539461 - in /directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common: BrowserCommonConstants.java widgets/browser/BrowserQuickSearchWidget.java
Date Wed, 06 Nov 2013 21:01:42 GMT
Author: seelmann
Date: Wed Nov  6 21:01:42 2013
New Revision: 1539461

URL: http://svn.apache.org/r1539461
Log:
Fix for DIRSTUDIO-955 (Quick search one/subtree scope button is not sticky)

Modified:
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java?rev=1539461&r1=1539460&r2=1539461&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
Wed Nov  6 21:01:42 2013
@@ -86,6 +86,7 @@ public final class BrowserCommonConstant
     public static final String PREFERENCE_BROWSER_CONTAINER_ENTRIES_FIRST = "browserContainerEntriesFirst";
//$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_META_ENTRIES_LAST = "browserMetaEntriesLast";
//$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_SHOW_QUICK_SEARCH = "browserShowQuickSearch";
//$NON-NLS-1$
+    public static final String PREFERENCE_BROWSER_QUICK_SEARCH_SUBTREE_SCOPE = "browserQuickSearchSubtreeScope";
//$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_SHOW_DIT = "browserShowDIT"; //$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_SHOW_SEARCHES = "browserShowSearches";
//$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_SHOW_BOOKMARKS = "browserShowBookmarks";
//$NON-NLS-1$

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java?rev=1539461&r1=1539460&r2=1539461&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
Wed Nov  6 21:01:42 2013
@@ -242,13 +242,18 @@ public class BrowserQuickSearchWidget
         quickSearchScopeButton.setToolTipText( Messages.getString( "BrowserQuickSearchWidget.ScopeOneLevelToolTip"
) ); //$NON-NLS-1$
         quickSearchScopeButton.setImage( BrowserCommonActivator.getDefault().getImage(
             BrowserCommonConstants.IMG_SUBTREE ) );
+        quickSearchScopeButton.setSelection( BrowserCommonActivator.getDefault().getPreferenceStore()
+            .getBoolean( BrowserCommonConstants.PREFERENCE_BROWSER_QUICK_SEARCH_SUBTREE_SCOPE
) );
         quickSearchScopeButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
                 String one = Messages.getString( "BrowserQuickSearchWidget.ScopeOneLevelToolTip"
); //$NON-NLS-1$
                 String sub = Messages.getString( "BrowserQuickSearchWidget.ScopeSubtreeToolTip"
); //$NON-NLS-1$
-                quickSearchScopeButton.setToolTipText( quickSearchScopeButton.getSelection()
? sub : one );
+                boolean selected = quickSearchScopeButton.getSelection();
+                quickSearchScopeButton.setToolTipText( selected ? sub : one );
+                BrowserCommonActivator.getDefault().getPreferenceStore()
+                    .setValue( BrowserCommonConstants.PREFERENCE_BROWSER_QUICK_SEARCH_SUBTREE_SCOPE,
selected );
             }
         } );
 



Mime
View raw message