[brailleblaster] push by francois...@xxxxxxxxx - Re-activated the Setting dialog on 2012-07-31 00:45 GMT

  • From: brailleblaster@xxxxxxxxxxxxxx
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Tue, 31 Jul 2012 00:45:37 +0000

Revision: a7bfd5c80a58
Author:   francois.ouellette01@xxxxxxxxx
Date:     Mon Jul 30 17:40:43 2012
Log:      Re-activated the Setting dialog
http://code.google.com/p/brailleblaster/source/detail?r=a7bfd5c80a58

Modified:
 /src/main/org/brailleblaster/settings/SettingsDialog.java
 /src/main/org/brailleblaster/wordprocessor/BBMenu.java
 /src/main/org/brailleblaster/wordprocessor/DocumentManager.java
 /src/main/org/brailleblaster/wordprocessor/SaveOptionsDialog.java

=======================================
--- /src/main/org/brailleblaster/settings/SettingsDialog.java Fri May 25 09:59:40 2012 +++ /src/main/org/brailleblaster/settings/SettingsDialog.java Mon Jul 30 17:40:43 2012
@@ -101,13 +101,13 @@
                        }
                });
                dialog.pack();
-               dialog.open();
                // Move the dialog to the center of the top level shell.
-//             Rectangle shellBounds = shell.getBounds();
-//             Point dialogSize = dialog.getSize();
-//             dialog.setLocation(
-//                             shellBounds.x + (shellBounds.width - 
dialogSize.x) / 2,
-//                             shellBounds.y + (shellBounds.height - 
dialogSize.y) / 2);
+               Rectangle shellBounds = shell.getBounds();
+               Point dialogSize = dialog.getSize();
+               dialog.setLocation(
+                               shellBounds.x + (shellBounds.width - 
dialogSize.x) / 2,
+                               shellBounds.y + (shellBounds.height - 
dialogSize.y) / 2);
+               dialog.open();
        }

        private void loadProperties(){
=======================================
--- /src/main/org/brailleblaster/wordprocessor/BBMenu.java Sun Jul 29 22:59:08 2012 +++ /src/main/org/brailleblaster/wordprocessor/BBMenu.java Mon Jul 30 17:40:43 2012
@@ -150,7 +150,7 @@

                MenuItem advancedItem = new MenuItem(menuBar, SWT.CASCADE);
                advancedItem.setText(lh.localValue("&Advanced"));
-               advancedItem.setEnabled(false); /* FO */
+//             advancedItem.setEnabled(false);
                MenuItem helpItem = new MenuItem(menuBar, SWT.CASCADE);
                helpItem.setText(lh.localValue("&Help"));

@@ -596,6 +596,7 @@
                Menu advancedMenu = new Menu(dm.documentWindow, SWT.DROP_DOWN);
                brlFormatItem = new MenuItem(advancedMenu, SWT.PUSH);
                brlFormatItem.setText(lh.localValue("&BrailleFormat"));
+               brlFormatItem.setEnabled(false);
                brlFormatItem.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                                dm.placeholder();
@@ -603,6 +604,7 @@
                });
                brailleASCIIItem = new MenuItem(advancedMenu, SWT.PUSH);
                brailleASCIIItem.setText(lh.localValue("&brailleASCIITable"));
+               brailleASCIIItem.setEnabled(false);
                brailleASCIIItem.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                                dm.placeholder();
@@ -611,6 +613,7 @@
                showTranslationTemplatesItem = new MenuItem(advancedMenu, 
SWT.PUSH);
                showTranslationTemplatesItem.setText(lh
                                .localValue("&ShowTranslationTemplates"));
+               showTranslationTemplatesItem.setEnabled(false);
                showTranslationTemplatesItem
                                .addSelectionListener(new SelectionAdapter() {
                                        public void 
widgetSelected(SelectionEvent e) {
@@ -619,6 +622,7 @@
                                });
                showFormatTemplatesItem = new MenuItem(advancedMenu, SWT.PUSH);
                
showFormatTemplatesItem.setText(lh.localValue("&ShowFormatTemplates"));
+               showFormatTemplatesItem.setEnabled(false);
                showFormatTemplatesItem.addSelectionListener(new 
SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                                dm.placeholder();
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Mon Jul 30 16:20:29 2012 +++ /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Mon Jul 30 17:40:43 2012
@@ -712,7 +712,7 @@

     void fileSave() {
        if ( !(daisy.hasChanged || braille.hasChanged)) {
-            new Notify (lh.localValue("noChange") );
+            new Notify (lh.localValue("noChange"));
             return;
        };

=======================================
--- /src/main/org/brailleblaster/wordprocessor/SaveOptionsDialog.java Sun Jul 29 22:59:08 2012 +++ /src/main/org/brailleblaster/wordprocessor/SaveOptionsDialog.java Mon Jul 30 17:40:43 2012
@@ -84,6 +84,8 @@
                } catch (IllegalArgumentException e) {
                        System.err.println ("setTabList exception " + 
e.getMessage());
                }
+
+               selShell.setDefaultButton(b3);

                selShell.pack();


Other related posts:

  • » [brailleblaster] push by francois...@xxxxxxxxx - Re-activated the Setting dialog on 2012-07-31 00:45 GMT - brailleblaster