diff src/stock.c @ 6009:5cd7a10c6ade

[gaim-migrate @ 6457] Renamed setup_stock() to gaim_gtk_stock_init(), to be more compliant with the rest of the naming schemes. We now initialize it before registering the debug stuff, so the debug window can use our stock icons. Also, added a Pause stock icon, and used it in the debug window. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 04 Jul 2003 00:04:07 +0000
parents 059d95c67cda
children f40283608e4b
line wrap: on
line diff
--- a/src/stock.c	Thu Jul 03 23:40:10 2003 +0000
+++ b/src/stock.c	Fri Jul 04 00:04:07 2003 +0000
@@ -63,12 +63,13 @@
 	{ GAIM_STOCK_LINK,            "buttons", "insert-link-small.png"    },
 	{ GAIM_STOCK_LOGO,            "gaim",    "logo.png"                 },
 	{ GAIM_STOCK_MODIFY,          NULL,      GTK_STOCK_PREFERENCES      },
+	{ GAIM_STOCK_PAUSE,           "buttons", "pause.png"                },
 	{ GAIM_STOCK_PRIVACY,         NULL,      GTK_STOCK_PROPERTIES       },
+	{ GAIM_STOCK_OPEN_MAIL,       NULL,      GTK_STOCK_JUMP_TO          },
 	{ GAIM_STOCK_SEND,            "buttons", "send-im.png"              },
 	{ GAIM_STOCK_SIGN_ON,         NULL,      GTK_STOCK_EXECUTE          },
 	{ GAIM_STOCK_SIGN_OFF,        NULL,      GTK_STOCK_CLOSE            },
 	{ GAIM_STOCK_SMILEY,          "buttons", "insert-smiley-small.png"  },
-	{ GAIM_STOCK_OPEN_MAIL,       NULL,      GTK_STOCK_JUMP_TO          },
 	{ GAIM_STOCK_TEXT_BIGGER,     "buttons", "text_bigger.png"          },
 	{ GAIM_STOCK_TEXT_NORMAL,     "buttons", "text_normal.png"          },
 	{ GAIM_STOCK_TEXT_SMALLER,    "buttons", "text_smaller.png"         },
@@ -81,12 +82,15 @@
 const GtkStockItem stock_items[] =
 {
 	{ GAIM_STOCK_MODIFY,    N_("_Modify"),    0, 0, NULL },
-	{ GAIM_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }
+	{ GAIM_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL },
+	{ GAIM_STOCK_PAUSE,     N_("_Pause"),     0, 0, NULL }
 };
 
 static gint stock_icon_count = sizeof(stock_icons) / sizeof(*stock_icons);
 static gint stock_item_count = sizeof(stock_items) / sizeof(*stock_items);
 
+static gboolean stock_inited = FALSE;
+
 static gchar *
 find_file(const char *dir, const char *base)
 {
@@ -112,12 +116,15 @@
 }
 
 void
-setup_stock()
+gaim_gtk_stock_init(void)
 {
 	GtkIconFactory *icon_factory;
 	int i;
 	GtkWidget *win;
 
+	if (stock_inited)
+		return;
+
 	/* Setup the icon factory. */
 	icon_factory = gtk_icon_factory_new();
 
@@ -165,4 +172,6 @@
 
 	/* Register the stock items. */
 	gtk_stock_add_static(stock_items, stock_item_count);
+
+	stock_inited = TRUE;
 }