Mercurial > pidgin.yaz
comparison pidgin/gaimstock.c @ 15560:442128853bdb
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 05 Feb 2007 12:13:18 +0000 |
parents | 535f002e7b0f |
children | 603488306e23 |
comparison
equal
deleted
inserted
replaced
15559:dad51c0e3bc6 | 15560:442128853bdb |
---|---|
35 const char *filename; | 35 const char *filename; |
36 | 36 |
37 } const stock_icons[] = | 37 } const stock_icons[] = |
38 { | 38 { |
39 { PIDGIN_STOCK_ABOUT, "buttons", "about_menu.png" }, | 39 { PIDGIN_STOCK_ABOUT, "buttons", "about_menu.png" }, |
40 { PIDGIN_STOCK_ACCOUNTS, "buttons", "accounts.png" }, | |
41 { PIDGIN_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE }, | 40 { PIDGIN_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE }, |
42 #if GTK_CHECK_VERSION(2,6,0) | 41 #if GTK_CHECK_VERSION(2,6,0) |
43 { PIDGIN_STOCK_ALIAS, NULL, GTK_STOCK_EDIT }, | 42 { PIDGIN_STOCK_ALIAS, NULL, GTK_STOCK_EDIT }, |
44 #else | 43 #else |
45 { PIDGIN_STOCK_ALIAS, "buttons", "edit.png" }, | 44 { PIDGIN_STOCK_ALIAS, "buttons", "edit.png" }, |
46 #endif | 45 #endif |
47 { PIDGIN_STOCK_BGCOLOR, "buttons", "change-bgcolor-small.png" }, | |
48 { PIDGIN_STOCK_BLOCK, NULL, GTK_STOCK_STOP }, | 46 { PIDGIN_STOCK_BLOCK, NULL, GTK_STOCK_STOP }, |
49 { PIDGIN_STOCK_UNBLOCK, NULL, GTK_STOCK_STOP /* XXX: */ }, | 47 { PIDGIN_STOCK_UNBLOCK, NULL, GTK_STOCK_STOP /* XXX: */ }, |
50 { PIDGIN_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO }, | 48 { PIDGIN_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO }, |
51 { PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, | 49 { PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, |
52 { PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, | 50 { PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, |
76 { PIDGIN_STOCK_ICON_CONNECT, "icons", "connect.png" }, | 74 { PIDGIN_STOCK_ICON_CONNECT, "icons", "connect.png" }, |
77 { PIDGIN_STOCK_ICON_OFFLINE, "icons", "offline.png" }, | 75 { PIDGIN_STOCK_ICON_OFFLINE, "icons", "offline.png" }, |
78 { PIDGIN_STOCK_ICON_ONLINE, "icons", "online.png" }, | 76 { PIDGIN_STOCK_ICON_ONLINE, "icons", "online.png" }, |
79 { PIDGIN_STOCK_ICON_ONLINE_MSG, "icons", "msgunread.png" }, | 77 { PIDGIN_STOCK_ICON_ONLINE_MSG, "icons", "msgunread.png" }, |
80 { PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, | 78 { PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, |
81 { PIDGIN_STOCK_IM, "buttons", "send-im.png" }, | |
82 { PIDGIN_STOCK_IMAGE, "buttons", "insert-image-small.png" }, | |
83 #if GTK_CHECK_VERSION(2,8,0) | |
84 { PIDGIN_STOCK_INFO, NULL, GTK_STOCK_INFO }, | |
85 #else | |
86 { PIDGIN_STOCK_INFO, "buttons", "info.png" }, | |
87 #endif | |
88 { PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, | 79 { PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, |
89 { PIDGIN_STOCK_LINK, "buttons", "insert-link-small.png" }, | |
90 { PIDGIN_STOCK_LOG, NULL, GTK_STOCK_DND_MULTIPLE }, | |
91 { PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, | 80 { PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, |
92 #if GTK_CHECK_VERSION(2,6,0) | 81 #if GTK_CHECK_VERSION(2,6,0) |
93 { PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, | 82 { PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, |
94 #else | 83 #else |
95 { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" }, | 84 { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" }, |
96 #endif | |
97 { PIDGIN_STOCK_PENDING, "buttons", "send-im.png" }, | |
98 #if GTK_CHECK_VERSION(2,6,0) | |
99 { PIDGIN_STOCK_PLUGIN, NULL, GTK_STOCK_DISCONNECT }, | |
100 #else | |
101 { PIDGIN_STOCK_PLUGIN, "icons", "stock_disconnect_16.png" }, | |
102 #endif | 85 #endif |
103 { PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, | 86 { PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, |
104 { PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, | 87 { PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, |
105 { PIDGIN_STOCK_SEND, "buttons", "send-im.png" }, | |
106 { PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, | 88 { PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, |
107 { PIDGIN_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, | 89 { PIDGIN_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, |
108 { PIDGIN_STOCK_SMILEY, "buttons", "insert-smiley-small.png" }, | |
109 { PIDGIN_STOCK_TEXT_BIGGER, "buttons", "text_bigger.png" }, | |
110 { PIDGIN_STOCK_TEXT_NORMAL, "buttons", "text_normal.png" }, | |
111 { PIDGIN_STOCK_TEXT_SMALLER, "buttons", "text_smaller.png" }, | |
112 { PIDGIN_STOCK_TYPED, "gaim", "typed.png" }, | 90 { PIDGIN_STOCK_TYPED, "gaim", "typed.png" }, |
113 { PIDGIN_STOCK_TYPING, "gaim", "typing.png" }, | |
114 { PIDGIN_STOCK_VOICE_CHAT, "gaim", "phone.png" }, | |
115 { PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, | 91 { PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, |
116 }; | 92 }; |
117 | 93 |
118 static const GtkStockItem stock_items[] = | 94 static const GtkStockItem stock_items[] = |
119 { | 95 { |
120 { PIDGIN_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, | 96 { PIDGIN_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, |
121 { PIDGIN_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, | 97 { PIDGIN_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, |
122 { PIDGIN_STOCK_CLOSE_TABS, N_("Close _tabs"), 0, 0, NULL }, | 98 { PIDGIN_STOCK_CLOSE_TABS, N_("Close _tabs"), 0, 0, NULL }, |
123 { PIDGIN_STOCK_IM, N_("I_M"), 0, 0, NULL }, | 99 { PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, N_("I_M"), 0, 0, NULL }, |
124 { PIDGIN_STOCK_INFO, N_("_Get Info"), 0, 0, NULL }, | 100 { PIDGIN_STOCK_TOOLBAR_USER_INFO, N_("_Get Info"), 0, 0, NULL }, |
125 { PIDGIN_STOCK_INVITE, N_("_Invite"), 0, 0, NULL }, | 101 { PIDGIN_STOCK_INVITE, N_("_Invite"), 0, 0, NULL }, |
126 { PIDGIN_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, | 102 { PIDGIN_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, |
127 { PIDGIN_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, | 103 { PIDGIN_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, |
128 { PIDGIN_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, | 104 { PIDGIN_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, |
129 }; | 105 }; |
130 | 106 |
131 static struct SizedStockIcon { | 107 static struct SizedStockIcon { |
132 const char *name; | 108 const char *name; |
133 const char *dir; | 109 const char *dir; |
168 { PIDGIN_STOCK_ANIMATION_CONNECT3, "animations", "connect3.png",TRUE, FALSE, FALSE, FALSE }, | 144 { PIDGIN_STOCK_ANIMATION_CONNECT3, "animations", "connect3.png",TRUE, FALSE, FALSE, FALSE }, |
169 { PIDGIN_STOCK_ANIMATION_TYPING0, "animations", "typing0.png",TRUE, FALSE, FALSE, FALSE }, | 145 { PIDGIN_STOCK_ANIMATION_TYPING0, "animations", "typing0.png",TRUE, FALSE, FALSE, FALSE }, |
170 { PIDGIN_STOCK_ANIMATION_TYPING1, "animations", "typing1.png",TRUE, FALSE, FALSE, FALSE }, | 146 { PIDGIN_STOCK_ANIMATION_TYPING1, "animations", "typing1.png",TRUE, FALSE, FALSE, FALSE }, |
171 { PIDGIN_STOCK_ANIMATION_TYPING2, "animations", "typing2.png",TRUE, FALSE, FALSE, FALSE }, | 147 { PIDGIN_STOCK_ANIMATION_TYPING2, "animations", "typing2.png",TRUE, FALSE, FALSE, FALSE }, |
172 { PIDGIN_STOCK_ANIMATION_TYPING3, "animations", "typing3.png",TRUE, FALSE, FALSE, FALSE }, | 148 { PIDGIN_STOCK_ANIMATION_TYPING3, "animations", "typing3.png",TRUE, FALSE, FALSE, FALSE }, |
149 | |
150 { PIDGIN_STOCK_TOOLBAR_ACCOUNTS, "toolbar", "accounts.png", TRUE, FALSE, FALSE, FALSE }, | |
151 { PIDGIN_STOCK_TOOLBAR_BGCOLOR, "toolbar", "change-bgcolor.png", TRUE, FALSE, FALSE, FALSE }, | |
152 { PIDGIN_STOCK_TOOLBAR_FGCOLOR, "toolbar", "change-fgcolor.png", TRUE, FALSE, FALSE, FALSE }, | |
153 { PIDGIN_STOCK_TOOLBAR_SMILEY, "toolbar", "emote-select.png", TRUE, FALSE, FALSE, FALSE }, | |
154 { PIDGIN_STOCK_TOOLBAR_TEXT_SMALLER, "toolbar", "font-size-down.png", TRUE, FALSE, FALSE, FALSE }, | |
155 { PIDGIN_STOCK_TOOLBAR_TEXT_LARGER, "toolbar", "font-size-up.png", TRUE, FALSE, FALSE, FALSE }, | |
156 { PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, "toolbar", "insert-image.png", TRUE, FALSE, FALSE, FALSE }, | |
157 { PIDGIN_STOCK_TOOLBAR_INSERT_LINK, "toolbar", "insert-link.png", TRUE, FALSE, FALSE, FALSE }, | |
158 { PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, "toolbar", "message-new.png", TRUE, FALSE, FALSE, FALSE }, | |
159 { PIDGIN_STOCK_TOOLBAR_PLUGINS, "toolbar", "plugins.png", TRUE, FALSE, FALSE, FALSE }, | |
160 { PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", TRUE, FALSE, FALSE, FALSE }, | |
161 { PIDGIN_STOCK_TOOLBAR_PENDING, "status", "message-pending.png", TRUE, FALSE, FALSE, FALSE }, | |
173 }; | 162 }; |
174 | 163 |
175 static gchar * | 164 static gchar * |
176 find_file(const char *dir, const char *base) | 165 find_file(const char *dir, const char *base) |
177 { | 166 { |
205 gtk_icon_source_set_size(source, sizeid); | 194 gtk_icon_source_set_size(source, sizeid); |
206 gtk_icon_source_set_size_wildcarded(source, FALSE); | 195 gtk_icon_source_set_size_wildcarded(source, FALSE); |
207 gtk_icon_source_set_state_wildcarded(source, TRUE); | 196 gtk_icon_source_set_state_wildcarded(source, TRUE); |
208 gtk_icon_set_add_source(iconset, source); | 197 gtk_icon_set_add_source(iconset, source); |
209 gtk_icon_source_free(source); | 198 gtk_icon_source_free(source); |
199 | |
200 if (sizeid == gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)) { | |
201 source = gtk_icon_source_new(); | |
202 gtk_icon_source_set_filename(source, filename); | |
203 gtk_icon_source_set_direction_wildcarded(source, TRUE); | |
204 gtk_icon_source_set_size(source, GTK_ICON_SIZE_MENU); | |
205 gtk_icon_source_set_size_wildcarded(source, FALSE); | |
206 gtk_icon_source_set_state_wildcarded(source, TRUE); | |
207 gtk_icon_set_add_source(iconset, source); | |
208 gtk_icon_source_free(source); | |
209 } | |
210 | |
210 g_free(filename); | 211 g_free(filename); |
211 } | 212 } |
212 | 213 |
213 void | 214 void |
214 pidgin_stock_init(void) | 215 pidgin_stock_init(void) |