Sat, 03 Feb 2007 00:59:00 +0000
Restore 'hidden convo' status icon in blist. Additionally, make the name text bold when you have a hidden convo
| 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" | |
| 27 | #include "gtkgaim.h" | |
| 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 | { | |
| 39 | { GAIM_STOCK_ABOUT, "buttons", "about_menu.png" }, | |
| 40 | { GAIM_STOCK_ACCOUNTS, "buttons", "accounts.png" }, | |
|
12191
327f2d9ceaa7
[gaim-migrate @ 14493]
Richard Laager <rlaager@pidgin.im>
parents:
12170
diff
changeset
|
41 | { GAIM_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
42 | #if GTK_CHECK_VERSION(2,6,0) |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
43 | { GAIM_STOCK_ALIAS, NULL, GTK_STOCK_EDIT }, |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
44 | #else |
| 10297 | 45 | { GAIM_STOCK_ALIAS, "buttons", "edit.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
46 | #endif |
| 10297 | 47 | { GAIM_STOCK_BGCOLOR, "buttons", "change-bgcolor-small.png" }, |
| 48 | { GAIM_STOCK_BLOCK, NULL, GTK_STOCK_STOP }, | |
|
15486
06bb8277e42c
Warmenhoved patch #1397916: "Turns Block button in conv menu into Unblock after blocking" from Glauber de Oliveira Costa (glommer). You know the drill.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15458
diff
changeset
|
49 | { GAIM_STOCK_UNBLOCK, NULL, GTK_STOCK_STOP /* XXX: */ }, |
| 10297 | 50 | { GAIM_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
51 | { GAIM_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, |
|
12660
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
52 | { GAIM_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
53 | #if GTK_CHECK_VERSION(2,6,0) |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
54 | { GAIM_STOCK_CONNECT, NULL, GTK_STOCK_CONNECT }, |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
55 | #else |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
56 | { GAIM_STOCK_CONNECT, "icons", "stock_connect_16.png" }, |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
57 | #endif |
|
12191
327f2d9ceaa7
[gaim-migrate @ 14493]
Richard Laager <rlaager@pidgin.im>
parents:
12170
diff
changeset
|
58 | { GAIM_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES }, |
| 10297 | 59 | { GAIM_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
60 | #if GTK_CHECK_VERSION(2,6,0) |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
61 | { GAIM_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT }, |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
62 | #else |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
63 | { GAIM_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" }, |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
64 | #endif |
| 10297 | 65 | { GAIM_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
66 | #if GTK_CHECK_VERSION(2,6,0) |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
67 | { GAIM_STOCK_EDIT, NULL, GTK_STOCK_EDIT }, |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
68 | #else |
| 10297 | 69 | { GAIM_STOCK_EDIT, "buttons", "edit.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
70 | #endif |
| 10297 | 71 | { GAIM_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL }, |
| 72 | { GAIM_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY }, | |
| 73 | { GAIM_STOCK_FILE_TRANSFER, NULL, GTK_STOCK_REVERT_TO_SAVED }, | |
| 74 | { GAIM_STOCK_ICON_AWAY, "icons", "away.png" }, | |
| 75 | { GAIM_STOCK_ICON_AWAY_MSG, "icons", "msgpend.png" }, | |
| 76 | { GAIM_STOCK_ICON_CONNECT, "icons", "connect.png" }, | |
| 77 | { GAIM_STOCK_ICON_OFFLINE, "icons", "offline.png" }, | |
| 78 | { GAIM_STOCK_ICON_ONLINE, "icons", "online.png" }, | |
| 79 | { GAIM_STOCK_ICON_ONLINE_MSG, "icons", "msgunread.png" }, | |
| 80 | { GAIM_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, | |
|
11271
939be1fdbf7a
[gaim-migrate @ 13454]
Richard Laager <rlaager@pidgin.im>
parents:
10871
diff
changeset
|
81 | { GAIM_STOCK_IM, "buttons", "send-im.png" }, |
| 10297 | 82 | { GAIM_STOCK_IMAGE, "buttons", "insert-image-small.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
83 | #if GTK_CHECK_VERSION(2,8,0) |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
84 | { GAIM_STOCK_INFO, NULL, GTK_STOCK_INFO }, |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
85 | #else |
|
12255
f37495b09522
[gaim-migrate @ 14557]
Richard Laager <rlaager@pidgin.im>
parents:
12191
diff
changeset
|
86 | { GAIM_STOCK_INFO, "buttons", "info.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
87 | #endif |
| 10297 | 88 | { GAIM_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, |
| 89 | { GAIM_STOCK_LINK, "buttons", "insert-link-small.png" }, | |
|
12191
327f2d9ceaa7
[gaim-migrate @ 14493]
Richard Laager <rlaager@pidgin.im>
parents:
12170
diff
changeset
|
90 | { GAIM_STOCK_LOG, NULL, GTK_STOCK_DND_MULTIPLE }, |
| 10297 | 91 | { GAIM_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
92 | #if GTK_CHECK_VERSION(2,6,0) |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
93 | { GAIM_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, |
|
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
94 | #else |
| 10297 | 95 | { GAIM_STOCK_PAUSE, "buttons", "pause.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
96 | #endif |
|
12170
4e11db0b6afd
[gaim-migrate @ 14471]
Richard Laager <rlaager@pidgin.im>
parents:
12163
diff
changeset
|
97 | { GAIM_STOCK_PENDING, "buttons", "send-im.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
98 | #if GTK_CHECK_VERSION(2,6,0) |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
99 | { GAIM_STOCK_PLUGIN, NULL, GTK_STOCK_DISCONNECT }, |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
100 | #else |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
101 | { GAIM_STOCK_PLUGIN, "icons", "stock_disconnect_16.png" }, |
|
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
102 | #endif |
|
12191
327f2d9ceaa7
[gaim-migrate @ 14493]
Richard Laager <rlaager@pidgin.im>
parents:
12170
diff
changeset
|
103 | { GAIM_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, |
| 10297 | 104 | { GAIM_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, |
| 105 | { GAIM_STOCK_SEND, "buttons", "send-im.png" }, | |
| 106 | { GAIM_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, | |
| 107 | { GAIM_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, | |
| 108 | { GAIM_STOCK_SMILEY, "buttons", "insert-smiley-small.png" }, | |
| 109 | { GAIM_STOCK_TEXT_BIGGER, "buttons", "text_bigger.png" }, | |
| 110 | { GAIM_STOCK_TEXT_NORMAL, "buttons", "text_normal.png" }, | |
| 111 | { GAIM_STOCK_TEXT_SMALLER, "buttons", "text_smaller.png" }, | |
| 112 | { GAIM_STOCK_TYPED, "gaim", "typed.png" }, | |
| 113 | { GAIM_STOCK_TYPING, "gaim", "typing.png" }, | |
| 12024 | 114 | { GAIM_STOCK_VOICE_CHAT, "gaim", "phone.png" }, |
| 10643 | 115 | { GAIM_STOCK_STATUS_INVISIBLE,"gaim", "status-invisible.png" }, |
| 116 | { GAIM_STOCK_STATUS_TYPING0, "gaim", "status-typing0.png" }, | |
| 117 | { GAIM_STOCK_STATUS_TYPING1, "gaim", "status-typing1.png" }, | |
| 118 | { GAIM_STOCK_STATUS_TYPING2, "gaim", "status-typing2.png" }, | |
| 119 | { GAIM_STOCK_STATUS_TYPING3, "gaim", "status-typing3.png" }, | |
| 120 | { GAIM_STOCK_STATUS_CONNECT0, "gaim", "status-connect0.png" }, | |
| 121 | { GAIM_STOCK_STATUS_CONNECT1, "gaim", "status-connect1.png" }, | |
| 122 | { GAIM_STOCK_STATUS_CONNECT2, "gaim", "status-connect2.png" }, | |
| 123 | { GAIM_STOCK_STATUS_CONNECT3, "gaim", "status-connect3.png" }, | |
| 14471 | 124 | { GAIM_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, |
| 10297 | 125 | }; |
| 126 | ||
|
10871
c0282a4f2250
[gaim-migrate @ 12558]
Mark Doliner <markdoliner@pidgin.im>
parents:
10643
diff
changeset
|
127 | static const GtkStockItem stock_items[] = |
| 10297 | 128 | { |
|
12660
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
129 | { GAIM_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
130 | { GAIM_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
131 | { GAIM_STOCK_CLOSE_TABS, N_("Close _tabs"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
132 | { GAIM_STOCK_IM, N_("I_M"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
133 | { GAIM_STOCK_INFO, N_("_Get Info"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
134 | { GAIM_STOCK_INVITE, N_("_Invite"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
135 | { GAIM_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
136 | { GAIM_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, |
|
3e9413c9162e
[gaim-migrate @ 15003]
Mark Doliner <markdoliner@pidgin.im>
parents:
12624
diff
changeset
|
137 | { GAIM_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, |
| 10297 | 138 | }; |
| 139 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
140 | static struct SizedStockIcon { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
141 | const char *name; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
142 | const char *dir; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
143 | const char *filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
144 | gboolean extra_small; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
145 | gboolean small; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
146 | gboolean medium; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
147 | gboolean huge; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
148 | } const sized_stock_icons [] = { |
| 15554 | 149 | { PIDGIN_STOCK_STATUS_AVAILABLE, "status", "available.png", TRUE, TRUE, TRUE, FALSE }, |
| 150 | { PIDGIN_STOCK_STATUS_AVAILABLE_I, "status", "available_i.png", TRUE, FALSE, FALSE, FALSE }, | |
| 151 | { PIDGIN_STOCK_STATUS_AWAY, "status", "away.png", TRUE, TRUE, TRUE, FALSE }, | |
| 152 | { PIDGIN_STOCK_STATUS_AWAY_I, "status", "away_i.png", TRUE, FALSE, FALSE, FALSE }, | |
| 15497 | 153 | { PIDGIN_STOCK_STATUS_BUSY, "status", "busy.png", TRUE, TRUE, TRUE, FALSE }, |
| 15554 | 154 | { PIDGIN_STOCK_STATUS_BUSY_I, "status", "busy_i.png", TRUE, FALSE, FALSE, FALSE }, |
| 15497 | 155 | { PIDGIN_STOCK_STATUS_CHAT, "status", "chat.png", TRUE, TRUE, TRUE, FALSE }, |
| 156 | { PIDGIN_STOCK_STATUS_XA, "status", "extended-away.png", TRUE, TRUE, TRUE, FALSE }, | |
| 15554 | 157 | { PIDGIN_STOCK_STATUS_XA_I, "status", "extended-away_i.png",TRUE, FALSE, FALSE, FALSE }, |
| 15497 | 158 | { PIDGIN_STOCK_STATUS_LOGIN, "status", "log-in.png", TRUE, TRUE, TRUE, FALSE }, |
| 159 | { PIDGIN_STOCK_STATUS_LOGOUT, "status", "log-out.png", TRUE, TRUE, TRUE, FALSE }, | |
| 160 | { PIDGIN_STOCK_STATUS_OFFLINE, "status", "offline.png", TRUE, TRUE, TRUE, FALSE }, | |
| 161 | { PIDGIN_STOCK_STATUS_PERSON, "status", "person.png", TRUE, TRUE, TRUE, FALSE }, | |
| 162 | { PIDGIN_STOCK_STATUS_OPERATOR, "status", "operator.png", TRUE, FALSE, FALSE, FALSE }, | |
| 163 | { 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
|
164 | { PIDGIN_STOCK_STATUS_MESSAGE, "status", "message-pending.png",TRUE, FALSE, FALSE, FALSE }, |
| 15497 | 165 | |
| 166 | { PIDGIN_STOCK_DIALOG_AUTH, "dialogs", "auth.png", TRUE, FALSE, FALSE, TRUE }, | |
| 167 | { PIDGIN_STOCK_DIALOG_COOL, "dialogs", "cool.png", FALSE, FALSE, FALSE, TRUE }, | |
| 168 | { PIDGIN_STOCK_DIALOG_ERROR, "dialogs", "error.png", TRUE, FALSE, FALSE, TRUE }, | |
| 169 | { PIDGIN_STOCK_DIALOG_INFO, "dialogs", "info.png", TRUE, FALSE, FALSE, TRUE }, | |
| 170 | { PIDGIN_STOCK_DIALOG_MAIL, "dialogs", "mail.png", TRUE, FALSE, FALSE, TRUE }, | |
| 171 | { PIDGIN_STOCK_DIALOG_QUESTION, "dialogs", "question.png", TRUE, FALSE, FALSE, TRUE }, | |
| 172 | { 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
|
173 | |
|
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
|
174 | { 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
|
175 | { 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
|
176 | { 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
|
177 | { 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
|
178 | { 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
|
179 | { 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
|
180 | { 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
|
181 | { PIDGIN_STOCK_ANIMATION_TYPING3, "animations", "typing3.png",TRUE, FALSE, FALSE, FALSE }, |
|
15458
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 | |
| 10297 | 184 | static gchar * |
| 185 | find_file(const char *dir, const char *base) | |
| 186 | { | |
| 187 | char *filename; | |
| 188 | ||
| 189 | if (base == NULL) | |
| 190 | return NULL; | |
| 191 | ||
| 192 | if (!strcmp(dir, "gaim")) | |
| 193 | filename = g_build_filename(DATADIR, "pixmaps", "gaim", base, NULL); | |
| 194 | else | |
| 195 | { | |
| 196 | filename = g_build_filename(DATADIR, "pixmaps", "gaim", dir, | |
| 197 | base, NULL); | |
| 198 | } | |
| 199 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
200 | return filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
201 | } |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
202 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
203 | static void |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
204 | 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
|
205 | const char *size, const char *file) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
206 | { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
207 | char *filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
208 | GtkIconSource *source; |
| 10297 | 209 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
210 | 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
|
211 | source = gtk_icon_source_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
212 | gtk_icon_source_set_filename(source, filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
213 | gtk_icon_source_set_direction_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
214 | gtk_icon_source_set_size(source, sizeid); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
215 | gtk_icon_source_set_size_wildcarded(source, FALSE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
216 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
217 | gtk_icon_set_add_source(iconset, source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
218 | gtk_icon_source_free(source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
219 | g_free(filename); |
| 10297 | 220 | } |
| 221 | ||
| 222 | void | |
| 223 | gaim_gtk_stock_init(void) | |
| 224 | { | |
| 225 | static gboolean stock_initted = FALSE; | |
| 226 | GtkIconFactory *icon_factory; | |
|
12255
f37495b09522
[gaim-migrate @ 14557]
Richard Laager <rlaager@pidgin.im>
parents:
12191
diff
changeset
|
227 | size_t i; |
| 10297 | 228 | GtkWidget *win; |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
229 | GtkIconSize extra_small, small, medium, huge; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
230 | |
| 10297 | 231 | if (stock_initted) |
| 232 | return; | |
| 233 | ||
| 234 | stock_initted = TRUE; | |
| 235 | ||
| 236 | /* Setup the icon factory. */ | |
| 237 | icon_factory = gtk_icon_factory_new(); | |
| 238 | ||
| 239 | gtk_icon_factory_add_default(icon_factory); | |
| 240 | ||
| 241 | /* Er, yeah, a hack, but it works. :) */ | |
| 242 | win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
| 243 | gtk_widget_realize(win); | |
| 244 | ||
| 245 | for (i = 0; i < G_N_ELEMENTS(stock_icons); i++) | |
| 246 | { | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
247 | GtkIconSource *source; |
| 10297 | 248 | GtkIconSet *iconset; |
| 249 | gchar *filename; | |
| 250 | ||
| 251 | if (stock_icons[i].dir == NULL) | |
| 252 | { | |
| 253 | /* GTK+ Stock icon */ | |
| 254 | iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(win), | |
| 255 | stock_icons[i].filename); | |
| 256 | } | |
| 257 | else | |
| 258 | { | |
| 259 | filename = find_file(stock_icons[i].dir, stock_icons[i].filename); | |
| 260 | ||
| 261 | if (filename == NULL) | |
| 262 | continue; | |
| 263 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
264 | source = gtk_icon_source_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
265 | gtk_icon_source_set_filename(source, filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
266 | gtk_icon_source_set_direction_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
267 | gtk_icon_source_set_size_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
268 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
269 | |
| 10297 | 270 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
271 | iconset = gtk_icon_set_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
272 | gtk_icon_set_add_source(iconset, source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
273 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
274 | gtk_icon_source_free(source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
275 | g_free(filename); |
| 10297 | 276 | } |
| 277 | ||
| 278 | gtk_icon_factory_add(icon_factory, stock_icons[i].name, iconset); | |
| 279 | ||
| 280 | gtk_icon_set_unref(iconset); | |
| 281 | } | |
| 282 | ||
| 283 | /* register custom icon sizes */ | |
| 15497 | 284 | extra_small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL, 16, 16); |
| 285 | small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_SMALL, 22, 22); | |
| 286 | medium = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MEDIUM, 32, 32); | |
| 287 | 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
|
288 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
289 | 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
|
290 | { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
291 | GtkIconSet *iconset; |
| 10297 | 292 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
293 | iconset = gtk_icon_set_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
294 | if (sized_stock_icons[i].extra_small) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
295 | add_sized_icon(iconset, extra_small, |
|
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 | "16", 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].small) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
299 | add_sized_icon(iconset, small, |
|
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 | "22", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
302 | if (sized_stock_icons[i].medium) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
303 | add_sized_icon(iconset, medium, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
304 | sized_stock_icons[i].dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
305 | "32", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
306 | if (sized_stock_icons[i].huge) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
307 | add_sized_icon(iconset, huge, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
308 | sized_stock_icons[i].dir, |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
309 | "64", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
310 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
311 | 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
|
312 | gtk_icon_set_unref(iconset); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
313 | } |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
314 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
315 | gtk_widget_destroy(win); |
| 10297 | 316 | g_object_unref(G_OBJECT(icon_factory)); |
| 317 | ||
| 318 | /* Register the stock items. */ | |
| 319 | gtk_stock_add_static(stock_items, G_N_ELEMENTS(stock_items)); | |
| 320 | } |