X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire.c;h=67ace893386b2854b9157115e7f71646636dda67;hb=e16d30a43af6ada7b8846f48a55eb3cb8f4e5f22;hp=78b56752f0d39ea42c34acd3676af4be79abe185;hpb=9711bd03dcc19d39c08e0d5bc52ff909f592db6b;p=pspp diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 78b56752f0..67ace89338 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,15 +108,11 @@ main(int argc, char *argv[]) return 0; } - glade_init(); - settings_init(); - /* - set_pspp_locale("da_DK"); - */ + settings_init(); message_dialog_init(); @@ -127,6 +125,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 +218,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); +}