Commit e0547220 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

fix so that default icons are created if you call gtk_stock_list_ids()

2001-05-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkiconfactory.c: fix so that default icons are created if
	you call gtk_stock_list_ids()

	* demos/gtk-demo/stock_browser.c (create_model): sort stock items
	in list
parent fe14698f
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c: fix so that default icons are created if
you call gtk_stock_list_ids()
* demos/gtk-demo/stock_browser.c (create_model): sort stock items
in list
2001-05-25 Havoc Pennington <hp@redhat.com>
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
......
/* Stock Item/Icon Browser
*
* This source code for this demo doesn't demonstrate anything
* particularly useful in applications, it just lets you scan the
* available stock icons and stock items.
* particularly useful in applications. The purpose of the "demo" is
* just to provide a handy place to browse the available stock icons
* and stock items.
*/
#include <string.h>
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
......@@ -134,6 +137,7 @@ create_model (void)
store = gtk_list_store_new_with_types (1, STOCK_ITEM_INFO_TYPE);
ids = gtk_stock_list_ids ();
ids = g_slist_sort (ids, (GCompareFunc) strcmp);
tmp_list = ids;
while (tmp_list != NULL)
{
......
......@@ -273,6 +273,17 @@ gtk_icon_factory_remove_default (GtkIconFactory *factory)
g_object_unref (G_OBJECT (factory));
}
static void
ensure_default_icons (void)
{
if (gtk_default_icons == NULL)
{
gtk_default_icons = gtk_icon_factory_new ();
get_default_icons (gtk_default_icons);
}
}
/**
* gtk_icon_factory_lookup_default:
* @stock_id: an icon name
......@@ -306,12 +317,7 @@ gtk_icon_factory_lookup_default (const gchar *stock_id)
tmp_list = g_slist_next (tmp_list);
}
if (gtk_default_icons == NULL)
{
gtk_default_icons = gtk_icon_factory_new ();
get_default_icons (gtk_default_icons);
}
ensure_default_icons ();
return gtk_icon_factory_lookup (gtk_default_icons, stock_id);
}
......@@ -2056,6 +2062,8 @@ _gtk_icon_factory_list_ids (void)
GSList *ids;
ids = NULL;
ensure_default_icons ();
tmp_list = all_icon_factories;
while (tmp_list != NULL)
......
......@@ -62,8 +62,6 @@ void gtk_stock_item_free (GtkStockItem *item);
/* Stock IDs (not all are stock items; some are images only) */
#define GTK_STOCK_MISSING_IMAGE "gtk-missing-image"
#define GTK_STOCK_DIALOG_INFO "gtk-dialog-info"
#define GTK_STOCK_DIALOG_WARNING "gtk-dialog-warning"
#define GTK_STOCK_DIALOG_ERROR "gtk-dialog-error"
......@@ -101,6 +99,7 @@ void gtk_stock_item_free (GtkStockItem *item);
#define GTK_STOCK_JUSTIFY_FILL "gtk-justify-fill"
#define GTK_STOCK_JUSTIFY_LEFT "gtk-justify-left"
#define GTK_STOCK_JUSTIFY_RIGHT "gtk-justify-right"
#define GTK_STOCK_MISSING_IMAGE "gtk-missing-image"
#define GTK_STOCK_NEW "gtk-new"
#define GTK_STOCK_NO "gtk-no"
#define GTK_STOCK_OK "gtk-ok"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment