Add buttons to toolbar (Demos+Atoms)
Vincent COUVERT [Sun, 1 Nov 2009 15:42:36 +0000 (16:42 +0100)]
12 files changed:
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/etc/main_toolbar.xml
scilab/modules/gui/images/icons/applications-system.png [new file with mode: 0644]
scilab/modules/gui/images/icons/package-x-generic.png [new file with mode: 0644]
scilab/modules/xcos/Makefile.am
scilab/modules/xcos/Makefile.in
scilab/modules/xcos/images/icons/applications-system.png [new file with mode: 0644]
scilab/modules/xcos/images/icons/help-browser.png [new file with mode: 0644]
scilab/modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/XcosDemonstrationsAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/XcosDocumentationAction.java

index b3219fc..1d557e0 100644 (file)
@@ -311,7 +311,9 @@ images/icons/edit-find.png \
 images/icons/edit-redo.png \
 images/icons/edit-undo.png \
 images/icons/media-floppy.png \
-images/icons/aboutscilab.png
+images/icons/aboutscilab.png \
+images/icons/package-x-generic.png \
+images/icons/applications-system.png
 
 
 if GUI
index bd9b112..8782c8c 100644 (file)
@@ -843,7 +843,9 @@ images/icons/edit-find.png \
 images/icons/edit-redo.png \
 images/icons/edit-undo.png \
 images/icons/media-floppy.png \
-images/icons/aboutscilab.png
+images/icons/aboutscilab.png \
+images/icons/package-x-generic.png \
+images/icons/applications-system.png
 
 @GUI_TRUE@USEANT = 1
 all: $(BUILT_SOURCES)
index ad54a23..9d54e0f 100644 (file)
 
     <separator/>
 
+    <!-- Atoms -->
+    <button icon="package-x-generic.png" tooltiptext="Modules manager - ATOMS">
+        <callback instruction='atomsGui();' type="0"/>
+    </button>
+
+    <separator/>
+
+    <!-- Démos -->
+    <button icon="applications-system.png" tooltiptext="Scilab Demonstrations">
+        <callback instruction='demo_gui();' type="0"/>
+    </button>
+
     <!-- Help -->
     <button icon="help-browser.png" tooltiptext="Help Browser">
         <callback instruction='help();' type="0"/>
diff --git a/scilab/modules/gui/images/icons/applications-system.png b/scilab/modules/gui/images/icons/applications-system.png
new file mode 100644 (file)
index 0000000..d90ab66
Binary files /dev/null and b/scilab/modules/gui/images/icons/applications-system.png differ
diff --git a/scilab/modules/gui/images/icons/package-x-generic.png b/scilab/modules/gui/images/icons/package-x-generic.png
new file mode 100644 (file)
index 0000000..9015426
Binary files /dev/null and b/scilab/modules/gui/images/icons/package-x-generic.png differ
index d7f8530..cc12430 100644 (file)
@@ -164,6 +164,8 @@ images/icons/list-remove.png \
 images/icons/media-playback-start.png \
 images/icons/process-stop.png \
 images/icons/view-fullscreen.png \
+images/icons/applications-system.png \
+images/icons/help-browser.png \
 images/palettes/ABS_VALUE.jpg \
 images/palettes/AFFICH_m.jpg \
 images/palettes/ANDBLK.jpg \
index b028088..73cd325 100644 (file)
@@ -543,6 +543,8 @@ images/icons/list-remove.png \
 images/icons/media-playback-start.png \
 images/icons/process-stop.png \
 images/icons/view-fullscreen.png \
+images/icons/applications-system.png \
+images/icons/help-browser.png \
 images/palettes/ABS_VALUE.jpg \
 images/palettes/AFFICH_m.jpg \
 images/palettes/ANDBLK.jpg \
diff --git a/scilab/modules/xcos/images/icons/applications-system.png b/scilab/modules/xcos/images/icons/applications-system.png
new file mode 100644 (file)
index 0000000..d90ab66
Binary files /dev/null and b/scilab/modules/xcos/images/icons/applications-system.png differ
diff --git a/scilab/modules/xcos/images/icons/help-browser.png b/scilab/modules/xcos/images/icons/help-browser.png
new file mode 100644 (file)
index 0000000..f25fc3f
Binary files /dev/null and b/scilab/modules/xcos/images/icons/help-browser.png differ
index 6fc0680..827521a 100644 (file)
@@ -851,6 +851,9 @@ public class Xcos extends SwingScilabTab implements Tab {
        toolBar.add(ZoomOutAction.zoomoutButton(scilabGraph));
        
        toolBar.addSeparator();
+       
+       toolBar.add(XcosDemonstrationsAction.createButton(scilabGraph));
+       toolBar.add(XcosDocumentationAction.createButton(scilabGraph));
 
        return toolBar;
     }
index 918b6e2..6963da2 100644 (file)
@@ -43,7 +43,7 @@ public final class XcosDemonstrationsAction extends DefaultAction {
         * @return the button
         */
        public static PushButton createButton(ScilabGraph scilabGraph) {
-               return createButton(XcosMessages.XCOS_DEMONSTRATIONS, null, new XcosDemonstrationsAction(scilabGraph));
+               return createButton(XcosMessages.XCOS_DEMONSTRATIONS, "applications-system.png", new XcosDemonstrationsAction(scilabGraph));
        }
 
        /**
index 4696887..c4749dd 100644 (file)
@@ -43,7 +43,7 @@ public final class XcosDocumentationAction extends DefaultAction {
         * @return the button
         */
        public static PushButton createButton(ScilabGraph scilabGraph) {
-               return createButton(XcosMessages.XCOS_DOCUMENTATION, null, new XcosDocumentationAction(scilabGraph));
+               return createButton(XcosMessages.XCOS_DOCUMENTATION, "help-browser.png", new XcosDocumentationAction(scilabGraph));
        }
 
        /**