- const struct icon_context *ic = &xx[c];
- gint i;
- for (i = 0 ; i < ic->n_icons ; ++i)
- {
- GtkIconSet *icon_set = gtk_icon_set_new ();
- int r;
- for (r = 0 ; r < sizeof (sizes) / sizeof (sizes[0]); ++r)
- {
- GtkIconSource *source = gtk_icon_source_new ();
- gchar *filename = g_strdup_printf ("%s/%s/%dx%d/%s.png", PKGDATADIR,
- ic->context_name,
- sizes[r].resolution, sizes[r].resolution,
- ic->icon_name[i]);
-
- gtk_icon_source_set_filename (source, filename);
- gtk_icon_source_set_size_wildcarded (source, FALSE);
- gtk_icon_source_set_size (source, sizes[r].size);
- g_free (filename);
- gtk_icon_set_add_source (icon_set, source);
- }
-
- gtk_icon_factory_add (factory, ic->icon_name[i], icon_set);
- }
- }
-
- {
- struct iconmap
- {
- const gchar *gtk_id;
- gchar *pspp_id;
- };
-
- /* We have our own icons for some things.
- But we want the Stock Item to be identical to the Gtk standard
- ones in all other respects.
- */
- const struct iconmap map[] = {
- {GTK_STOCK_NEW, "file-new-document"},
- {GTK_STOCK_QUIT, "file-quit"},
- {GTK_STOCK_SAVE, "file-save-document"},
- {GTK_STOCK_CUT, "edit-cut"},
- {GTK_STOCK_COPY, "edit-copy"},
- {GTK_STOCK_PASTE, "edit-paste"},
- {GTK_STOCK_ABOUT, "help-about"},
- {GTK_STOCK_PRINT, "file-print-document"}
- };
-
- GtkStockItem customised[sizeof (map) / sizeof (map[0])];
- int i;
-
- for (i = 0; i < sizeof (map) / sizeof (map[0]); ++i)
- {
- gtk_stock_lookup (map[i].gtk_id, &customised[i]);
- customised[i].stock_id = map[i].pspp_id;
- }
+ {24, sizeof (small_toolbar) / sizeof (GtkIconSize), small_toolbar},
+ {16, sizeof (menus) / sizeof (GtkIconSize), menus},
+ {32, sizeof (large_toolbar) / sizeof (GtkIconSize), large_toolbar}
+ };