directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r696443 - /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DeleteDialog.java
Date Wed, 17 Sep 2008 20:54:33 GMT
Author: seelmann
Date: Wed Sep 17 13:54:33 2008
New Revision: 696443

URL: http://svn.apache.org/viewvc?rev=696443&view=rev
Log:
Fix for DIRSTUDIO-367: added dialog setting to remember the choice whether the tree delete
control was activated or not

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DeleteDialog.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DeleteDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DeleteDialog.java?rev=696443&r1=696442&r2=696443&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DeleteDialog.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DeleteDialog.java
Wed Sep 17 13:54:33 2008
@@ -20,6 +20,7 @@
 package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
@@ -38,6 +39,10 @@
 public class DeleteDialog extends MessageDialog
 {
 
+    /** The "Use Tree Delete Control" dialog setting . */
+    private static final String USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY = DeleteDialog.class.getName()
+        + ".useTreeDeleteControl";
+
     private Button useTreeDeleteControlCheckbox;
 
     private boolean askForTreeDeleteControl;
@@ -60,6 +65,12 @@
 
         this.askForTreeDeleteControl = askForTreeDeleteControl;
         this.useTreeDeleteControl = false;
+
+        if ( BrowserCommonActivator.getDefault().getDialogSettings().get( USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY
) == null )
+        {
+            BrowserCommonActivator.getDefault().getDialogSettings().put( USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY,
+                false );
+        }
     }
 
 
@@ -70,6 +81,8 @@
         {
             useTreeDeleteControlCheckbox = new Button( parent, SWT.CHECK );
             useTreeDeleteControlCheckbox.setText( "Use Tree Delete Control" );
+            useTreeDeleteControlCheckbox.setSelection( BrowserCommonActivator.getDefault().getDialogSettings()
+                .getBoolean( USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY ) );
             return useTreeDeleteControlCheckbox;
         }
         else
@@ -85,6 +98,12 @@
         if ( buttonId == OK )
         {
             useTreeDeleteControl = useTreeDeleteControlCheckbox != null && useTreeDeleteControlCheckbox.getSelection();
+
+            if ( useTreeDeleteControlCheckbox != null )
+            {
+                BrowserCommonActivator.getDefault().getDialogSettings().put( USE_TREE_DELETE_CONTROL_DIALOGSETTING_KEY,
+                    useTreeDeleteControlCheckbox.getSelection() );
+            }
         }
         super.buttonPressed( buttonId );
     }



Mime
View raw message