Added toolbar icons. Hopefully somebody will contribute some better ones.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 15 Jul 2006 03:29:03 +0000 (03:29 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 15 Jul 2006 03:29:03 +0000 (03:29 +0000)
src/ui/gui/ChangeLog
src/ui/gui/automake.mk
src/ui/gui/psppire.c
src/ui/gui/psppire.glade

index f97d5651db33c8a32a5f6a677f03c5624a218e77..e2555263cfcf552c77a2e72ccf1fede3a8e623a2 100644 (file)
@@ -1,3 +1,8 @@
+Sat Jul 15 11:27:15 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+   * psppire.c psppire.glade automake.mk icons/* : Added toolbar icons where 
+       there's no suitable gtk stock icon.
+
 Tue Jul  4 09:08:38 WST 2006 John Darrington <john@darrington.wattle.id.au>
        
    * psppire.c: Fixed --help and --version options.
index 5115a6420b9b4844aac8f05c51be89aadbda40b6..a89df05b95a0f8bed6e0e35f0ab31a3b96d26b98 100644 (file)
@@ -22,7 +22,13 @@ src_ui_gui_psppiredir = $(pkgdatadir)
 dist_src_ui_gui_psppire_DATA = \
        $(top_srcdir)/src/ui/gui/psppire.glade \
        $(top_srcdir)/src/ui/gui/psppicon.png \
-       $(top_srcdir)/src/ui/gui/pspplogo.png
+       $(top_srcdir)/src/ui/gui/pspplogo.png \
+       $(top_srcdir)/src/ui/gui/icons/value-labels.png \
+       $(top_srcdir)/src/ui/gui/icons/goto-variable.png\
+       $(top_srcdir)/src/ui/gui/icons/insert-case.png \
+       $(top_srcdir)/src/ui/gui/icons/split-file.png \
+       $(top_srcdir)/src/ui/gui/icons/select-cases.png \
+       $(top_srcdir)/src/ui/gui/icons/weight-cases.png
 
 
 src_ui_gui_psppire_SOURCES = \
index 78b56752f0d39ea42c34acd3676af4be79abe185..162f5bbcf7a045fa2cf2cd880b6ae397a13133b7 100644 (file)
@@ -71,6 +71,8 @@ give_help(void)
 
 PsppireVarStore *var_store = 0;
 
+void create_icon_factory (void);
+
 int 
 main(int argc, char *argv[]) 
 {
@@ -106,7 +108,6 @@ main(int argc, char *argv[])
       return 0;
     }
 
-
   glade_init();
 
 
@@ -127,6 +128,8 @@ main(int argc, char *argv[])
 
   data_store = psppire_data_store_new(the_dictionary);
 
+  create_icon_factory();
+
   /* load the interface */
   xml = glade_xml_new(PKGDATADIR "/psppire.glade", NULL, NULL);
 
@@ -218,3 +221,50 @@ parse_command_line (int *argc, char ***argv, gchar **filename, GError **err)
 }
 
 
+
+void 
+create_icon_factory (void)
+{
+  GtkIconFactory *factory = gtk_icon_factory_new();
+
+  GtkIconSet *icon_set;
+  
+  GdkPixbuf *pixbuf;
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/value-labels.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-value-labels", icon_set);
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/weight-cases.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-weight-cases", icon_set);
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/goto-variable.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-goto-variable", icon_set);
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/insert-variable.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-insert-variable", icon_set);
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/insert-case.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-insert-case", icon_set);
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/split-file.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-split-file", icon_set);
+
+  pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR "/select-cases.png", 0);
+  icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
+  g_object_unref (pixbuf);
+  gtk_icon_factory_add ( factory, "pspp-select-cases", icon_set);
+
+  gtk_icon_factory_add_default (factory);
+}
index 2124f484e05256c19a67e592f37cbbd55a65eaac..798e62168871255e281c0b6b7d04e77302b34808 100644 (file)
                <widget class="GtkToolButton" id="variables">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Variables</property>
+                 <property name="stock_id">pspp-goto-variable</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>
                <widget class="GtkToolButton" id="insert_case">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Insert Case</property>
+                 <property name="stock_id">pspp-insert-case</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>
                <widget class="GtkToolButton" id="insert_variable">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Insert Variable</property>
+                 <property name="stock_id">pspp-insert-variable</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>
                <widget class="GtkToolButton" id="toolbutton8">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Split File</property>
+                 <property name="stock_id">pspp-split-file</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>
                <widget class="GtkToolButton" id="toolbutton9">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Weight Cases</property>
+                 <property name="stock_id">pspp-weight-cases</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>
                <widget class="GtkToolButton" id="toolbutton10">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Select Cases</property>
+                 <property name="stock_id">pspp-select-cases</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>
                <widget class="GtkToggleToolButton" id="togglebutton-value-labels">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Value Labels</property>
+                 <property name="stock_id">pspp-value-labels</property>
                  <property name="label" translatable="yes"></property>
                  <property name="use_underline">True</property>
                  <property name="visible_horizontal">True</property>