X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire.c;h=162f5bbcf7a045fa2cf2cd880b6ae397a13133b7;hb=877f476198562db5a61f3055ad0c68e39f384174;hp=78b56752f0d39ea42c34acd3676af4be79abe185;hpb=b1b43c0d6a64d29a13953aa15d98dd74117faa95;p=pspp-builds.git diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 78b56752..162f5bbc 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -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); +}