2007-10-07 [colin] 3.0.2cvs27
[claws.git] / src / prefs_toolbar.c
index 409f05c6ef8408c3b519131f7fecfcc531c16c32..1d42c21621c62041e5748546304e9ac64779e14f 100644 (file)
@@ -67,6 +67,78 @@ enum
        ITEM_SEPARATOR    = 2
 };
 
+static const gint ToolbarIcons[] =
+{
+       STOCK_PIXMAP_ADDRESS_BOOK,
+       STOCK_PIXMAP_ADDRESS_SEARCH,
+       STOCK_PIXMAP_BOOK,
+       STOCK_PIXMAP_CATEGORY,
+       STOCK_PIXMAP_CHECK_SPELLING,
+       STOCK_PIXMAP_CLOSE,
+       STOCK_PIXMAP_DOWN_ARROW,
+       STOCK_PIXMAP_UP_ARROW,
+       STOCK_PIXMAP_EDIT_EXTERN,
+       STOCK_PIXMAP_ERROR,
+       STOCK_PIXMAP_EXEC,
+       STOCK_PIXMAP_GROUP,
+       STOCK_PIXMAP_INSERT_FILE,
+       STOCK_PIXMAP_INTERFACE,
+       STOCK_PIXMAP_JPILOT,
+       STOCK_PIXMAP_LDAP,
+       STOCK_PIXMAP_LINEWRAP_CURRENT,
+       STOCK_PIXMAP_LINEWRAP_ALL,
+       STOCK_PIXMAP_MAIL,
+       STOCK_PIXMAP_MAIL_ATTACH,
+       STOCK_PIXMAP_MAIL_COMPOSE,
+       STOCK_PIXMAP_MAIL_FORWARD,
+       STOCK_PIXMAP_MAIL_RECEIVE,
+       STOCK_PIXMAP_MAIL_RECEIVE_ALL,
+       STOCK_PIXMAP_MAIL_REPLY,
+       STOCK_PIXMAP_MAIL_REPLY_TO_ALL,
+       STOCK_PIXMAP_MAIL_REPLY_TO_AUTHOR,
+       STOCK_PIXMAP_MAIL_SEND,
+       STOCK_PIXMAP_MAIL_SEND_QUEUE,
+       STOCK_PIXMAP_MAIL_SIGN,
+       STOCK_PIXMAP_OPEN_MAIL,
+       STOCK_PIXMAP_NEWS_COMPOSE,
+       STOCK_PIXMAP_PASTE,
+       STOCK_PIXMAP_PREFERENCES,
+       STOCK_PIXMAP_PROPERTIES,
+       STOCK_PIXMAP_VCARD,
+       STOCK_PIXMAP_ONLINE,
+       STOCK_PIXMAP_OFFLINE,
+       STOCK_PIXMAP_NOTICE_WARN,               /* small warning */
+       STOCK_PIXMAP_NOTICE_ERROR,              /* small error   */
+       STOCK_PIXMAP_NOTICE_NOTE,               /* small message */
+       STOCK_PIXMAP_GO_FOLDERS,
+       STOCK_PIXMAP_MIME_TEXT_PLAIN,
+       STOCK_PIXMAP_MIME_TEXT_HTML,
+       STOCK_PIXMAP_MIME_APPLICATION,
+       STOCK_PIXMAP_MIME_IMAGE,
+       STOCK_PIXMAP_MIME_AUDIO,
+       STOCK_PIXMAP_MIME_TEXT_ENRICHED,
+       STOCK_PIXMAP_MIME_UNKNOWN,
+       STOCK_PIXMAP_MIME_PDF,
+       STOCK_PIXMAP_MIME_PS,
+       STOCK_PIXMAP_MIME_TEXT_CALENDAR,
+       STOCK_PIXMAP_MIME_PGP_SIG,
+       STOCK_PIXMAP_PRINTER,
+       STOCK_PIXMAP_PRIVACY_SIGNED,
+       STOCK_PIXMAP_PRIVACY_PASSED,
+       STOCK_PIXMAP_PRIVACY_FAILED,
+       STOCK_PIXMAP_PRIVACY_UNKNOWN,
+       STOCK_PIXMAP_PRIVACY_EXPIRED,
+       STOCK_PIXMAP_PRIVACY_WARN,
+       STOCK_PIXMAP_PRIVACY_EMBLEM_SIGNED,
+       STOCK_PIXMAP_PRIVACY_EMBLEM_PASSED,
+       STOCK_PIXMAP_PRIVACY_EMBLEM_FAILED,
+       STOCK_PIXMAP_PRIVACY_EMBLEM_WARN,
+       STOCK_PIXMAP_MIME_MESSAGE,
+       STOCK_PIXMAP_SPAM_BTN,
+       STOCK_PIXMAP_HAM_BTN,
+       STOCK_PIXMAP_EMPTY,              /* last entry */
+};
+
 typedef struct _ToolbarPage
 {
        PrefsPage  page;
@@ -1264,17 +1336,14 @@ static void icon_chooser_create(GtkButton *button, ToolbarPage *prefs_toolbar)
                                   
        gtk_list_store_clear(store);
 
-       for (i = 0; i < STOCK_PIXMAP_EMPTY; i++) {
+       for (i = 0; ToolbarIcons[i] != STOCK_PIXMAP_EMPTY; i++) {
                GdkPixbuf *pixbuf;
-               if (i == STOCK_PIXMAP_CLAWS_MAIL_LOGO) /* that's too big */
-                       continue;
-
-               stock_pixbuf_gdk(prefs_toolbar->window, i, &pixbuf);
+               stock_pixbuf_gdk(prefs_toolbar->window, ToolbarIcons[i], &pixbuf);
                
                gtk_list_store_append(store, &iter);
                gtk_list_store_set(store, &iter,
                                   SET_ICON, pixbuf,
-                                  SET_FILENAME, stock_pixmap_get_name((StockPixmap) i),
+                                  SET_FILENAME, stock_pixmap_get_name((StockPixmap) ToolbarIcons[i]),
                                   -1);
        }