Bug 12813 fixed: In SciNotes, there was no button to open code navigator 92/12292/2
Calixte DENIZET [Mon, 19 Aug 2013 10:06:11 +0000 (12:06 +0200)]
Change-Id: Ica2cfb4f605a3ba9c635119b9ec40d701ab5b46d

scilab/CHANGES_5.5.X
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/images/icons/16x16/actions/code-navigator.png [new file with mode: 0644]
scilab/modules/scinotes/etc/scinotesGUIConfiguration.xml
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/CodeNavigatorAction.java

index ac94f4b..9ef4138 100644 (file)
@@ -567,6 +567,8 @@ Bug fixes
 
 * Bug #12830 fixed - In SciNotes, it was not possible to replace from the caret position.
 
+* Bug #12831 fixed - In SciNotes toolbar, there was no button to open code navigator.
+
 * Bug #12833 fixed - In SciNotes, there was no autoscroll when searching a pattern.
 
 * Bug #12836 fixed - There was an error in strcmpi documentation.
index c67b9cb..77bf374 100644 (file)
@@ -264,6 +264,7 @@ libscigui_la_sci_gateway_DATA = sci_gateway/gui_gateway.xml
 #    $ find images/ -type f -printf "%p \\\\\n" -name *.svg -or -name *.gif -or -name *.jpg -or -name *.png |sort -u
 libscigui_la_iconsdir=$(mydatadir)/
 nobase_libscigui_la_icons_DATA = images/icons/16x16/actions/document-new.png \
+images/icons/16x16/actions/code-navigator.png \
 images/icons/16x16/actions/document-open.png \
 images/icons/16x16/actions/document-open-sci.png \
 images/icons/16x16/actions/document-print.png \
index 4129cd5..5668a56 100644 (file)
@@ -870,6 +870,7 @@ libscigui_la_sci_gateway_DATA = sci_gateway/gui_gateway.xml
 #    $ find images/ -type f -printf "%p \\\\\n" -name *.svg -or -name *.gif -or -name *.jpg -or -name *.png |sort -u
 libscigui_la_iconsdir = $(mydatadir)/
 nobase_libscigui_la_icons_DATA = images/icons/16x16/actions/document-new.png \
+images/icons/16x16/actions/code-navigator.png \
 images/icons/16x16/actions/document-open.png \
 images/icons/16x16/actions/document-open-sci.png \
 images/icons/16x16/actions/document-print.png \
diff --git a/scilab/modules/gui/images/icons/16x16/actions/code-navigator.png b/scilab/modules/gui/images/icons/16x16/actions/code-navigator.png
new file mode 100644 (file)
index 0000000..c127246
Binary files /dev/null and b/scilab/modules/gui/images/icons/16x16/actions/code-navigator.png differ
index 3a0b35b..48dec9c 100644 (file)
         <separator/>
         <button action="scinotes-find" tooltip="Find/Replace" icon="edit-find-replace"/>
         <button action="scinotes-incremental-search" tooltip="Incremental Search" icon="go-bottom"/>
+        <button action="scinotes-code-navigator" tooltip="Code Navigator" icon="code-navigator"/>
         <separator/>
         <button action="scinotes-execute-scilab" tooltip="Execute" icon="media-playback-start"/>
         <button action="scinotes-save-execute" tooltip="Save and execute" icon="save-and-execute"/>
index 3c01405..5d453fb 100644 (file)
@@ -15,6 +15,7 @@ package org.scilab.modules.scinotes.actions;
 import javax.swing.KeyStroke;
 
 import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.pushbutton.PushButton;
 import org.scilab.modules.scinotes.ScilabDocument;
 import org.scilab.modules.scinotes.SciNotes;
 import org.scilab.modules.scinotes.tabfactory.CodeNavigatorTab;
@@ -53,4 +54,15 @@ public final class CodeNavigatorAction extends DefaultAction {
     public void doAction() {
         getEditor().addNavigator();
     }
+
+    /**
+     * createButton
+     * @param tooltip the tooltip
+     * @param icon an icon name searched in SCI/modules/gui/images/icons/
+     * @param editor SciNotes
+     * @return PushButton
+     */
+    public static PushButton createButton(String tooltip, String icon, SciNotes editor) {
+        return createButton(tooltip, icon, new CodeNavigatorAction(tooltip, editor));
+    }
 }