Mon, 05 Feb 2007 12:13:18 +0000
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
| 10297 | 1 | /** |
|
14253
b63ebf84c42b
This is a hand-crafted commit to migrate across subversion revisions
Ethan Blanton <elb@pidgin.im>
parents:
14252
diff
changeset
|
2 | * @file gaimstock.c GTK+ Stock resources |
| 10297 | 3 | * @ingroup gtkui |
| 4 | * | |
| 5 | * gaim | |
| 6 | * | |
| 7 | * Gaim is the legal property of its developers, whose names are too numerous | |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | * | |
| 25 | */ | |
| 26 | #include "internal.h" | |
| 15577 | 27 | #include "pidgin.h" |
| 10297 | 28 | |
|
14253
b63ebf84c42b
This is a hand-crafted commit to migrate across subversion revisions
Ethan Blanton <elb@pidgin.im>
parents:
14252
diff
changeset
|
29 | #include "gaimstock.h" |
| 10297 | 30 | |
| 31 | static struct StockIcon | |
| 32 | { | |
| 33 | const char *name; | |
| 34 | const char *dir; | |
| 35 | const char *filename; | |
| 36 | ||
| 37 | } const stock_icons[] = | |
| 38 | { | |
| 15570 | 39 | { PIDGIN_STOCK_ABOUT, "buttons", "about_menu.png" }, |
| 40 | { PIDGIN_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE }, | |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
41 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 42 | { PIDGIN_STOCK_ALIAS, NULL, GTK_STOCK_EDIT }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
43 | #else |
| 15570 | 44 | { PIDGIN_STOCK_ALIAS, "buttons", "edit.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
45 | #endif |
| 15570 | 46 | { PIDGIN_STOCK_BLOCK, NULL, GTK_STOCK_STOP }, |
| 47 | { PIDGIN_STOCK_UNBLOCK, NULL, GTK_STOCK_STOP /* XXX: */ }, | |
| 48 | { PIDGIN_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO }, | |
| 49 | { PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, | |
| 50 | { PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, | |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
51 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 52 | { PIDGIN_STOCK_CONNECT, NULL, GTK_STOCK_CONNECT }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
53 | #else |
| 15570 | 54 | { PIDGIN_STOCK_CONNECT, "icons", "stock_connect_16.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
55 | #endif |
| 15570 | 56 | { PIDGIN_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES }, |
| 57 | { PIDGIN_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN }, | |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
58 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 59 | { PIDGIN_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
60 | #else |
| 15570 | 61 | { PIDGIN_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
62 | #endif |
| 15570 | 63 | { PIDGIN_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
64 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 65 | { PIDGIN_STOCK_EDIT, NULL, GTK_STOCK_EDIT }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
66 | #else |
| 15570 | 67 | { PIDGIN_STOCK_EDIT, "buttons", "edit.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
68 | #endif |
| 15570 | 69 | { PIDGIN_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL }, |
| 70 | { PIDGIN_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY }, | |
| 71 | { PIDGIN_STOCK_FILE_TRANSFER, NULL, GTK_STOCK_REVERT_TO_SAVED }, | |
| 72 | { PIDGIN_STOCK_ICON_AWAY, "icons", "away.png" }, | |
| 73 | { PIDGIN_STOCK_ICON_AWAY_MSG, "icons", "msgpend.png" }, | |
| 74 | { PIDGIN_STOCK_ICON_CONNECT, "icons", "connect.png" }, | |
| 75 | { PIDGIN_STOCK_ICON_OFFLINE, "icons", "offline.png" }, | |
| 76 | { PIDGIN_STOCK_ICON_ONLINE, "icons", "online.png" }, | |
| 77 | { PIDGIN_STOCK_ICON_ONLINE_MSG, "icons", "msgunread.png" }, | |
| 78 | { PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, | |
| 79 | { PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, | |
| 80 | { PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, | |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
81 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 82 | { PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
83 | #else |
| 15570 | 84 | { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
85 | #endif |
| 15570 | 86 | { PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, |
| 87 | { PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, | |
| 88 | { PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, | |
| 89 | { PIDGIN_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, | |
| 90 | { PIDGIN_STOCK_TYPED, "gaim", "typed.png" }, | |
| 91 | { PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, | |
| 10297 | 92 | }; |
| 93 | ||
|
10871
c0282a4f2250
[gaim-migrate @ 12558]
Mark Doliner <markdoliner@pidgin.im>
parents:
10643
diff
changeset
|
94 | static const GtkStockItem stock_items[] = |
| 10297 | 95 | { |
|
15623
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
96 | { PIDGIN_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
97 | { PIDGIN_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
98 | { PIDGIN_STOCK_CLOSE_TABS, N_("Close _tabs"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
99 | { PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, N_("I_M"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
100 | { PIDGIN_STOCK_TOOLBAR_USER_INFO, N_("_Get Info"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
101 | { PIDGIN_STOCK_INVITE, N_("_Invite"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
102 | { PIDGIN_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
103 | { PIDGIN_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
104 | { PIDGIN_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, |
| 10297 | 105 | }; |
| 106 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
107 | static struct SizedStockIcon { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
108 | const char *name; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
109 | const char *dir; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
110 | const char *filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
111 | gboolean extra_small; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
112 | gboolean small; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
113 | gboolean medium; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
114 | gboolean huge; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
115 | } const sized_stock_icons [] = { |
| 15554 | 116 | { PIDGIN_STOCK_STATUS_AVAILABLE, "status", "available.png", TRUE, TRUE, TRUE, FALSE }, |
| 117 | { PIDGIN_STOCK_STATUS_AVAILABLE_I, "status", "available_i.png", TRUE, FALSE, FALSE, FALSE }, | |
| 118 | { PIDGIN_STOCK_STATUS_AWAY, "status", "away.png", TRUE, TRUE, TRUE, FALSE }, | |
| 119 | { PIDGIN_STOCK_STATUS_AWAY_I, "status", "away_i.png", TRUE, FALSE, FALSE, FALSE }, | |
| 15497 | 120 | { PIDGIN_STOCK_STATUS_BUSY, "status", "busy.png", TRUE, TRUE, TRUE, FALSE }, |
| 15554 | 121 | { PIDGIN_STOCK_STATUS_BUSY_I, "status", "busy_i.png", TRUE, FALSE, FALSE, FALSE }, |
| 15497 | 122 | { PIDGIN_STOCK_STATUS_CHAT, "status", "chat.png", TRUE, TRUE, TRUE, FALSE }, |
| 123 | { PIDGIN_STOCK_STATUS_XA, "status", "extended-away.png", TRUE, TRUE, TRUE, FALSE }, | |
| 15554 | 124 | { PIDGIN_STOCK_STATUS_XA_I, "status", "extended-away_i.png",TRUE, FALSE, FALSE, FALSE }, |
| 15497 | 125 | { PIDGIN_STOCK_STATUS_LOGIN, "status", "log-in.png", TRUE, TRUE, TRUE, FALSE }, |
| 126 | { PIDGIN_STOCK_STATUS_LOGOUT, "status", "log-out.png", TRUE, TRUE, TRUE, FALSE }, | |
| 127 | { PIDGIN_STOCK_STATUS_OFFLINE, "status", "offline.png", TRUE, TRUE, TRUE, FALSE }, | |
| 128 | { PIDGIN_STOCK_STATUS_PERSON, "status", "person.png", TRUE, TRUE, TRUE, FALSE }, | |
| 129 | { PIDGIN_STOCK_STATUS_OPERATOR, "status", "operator.png", TRUE, FALSE, FALSE, FALSE }, | |
| 130 | { PIDGIN_STOCK_STATUS_HALFOP, "status", "half-operator.png", TRUE, FALSE, FALSE, FALSE }, | |
|
15559
58a8f57c6970
Restore 'hidden convo' status icon in blist. Additionally, make the name text bold when you have a hidden convo
Sean Egan <seanegan@pidgin.im>
parents:
15554
diff
changeset
|
131 | { PIDGIN_STOCK_STATUS_MESSAGE, "status", "message-pending.png",TRUE, FALSE, FALSE, FALSE }, |
| 15497 | 132 | |
| 133 | { PIDGIN_STOCK_DIALOG_AUTH, "dialogs", "auth.png", TRUE, FALSE, FALSE, TRUE }, | |
| 134 | { PIDGIN_STOCK_DIALOG_COOL, "dialogs", "cool.png", FALSE, FALSE, FALSE, TRUE }, | |
| 135 | { PIDGIN_STOCK_DIALOG_ERROR, "dialogs", "error.png", TRUE, FALSE, FALSE, TRUE }, | |
| 136 | { PIDGIN_STOCK_DIALOG_INFO, "dialogs", "info.png", TRUE, FALSE, FALSE, TRUE }, | |
| 137 | { PIDGIN_STOCK_DIALOG_MAIL, "dialogs", "mail.png", TRUE, FALSE, FALSE, TRUE }, | |
| 138 | { PIDGIN_STOCK_DIALOG_QUESTION, "dialogs", "question.png", TRUE, FALSE, FALSE, TRUE }, | |
| 139 | { PIDGIN_STOCK_DIALOG_WARNING, "dialogs", "warning.png", FALSE, FALSE, FALSE, TRUE }, | |
|
15519
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
140 | |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
141 | { PIDGIN_STOCK_ANIMATION_CONNECT0, "animations", "connect0.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
142 | { PIDGIN_STOCK_ANIMATION_CONNECT1, "animations", "connect1.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
143 | { PIDGIN_STOCK_ANIMATION_CONNECT2, "animations", "connect2.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
144 | { PIDGIN_STOCK_ANIMATION_CONNECT3, "animations", "connect3.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
145 | { PIDGIN_STOCK_ANIMATION_TYPING0, "animations", "typing0.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
146 | { PIDGIN_STOCK_ANIMATION_TYPING1, "animations", "typing1.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
147 | { PIDGIN_STOCK_ANIMATION_TYPING2, "animations", "typing2.png",TRUE, FALSE, FALSE, FALSE }, |
|
82e4cfb65343
Finish converting the statusbox. Note the connecting and animation icons are too large. I put out a request to Hylke.
Sean Egan <seanegan@pidgin.im>
parents:
15500
diff
changeset
|
148 | { PIDGIN_STOCK_ANIMATION_TYPING3, "animations", "typing3.png",TRUE, FALSE, FALSE, FALSE }, |
|
15623
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
149 | |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
150 | { PIDGIN_STOCK_TOOLBAR_ACCOUNTS, "toolbar", "accounts.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
151 | { PIDGIN_STOCK_TOOLBAR_BGCOLOR, "toolbar", "change-bgcolor.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
152 | { PIDGIN_STOCK_TOOLBAR_FGCOLOR, "toolbar", "change-fgcolor.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
153 | { PIDGIN_STOCK_TOOLBAR_SMILEY, "toolbar", "emote-select.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
154 | { PIDGIN_STOCK_TOOLBAR_TEXT_SMALLER, "toolbar", "font-size-down.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
155 | { PIDGIN_STOCK_TOOLBAR_TEXT_LARGER, "toolbar", "font-size-up.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
156 | { PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, "toolbar", "insert-image.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
157 | { PIDGIN_STOCK_TOOLBAR_INSERT_LINK, "toolbar", "insert-link.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
158 | { PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, "toolbar", "message-new.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
159 | { PIDGIN_STOCK_TOOLBAR_PLUGINS, "toolbar", "plugins.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
160 | { PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", TRUE, FALSE, FALSE, FALSE }, |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
161 | { PIDGIN_STOCK_TOOLBAR_PENDING, "status", "message-pending.png", TRUE, FALSE, FALSE, FALSE }, |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
162 | }; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
163 | |
| 10297 | 164 | static gchar * |
| 165 | find_file(const char *dir, const char *base) | |
| 166 | { | |
| 167 | char *filename; | |
| 168 | ||
| 169 | if (base == NULL) | |
| 170 | return NULL; | |
| 171 | ||
| 172 | if (!strcmp(dir, "gaim")) | |
| 173 | filename = g_build_filename(DATADIR, "pixmaps", "gaim", base, NULL); | |
| 174 | else | |
| 175 | { | |
| 176 | filename = g_build_filename(DATADIR, "pixmaps", "gaim", dir, | |
| 177 | base, NULL); | |
| 178 | } | |
| 179 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
180 | return filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
181 | } |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
182 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
183 | static void |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
184 | add_sized_icon(GtkIconSet *iconset, GtkIconSize sizeid, const char *dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
185 | const char *size, const char *file) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
186 | { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
187 | char *filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
188 | GtkIconSource *source; |
| 10297 | 189 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
190 | filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, file, NULL); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
191 | source = gtk_icon_source_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
192 | gtk_icon_source_set_filename(source, filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
193 | gtk_icon_source_set_direction_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
194 | gtk_icon_source_set_size(source, sizeid); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
195 | gtk_icon_source_set_size_wildcarded(source, FALSE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
196 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
197 | gtk_icon_set_add_source(iconset, source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
198 | gtk_icon_source_free(source); |
|
15623
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
199 | |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
200 | if (sizeid == gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)) { |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
201 | source = gtk_icon_source_new(); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
202 | gtk_icon_source_set_filename(source, filename); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
203 | gtk_icon_source_set_direction_wildcarded(source, TRUE); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
204 | gtk_icon_source_set_size(source, GTK_ICON_SIZE_MENU); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
205 | gtk_icon_source_set_size_wildcarded(source, FALSE); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
206 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
207 | gtk_icon_set_add_source(iconset, source); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
208 | gtk_icon_source_free(source); |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
209 | } |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
210 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
211 | g_free(filename); |
| 10297 | 212 | } |
| 213 | ||
| 214 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15559
diff
changeset
|
215 | pidgin_stock_init(void) |
| 10297 | 216 | { |
| 217 | static gboolean stock_initted = FALSE; | |
| 218 | GtkIconFactory *icon_factory; | |
|
12255
f37495b09522
[gaim-migrate @ 14557]
Richard Laager <rlaager@pidgin.im>
parents:
12191
diff
changeset
|
219 | size_t i; |
| 10297 | 220 | GtkWidget *win; |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
221 | GtkIconSize extra_small, small, medium, huge; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
222 | |
| 10297 | 223 | if (stock_initted) |
| 224 | return; | |
| 225 | ||
| 226 | stock_initted = TRUE; | |
| 227 | ||
| 228 | /* Setup the icon factory. */ | |
| 229 | icon_factory = gtk_icon_factory_new(); | |
| 230 | ||
| 231 | gtk_icon_factory_add_default(icon_factory); | |
| 232 | ||
| 233 | /* Er, yeah, a hack, but it works. :) */ | |
| 234 | win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
| 235 | gtk_widget_realize(win); | |
| 236 | ||
| 237 | for (i = 0; i < G_N_ELEMENTS(stock_icons); i++) | |
| 238 | { | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
239 | GtkIconSource *source; |
| 10297 | 240 | GtkIconSet *iconset; |
| 241 | gchar *filename; | |
| 242 | ||
| 243 | if (stock_icons[i].dir == NULL) | |
| 244 | { | |
| 245 | /* GTK+ Stock icon */ | |
| 246 | iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(win), | |
| 247 | stock_icons[i].filename); | |
| 248 | } | |
| 249 | else | |
| 250 | { | |
| 251 | filename = find_file(stock_icons[i].dir, stock_icons[i].filename); | |
| 252 | ||
| 253 | if (filename == NULL) | |
| 254 | continue; | |
| 255 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
256 | source = gtk_icon_source_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
257 | gtk_icon_source_set_filename(source, filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
258 | gtk_icon_source_set_direction_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
259 | gtk_icon_source_set_size_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
260 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
261 | |
| 10297 | 262 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
263 | iconset = gtk_icon_set_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
264 | gtk_icon_set_add_source(iconset, source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
265 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
266 | gtk_icon_source_free(source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
267 | g_free(filename); |
| 10297 | 268 | } |
| 269 | ||
| 270 | gtk_icon_factory_add(icon_factory, stock_icons[i].name, iconset); | |
| 271 | ||
| 272 | gtk_icon_set_unref(iconset); | |
| 273 | } | |
| 274 | ||
| 275 | /* register custom icon sizes */ | |
| 15497 | 276 | extra_small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL, 16, 16); |
| 277 | small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_SMALL, 22, 22); | |
| 278 | medium = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MEDIUM, 32, 32); | |
| 279 | huge = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_HUGE, 64, 64); | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
280 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
281 | for (i = 0; i < G_N_ELEMENTS(sized_stock_icons); i++) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
282 | { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
283 | GtkIconSet *iconset; |
| 10297 | 284 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
285 | iconset = gtk_icon_set_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
286 | if (sized_stock_icons[i].extra_small) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
287 | add_sized_icon(iconset, extra_small, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
288 | sized_stock_icons[i].dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
289 | "16", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
290 | if (sized_stock_icons[i].small) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
291 | add_sized_icon(iconset, small, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
292 | sized_stock_icons[i].dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
293 | "22", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
294 | if (sized_stock_icons[i].medium) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
295 | add_sized_icon(iconset, medium, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
296 | sized_stock_icons[i].dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
297 | "32", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
298 | if (sized_stock_icons[i].huge) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
299 | add_sized_icon(iconset, huge, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
300 | sized_stock_icons[i].dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
301 | "64", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
302 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
303 | gtk_icon_factory_add(icon_factory, sized_stock_icons[i].name, iconset); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
304 | gtk_icon_set_unref(iconset); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
305 | } |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
306 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
307 | gtk_widget_destroy(win); |
| 10297 | 308 | g_object_unref(G_OBJECT(icon_factory)); |
| 309 | ||
| 310 | /* Register the stock items. */ | |
| 311 | gtk_stock_add_static(stock_items, G_N_ELEMENTS(stock_items)); | |
| 312 | } |