Sun, 15 Apr 2007 05:28:07 +0000
The last of the merge fix-ups.
| 10297 | 1 | /** |
|
15930
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
2 | * @file pidginstock.c GTK+ Stock resources |
| 10297 | 3 | * @ingroup gtkui |
| 4 | * | |
|
15930
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
5 | * pidgin |
| 10297 | 6 | * |
|
15930
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
7 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 10297 | 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 | |
|
15883
969b74a3e27a
According to etags, pidgin/ should be completely clean of references to 'gaim' as a client
Sean Egan <seanegan@pidgin.im>
parents:
15834
diff
changeset
|
29 | #include "pidginstock.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_CHAT, NULL, GTK_STOCK_JUMP_TO }, |
| 47 | { PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, | |
| 48 | { PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, | |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
49 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 50 | { PIDGIN_STOCK_CONNECT, NULL, GTK_STOCK_CONNECT }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
51 | #else |
| 15570 | 52 | { PIDGIN_STOCK_CONNECT, "icons", "stock_connect_16.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
53 | #endif |
| 15570 | 54 | { PIDGIN_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES }, |
| 55 | { PIDGIN_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN }, | |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
56 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 57 | { PIDGIN_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
58 | #else |
| 15570 | 59 | { PIDGIN_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
60 | #endif |
| 15570 | 61 | { PIDGIN_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
62 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 63 | { PIDGIN_STOCK_EDIT, NULL, GTK_STOCK_EDIT }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
64 | #else |
| 15570 | 65 | { PIDGIN_STOCK_EDIT, "buttons", "edit.png" }, |
|
11370
3b20dd1aaf22
[gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents:
11271
diff
changeset
|
66 | #endif |
| 15570 | 67 | { PIDGIN_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL }, |
| 68 | { PIDGIN_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY }, | |
| 69 | { PIDGIN_STOCK_FILE_TRANSFER, NULL, GTK_STOCK_REVERT_TO_SAVED }, | |
| 70 | { PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, | |
| 71 | { PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, | |
| 72 | { PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, | |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
73 | #if GTK_CHECK_VERSION(2,6,0) |
| 15570 | 74 | { PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
75 | #else |
| 15570 | 76 | { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" }, |
|
12163
483d8be2deec
[gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents:
12116
diff
changeset
|
77 | #endif |
| 15570 | 78 | { PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, |
| 79 | { PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, | |
| 80 | { PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, | |
| 81 | { PIDGIN_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, | |
|
15930
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
82 | { PIDGIN_STOCK_TYPED, "pidgin", "typed.png" }, |
| 15570 | 83 | { PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, |
| 10297 | 84 | }; |
| 85 | ||
|
10871
c0282a4f2250
[gaim-migrate @ 12558]
Mark Doliner <markdoliner@pidgin.im>
parents:
10643
diff
changeset
|
86 | static const GtkStockItem stock_items[] = |
| 10297 | 87 | { |
|
15623
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
88 | { 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
|
89 | { 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
|
90 | { 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
|
91 | { 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
|
92 | { 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
|
93 | { 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
|
94 | { 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
|
95 | { 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
|
96 | { PIDGIN_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, |
| 10297 | 97 | }; |
| 98 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
99 | static struct SizedStockIcon { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
100 | const char *name; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
101 | const char *dir; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
102 | const char *filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
103 | gboolean extra_small; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
104 | gboolean small; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
105 | gboolean medium; |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
106 | gboolean large; |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
107 | gboolean huge; |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
108 | gboolean rtl; |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
109 | } const sized_stock_icons [] = { |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
110 | { PIDGIN_STOCK_STATUS_AVAILABLE, "status", "available.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
111 | { PIDGIN_STOCK_STATUS_AVAILABLE_I, "status", "available_i.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
112 | { PIDGIN_STOCK_STATUS_AWAY, "status", "away.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
113 | { PIDGIN_STOCK_STATUS_AWAY_I, "status", "away_i.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
114 | { PIDGIN_STOCK_STATUS_BUSY, "status", "busy.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
115 | { PIDGIN_STOCK_STATUS_BUSY_I, "status", "busy_i.png", TRUE, FALSE, FALSE, FALSE, FALSE,FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
116 | { PIDGIN_STOCK_STATUS_CHAT, "status", "chat.png", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
117 | { PIDGIN_STOCK_STATUS_XA, "status", "extended-away.png", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
118 | { PIDGIN_STOCK_STATUS_XA_I, "status", "extended-away_i.png",TRUE, FALSE, FALSE, FALSE, FALSE, TRUE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
119 | { PIDGIN_STOCK_STATUS_LOGIN, "status", "log-in.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
120 | { PIDGIN_STOCK_STATUS_LOGOUT, "status", "log-out.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
121 | { PIDGIN_STOCK_STATUS_OFFLINE, "status", "offline.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
122 | { PIDGIN_STOCK_STATUS_PERSON, "status", "person.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
123 | { PIDGIN_STOCK_STATUS_MESSAGE, "status", "message-pending.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
| 15760 | 124 | |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
125 | { PIDGIN_STOCK_STATUS_IGNORED, "emblems", "blocked.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
126 | { PIDGIN_STOCK_STATUS_FOUNDER, "emblems", "founder.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
127 | { PIDGIN_STOCK_STATUS_OPERATOR, "emblems", "operator.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
128 | { PIDGIN_STOCK_STATUS_HALFOP, "emblems", "half-operator.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
129 | { PIDGIN_STOCK_STATUS_VOICE, "emblems", "voice.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
| 15497 | 130 | |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
131 | { PIDGIN_STOCK_DIALOG_AUTH, "dialogs", "auth.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
132 | { PIDGIN_STOCK_DIALOG_COOL, "dialogs", "cool.png", FALSE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
133 | { PIDGIN_STOCK_DIALOG_ERROR, "dialogs", "error.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
134 | { PIDGIN_STOCK_DIALOG_INFO, "dialogs", "info.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
135 | { PIDGIN_STOCK_DIALOG_MAIL, "dialogs", "mail.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
136 | { PIDGIN_STOCK_DIALOG_QUESTION, "dialogs", "question.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
137 | { PIDGIN_STOCK_DIALOG_WARNING, "dialogs", "warning.png", FALSE, FALSE, FALSE, FALSE, TRUE, FALSE }, |
|
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
|
138 | |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
139 | { PIDGIN_STOCK_ANIMATION_CONNECT0, "animations", "connect0.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
140 | { PIDGIN_STOCK_ANIMATION_CONNECT1, "animations", "connect1.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
141 | { PIDGIN_STOCK_ANIMATION_CONNECT2, "animations", "connect2.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
142 | { PIDGIN_STOCK_ANIMATION_CONNECT3, "animations", "connect3.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
143 | { PIDGIN_STOCK_ANIMATION_CONNECT4, "animations", "connect4.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
144 | { PIDGIN_STOCK_ANIMATION_CONNECT5, "animations", "connect5.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
145 | { PIDGIN_STOCK_ANIMATION_CONNECT6, "animations", "connect6.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
146 | { PIDGIN_STOCK_ANIMATION_CONNECT7, "animations", "connect7.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
147 | { PIDGIN_STOCK_ANIMATION_CONNECT8, "animations", "connect8.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
148 | { PIDGIN_STOCK_ANIMATION_TYPING0, "animations", "typing0.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
149 | { PIDGIN_STOCK_ANIMATION_TYPING1, "animations", "typing1.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
150 | { PIDGIN_STOCK_ANIMATION_TYPING2, "animations", "typing2.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
151 | { PIDGIN_STOCK_ANIMATION_TYPING3, "animations", "typing3.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
152 | { PIDGIN_STOCK_ANIMATION_TYPING4, "animations", "typing4.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
15623
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
153 | |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
154 | { PIDGIN_STOCK_TOOLBAR_ACCOUNTS, "toolbar", "accounts.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
155 | { PIDGIN_STOCK_TOOLBAR_BGCOLOR, "toolbar", "change-bgcolor.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
16068
b1dac315ed09
block and unblock have the right icons now
Nathan Walp <nwalp@pidgin.im>
parents:
15930
diff
changeset
|
156 | { PIDGIN_STOCK_TOOLBAR_BLOCK, "emblems", "blocked.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
157 | { PIDGIN_STOCK_TOOLBAR_FGCOLOR, "toolbar", "change-fgcolor.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
158 | { PIDGIN_STOCK_TOOLBAR_SMILEY, "toolbar", "emote-select.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
159 | { PIDGIN_STOCK_TOOLBAR_TEXT_SMALLER, "toolbar", "font-size-down.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
160 | { PIDGIN_STOCK_TOOLBAR_TEXT_LARGER, "toolbar", "font-size-up.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
161 | { PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, "toolbar", "insert-image.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
162 | { PIDGIN_STOCK_TOOLBAR_INSERT_LINK, "toolbar", "insert-link.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
163 | { PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, "toolbar", "message-new.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
16068
b1dac315ed09
block and unblock have the right icons now
Nathan Walp <nwalp@pidgin.im>
parents:
15930
diff
changeset
|
164 | { PIDGIN_STOCK_TOOLBAR_PENDING, "status", "message-pending.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
165 | { PIDGIN_STOCK_TOOLBAR_PLUGINS, "toolbar", "plugins.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
166 | { PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
16068
b1dac315ed09
block and unblock have the right icons now
Nathan Walp <nwalp@pidgin.im>
parents:
15930
diff
changeset
|
167 | { PIDGIN_STOCK_TOOLBAR_UNBLOCK, "toolbar", "unblock.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, |
|
b1dac315ed09
block and unblock have the right icons now
Nathan Walp <nwalp@pidgin.im>
parents:
15930
diff
changeset
|
168 | |
|
15834
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
169 | { PIDGIN_STOCK_TRAY_AVAILABLE, "tray", "tray-online.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, |
|
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
170 | { PIDGIN_STOCK_TRAY_AWAY, "tray", "tray-away.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, |
|
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
171 | { PIDGIN_STOCK_TRAY_BUSY, "tray", "tray-busy.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, |
|
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
172 | { PIDGIN_STOCK_TRAY_XA, "tray", "tray-extended-away.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, |
|
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
173 | { PIDGIN_STOCK_TRAY_OFFLINE, "tray", "tray-offline.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, |
|
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
174 | { PIDGIN_STOCK_TRAY_CONNECT, "tray", "tray-connecting.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, |
|
ba09306a7b0a
16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes.
Sean Egan <seanegan@pidgin.im>
parents:
15792
diff
changeset
|
175 | { PIDGIN_STOCK_TRAY_PENDING, "tray", "tray-message.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE } |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
176 | }; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
177 | |
| 10297 | 178 | static gchar * |
| 179 | find_file(const char *dir, const char *base) | |
| 180 | { | |
| 181 | char *filename; | |
| 182 | ||
| 183 | if (base == NULL) | |
| 184 | return NULL; | |
| 185 | ||
|
15930
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
186 | if (!strcmp(dir, "pidgin")) |
|
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
187 | filename = g_build_filename(DATADIR, "pixmaps", "pidgin", base, NULL); |
| 10297 | 188 | else |
| 189 | { | |
|
15930
d851247cb931
Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents:
15914
diff
changeset
|
190 | filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, |
| 10297 | 191 | base, NULL); |
| 192 | } | |
| 193 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
194 | return filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
195 | } |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
196 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
197 | static void |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
198 | add_sized_icon(GtkIconSet *iconset, GtkIconSize sizeid, const char *dir, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
199 | gboolean rtl, const char *size, const char *file) |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
200 | { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
201 | char *filename; |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
202 | GtkIconSource *source; |
| 10297 | 203 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
204 | 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
|
205 | source = gtk_icon_source_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
206 | gtk_icon_source_set_filename(source, filename); |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
207 | gtk_icon_source_set_direction(source, GTK_TEXT_DIR_LTR); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
208 | gtk_icon_source_set_direction_wildcarded(source, !rtl); |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
209 | gtk_icon_source_set_size(source, sizeid); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
210 | gtk_icon_source_set_size_wildcarded(source, FALSE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
211 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
212 | gtk_icon_set_add_source(iconset, source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
213 | 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
|
214 | |
|
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
215 | 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
|
216 | 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
|
217 | 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
|
218 | 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
|
219 | 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
|
220 | 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
|
221 | 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
|
222 | 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
|
223 | 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
|
224 | } |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
225 | g_free(filename); |
|
15623
bf485c598199
toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents:
15577
diff
changeset
|
226 | |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
227 | if (rtl) { |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
228 | filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, "rtl", file, NULL); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
229 | source = gtk_icon_source_new(); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
230 | gtk_icon_source_set_filename(source, filename); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
231 | gtk_icon_source_set_direction(source, GTK_TEXT_DIR_RTL); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
232 | gtk_icon_source_set_size(source, sizeid); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
233 | gtk_icon_source_set_size_wildcarded(source, FALSE); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
234 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
235 | gtk_icon_set_add_source(iconset, source); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
236 | g_free(filename); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
237 | gtk_icon_source_free(source); |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
238 | } |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
239 | |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
240 | |
| 10297 | 241 | } |
| 242 | ||
| 243 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15559
diff
changeset
|
244 | pidgin_stock_init(void) |
| 10297 | 245 | { |
| 246 | static gboolean stock_initted = FALSE; | |
| 247 | GtkIconFactory *icon_factory; | |
|
12255
f37495b09522
[gaim-migrate @ 14557]
Richard Laager <rlaager@pidgin.im>
parents:
12191
diff
changeset
|
248 | size_t i; |
| 10297 | 249 | GtkWidget *win; |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
250 | GtkIconSize extra_small, small, medium, large, huge; |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
251 | |
| 10297 | 252 | if (stock_initted) |
| 253 | return; | |
| 254 | ||
| 255 | stock_initted = TRUE; | |
| 256 | ||
| 257 | /* Setup the icon factory. */ | |
| 258 | icon_factory = gtk_icon_factory_new(); | |
| 259 | ||
| 260 | gtk_icon_factory_add_default(icon_factory); | |
| 261 | ||
| 262 | /* Er, yeah, a hack, but it works. :) */ | |
| 263 | win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
| 264 | gtk_widget_realize(win); | |
| 265 | ||
| 266 | for (i = 0; i < G_N_ELEMENTS(stock_icons); i++) | |
| 267 | { | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
268 | GtkIconSource *source; |
| 10297 | 269 | GtkIconSet *iconset; |
| 270 | gchar *filename; | |
| 271 | ||
| 272 | if (stock_icons[i].dir == NULL) | |
| 273 | { | |
| 274 | /* GTK+ Stock icon */ | |
| 275 | iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(win), | |
| 276 | stock_icons[i].filename); | |
| 277 | } | |
| 278 | else | |
| 279 | { | |
| 280 | filename = find_file(stock_icons[i].dir, stock_icons[i].filename); | |
| 281 | ||
| 282 | if (filename == NULL) | |
| 283 | continue; | |
| 284 | ||
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
285 | source = gtk_icon_source_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
286 | gtk_icon_source_set_filename(source, filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
287 | gtk_icon_source_set_direction_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
288 | gtk_icon_source_set_size_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
289 | gtk_icon_source_set_state_wildcarded(source, TRUE); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
290 | |
| 10297 | 291 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
292 | iconset = gtk_icon_set_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
293 | gtk_icon_set_add_source(iconset, source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
294 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
295 | gtk_icon_source_free(source); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
296 | g_free(filename); |
| 10297 | 297 | } |
| 298 | ||
| 299 | gtk_icon_factory_add(icon_factory, stock_icons[i].name, iconset); | |
| 300 | ||
| 301 | gtk_icon_set_unref(iconset); | |
| 302 | } | |
| 303 | ||
| 304 | /* register custom icon sizes */ | |
| 15497 | 305 | extra_small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL, 16, 16); |
| 306 | small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_SMALL, 22, 22); | |
| 307 | medium = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MEDIUM, 32, 32); | |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
308 | large = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_LARGE, 48, 48); |
| 15497 | 309 | 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
|
310 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
311 | 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
|
312 | { |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
313 | GtkIconSet *iconset; |
| 10297 | 314 | |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
315 | iconset = gtk_icon_set_new(); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
316 | if (sized_stock_icons[i].extra_small) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
317 | add_sized_icon(iconset, extra_small, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
318 | sized_stock_icons[i].dir, sized_stock_icons[i].rtl, |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
319 | "16", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
320 | if (sized_stock_icons[i].small) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
321 | add_sized_icon(iconset, small, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
322 | sized_stock_icons[i].dir, sized_stock_icons[i].rtl, |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
323 | "22", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
324 | if (sized_stock_icons[i].medium) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
325 | add_sized_icon(iconset, medium, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
326 | sized_stock_icons[i].dir, sized_stock_icons[i].rtl, |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
327 | "32", sized_stock_icons[i].filename); |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
328 | if (sized_stock_icons[i].large) |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
329 | add_sized_icon(iconset, large, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
330 | sized_stock_icons[i].dir, sized_stock_icons[i].rtl, |
|
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
331 | "48", sized_stock_icons[i].filename); |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
332 | if (sized_stock_icons[i].huge) |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
333 | add_sized_icon(iconset, huge, |
|
15792
862d8eb17606
make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents:
15774
diff
changeset
|
334 | sized_stock_icons[i].dir, sized_stock_icons[i].rtl, |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
335 | "64", sized_stock_icons[i].filename); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
336 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
337 | 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
|
338 | gtk_icon_set_unref(iconset); |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
339 | } |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
340 | |
|
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
341 | gtk_widget_destroy(win); |
| 10297 | 342 | g_object_unref(G_OBJECT(icon_factory)); |
| 343 | ||
| 344 | /* Register the stock items. */ | |
| 345 | gtk_stock_add_static(stock_items, G_N_ELEMENTS(stock_items)); | |
| 346 | } |