pidgin/pidginstock.c

Sat, 19 May 2007 21:38:47 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Sat, 19 May 2007 21:38:47 +0000
changeset 18068
b6554e3c8224
parent 14623
gtk/gaimstock.c@046a118a3b04
parent 16881
gtk/gaimstock.c@e6bca9e3d85c
permissions
-rw-r--r--

merge of '1442df274a24edc9a31194327bd00dfbcf478720'
and 'ce02548a6b6a545d97fb3f371506bcf1b5cc5131'

10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
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
16254
eeb2bba4dc94 Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents: 16068
diff changeset
3 * @ingroup pidgin
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
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
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
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
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
9 * source distribution.
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
10 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
15 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
20 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
24 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
25 */
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
26 #include "internal.h"
15577
b8129373f65e More pidgin changes
Sean Egan <seanegan@pidgin.im>
parents: 15570
diff changeset
27 #include "pidgin.h"
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
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
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
30
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
31 static struct StockIcon
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
32 {
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
33 const char *name;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
34 const char *dir;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
35 const char *filename;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
36
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
37 } const stock_icons[] =
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
38 {
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
39 { PIDGIN_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE },
11370
3b20dd1aaf22 [gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents: 11271
diff changeset
40 #if GTK_CHECK_VERSION(2,6,0)
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
41 { PIDGIN_STOCK_ALIAS, NULL, GTK_STOCK_EDIT },
11370
3b20dd1aaf22 [gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents: 11271
diff changeset
42 #else
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
43 { PIDGIN_STOCK_ALIAS, "buttons", "edit.png" },
11370
3b20dd1aaf22 [gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents: 11271
diff changeset
44 #endif
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
45 { PIDGIN_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
46 { PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
47 { PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
48 { PIDGIN_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
49 { PIDGIN_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN },
12163
483d8be2deec [gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents: 12116
diff changeset
50 #if GTK_CHECK_VERSION(2,6,0)
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
51 { PIDGIN_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT },
12163
483d8be2deec [gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents: 12116
diff changeset
52 #else
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
53 { PIDGIN_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" },
12163
483d8be2deec [gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents: 12116
diff changeset
54 #endif
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
55 { PIDGIN_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" },
11370
3b20dd1aaf22 [gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents: 11271
diff changeset
56 #if GTK_CHECK_VERSION(2,6,0)
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
57 { PIDGIN_STOCK_EDIT, NULL, GTK_STOCK_EDIT },
11370
3b20dd1aaf22 [gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents: 11271
diff changeset
58 #else
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
59 { PIDGIN_STOCK_EDIT, "buttons", "edit.png" },
11370
3b20dd1aaf22 [gaim-migrate @ 13595]
Richard Laager <rlaager@pidgin.im>
parents: 11271
diff changeset
60 #endif
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
61 { PIDGIN_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
62 { PIDGIN_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
63 { PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
64 { PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
65 { PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES },
12163
483d8be2deec [gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents: 12116
diff changeset
66 #if GTK_CHECK_VERSION(2,6,0)
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
67 { PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE },
12163
483d8be2deec [gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents: 12116
diff changeset
68 #else
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
69 { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" },
12163
483d8be2deec [gaim-migrate @ 14464]
Richard Laager <rlaager@pidgin.im>
parents: 12116
diff changeset
70 #endif
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
71 { PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
72 { PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
73 { PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE },
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
74 { 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
75 { PIDGIN_STOCK_TYPED, "pidgin", "typed.png" },
15570
81e9b7d13875 stock to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
76 { PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP },
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
77 };
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
78
10871
c0282a4f2250 [gaim-migrate @ 12558]
Mark Doliner <markdoliner@pidgin.im>
parents: 10643
diff changeset
79 static const GtkStockItem stock_items[] =
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
80 {
15623
bf485c598199 toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents: 15577
diff changeset
81 { 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
82 { 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
83 { 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
84 { 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
85 { 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
86 { 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
87 { 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
88 { 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
89 { PIDGIN_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL },
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
90 };
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
91
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
92 static struct SizedStockIcon {
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
93 const char *name;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
94 const char *dir;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
95 const char *filename;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
96 gboolean extra_small;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
97 gboolean small;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
98 gboolean medium;
15792
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
99 gboolean large;
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
100 gboolean huge;
15792
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
101 gboolean rtl;
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
102 const char *translucent_name;
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
103 } const sized_stock_icons [] = {
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
104 { PIDGIN_STOCK_STATUS_AVAILABLE, "status", "available.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, PIDGIN_STOCK_STATUS_AVAILABLE_I },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
105 { PIDGIN_STOCK_STATUS_AWAY, "status", "away.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, PIDGIN_STOCK_STATUS_AWAY_I },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
106 { PIDGIN_STOCK_STATUS_BUSY, "status", "busy.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, PIDGIN_STOCK_STATUS_BUSY_I },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
107 { PIDGIN_STOCK_STATUS_CHAT, "status", "chat.png", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
108 { PIDGIN_STOCK_STATUS_INVISIBLE,"status", "invisible.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
109 { PIDGIN_STOCK_STATUS_XA, "status", "extended-away.png", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, PIDGIN_STOCK_STATUS_XA_I },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
110 { PIDGIN_STOCK_STATUS_LOGIN, "status", "log-in.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
111 { PIDGIN_STOCK_STATUS_LOGOUT, "status", "log-out.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE , NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
112 { PIDGIN_STOCK_STATUS_OFFLINE, "status", "offline.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
113 { PIDGIN_STOCK_STATUS_PERSON, "status", "person.png", TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
114 { PIDGIN_STOCK_STATUS_MESSAGE, "status", "message-pending.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
15760
209681319cac docklet pending status
Sean Egan <seanegan@pidgin.im>
parents: 15739
diff changeset
115
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
116 { PIDGIN_STOCK_STATUS_IGNORED, "emblems", "blocked.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
117 { PIDGIN_STOCK_STATUS_FOUNDER, "emblems", "founder.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
118 { PIDGIN_STOCK_STATUS_OPERATOR, "emblems", "operator.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
119 { PIDGIN_STOCK_STATUS_HALFOP, "emblems", "half-operator.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
120 { PIDGIN_STOCK_STATUS_VOICE, "emblems", "voice.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
15497
92f02f4bd5ee Dialog icon changes
Sean Egan <seanegan@pidgin.im>
parents: 15458
diff changeset
121
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
122 { PIDGIN_STOCK_DIALOG_AUTH, "dialogs", "auth.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
123 { PIDGIN_STOCK_DIALOG_COOL, "dialogs", "cool.png", FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
124 { PIDGIN_STOCK_DIALOG_ERROR, "dialogs", "error.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
125 { PIDGIN_STOCK_DIALOG_INFO, "dialogs", "info.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
126 { PIDGIN_STOCK_DIALOG_MAIL, "dialogs", "mail.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
127 { PIDGIN_STOCK_DIALOG_QUESTION, "dialogs", "question.png", TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
128 { PIDGIN_STOCK_DIALOG_WARNING, "dialogs", "warning.png", FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, NULL },
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
129
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
130 { PIDGIN_STOCK_ANIMATION_CONNECT0, "animations", "connect0.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
131 { PIDGIN_STOCK_ANIMATION_CONNECT1, "animations", "connect1.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
132 { PIDGIN_STOCK_ANIMATION_CONNECT2, "animations", "connect2.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
133 { PIDGIN_STOCK_ANIMATION_CONNECT3, "animations", "connect3.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
134 { PIDGIN_STOCK_ANIMATION_CONNECT4, "animations", "connect4.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
135 { PIDGIN_STOCK_ANIMATION_CONNECT5, "animations", "connect5.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
136 { PIDGIN_STOCK_ANIMATION_CONNECT6, "animations", "connect6.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
137 { PIDGIN_STOCK_ANIMATION_CONNECT7, "animations", "connect7.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
138 { PIDGIN_STOCK_ANIMATION_CONNECT8, "animations", "connect8.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
139 { PIDGIN_STOCK_ANIMATION_TYPING0, "animations", "typing0.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
140 { PIDGIN_STOCK_ANIMATION_TYPING1, "animations", "typing1.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
141 { PIDGIN_STOCK_ANIMATION_TYPING2, "animations", "typing2.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
142 { PIDGIN_STOCK_ANIMATION_TYPING3, "animations", "typing3.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
143 { PIDGIN_STOCK_ANIMATION_TYPING4, "animations", "typing4.png",TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
15623
bf485c598199 toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents: 15577
diff changeset
144
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
145 { PIDGIN_STOCK_TOOLBAR_ACCOUNTS, "toolbar", "accounts.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
146 { PIDGIN_STOCK_TOOLBAR_BGCOLOR, "toolbar", "change-bgcolor.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
147 { PIDGIN_STOCK_TOOLBAR_BLOCK, "emblems", "blocked.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
148 { PIDGIN_STOCK_TOOLBAR_FGCOLOR, "toolbar", "change-fgcolor.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
149 { PIDGIN_STOCK_TOOLBAR_SMILEY, "toolbar", "emote-select.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
150 { PIDGIN_STOCK_TOOLBAR_FONT_FACE, "toolbar", "font-face.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
151 { PIDGIN_STOCK_TOOLBAR_TEXT_SMALLER, "toolbar", "font-size-down.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
152 { PIDGIN_STOCK_TOOLBAR_TEXT_LARGER, "toolbar", "font-size-up.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
153 { PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, "toolbar", "insert-image.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
154 { PIDGIN_STOCK_TOOLBAR_INSERT_LINK, "toolbar", "insert-link.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
155 { PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, "toolbar", "message-new.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
156 { PIDGIN_STOCK_TOOLBAR_PENDING, "status", "message-pending.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
157 { PIDGIN_STOCK_TOOLBAR_PLUGINS, "toolbar", "plugins.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
158 { PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
159 { PIDGIN_STOCK_TOOLBAR_UNBLOCK, "toolbar", "unblock.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
160 { PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR, "toolbar", "select-avatar.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
16881
e6bca9e3d85c New Send File icon
Hylke Bons <hbons@pidgin.im>
parents: 16808
diff changeset
161 { PIDGIN_STOCK_TOOLBAR_SEND_FILE, "toolbar", "send-file.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
16068
b1dac315ed09 block and unblock have the right icons now
Nathan Walp <nwalp@pidgin.im>
parents: 15930
diff changeset
162
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
163 { PIDGIN_STOCK_TRAY_AVAILABLE, "tray", "tray-online.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
16808
c0736ad72fd6 And make them used
Sean Egan <seanegan@pidgin.im>
parents: 16639
diff changeset
164 { PIDGIN_STOCK_TRAY_INVISIBLE, "tray", "tray-invisible.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
165 { PIDGIN_STOCK_TRAY_AWAY, "tray", "tray-away.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
166 { PIDGIN_STOCK_TRAY_BUSY, "tray", "tray-busy.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
167 { PIDGIN_STOCK_TRAY_XA, "tray", "tray-extended-away.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
168 { PIDGIN_STOCK_TRAY_OFFLINE, "tray", "tray-offline.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
169 { PIDGIN_STOCK_TRAY_CONNECT, "tray", "tray-connecting.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
170 { PIDGIN_STOCK_TRAY_PENDING, "tray", "tray-message.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL }
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
171 };
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
172
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
173 static gchar *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
174 find_file(const char *dir, const char *base)
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
175 {
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
176 char *filename;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
177
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
178 if (base == NULL)
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
179 return NULL;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
180
15930
d851247cb931 Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents: 15914
diff changeset
181 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
182 filename = g_build_filename(DATADIR, "pixmaps", "pidgin", base, NULL);
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
183 else
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
184 {
15930
d851247cb931 Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents: 15914
diff changeset
185 filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir,
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
186 base, NULL);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
187 }
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
188
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
189 return filename;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
190 }
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
191
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
192 static void
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
193 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
194 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
195 {
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
196 char *filename;
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
197 GtkIconSource *source;
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
198
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
199 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
200 source = gtk_icon_source_new();
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
201 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
202 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
203 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
204 gtk_icon_source_set_size(source, sizeid);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
205 gtk_icon_source_set_size_wildcarded(source, FALSE);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
206 gtk_icon_source_set_state_wildcarded(source, TRUE);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
207 gtk_icon_set_add_source(iconset, source);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
208 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
209
bf485c598199 toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents: 15577
diff changeset
210 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
211 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
212 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
213 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
214 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
215 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
216 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
217 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
218 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
219 }
15792
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
220 g_free(filename);
15623
bf485c598199 toolbar/menu icons. reduce the imhtmltoolbar spacing. more gaimstock pruning
Sean Egan <seanegan@pidgin.im>
parents: 15577
diff changeset
221
15792
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
222 if (rtl) {
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
223 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
224 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
225 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
226 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
227 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
228 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
229 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
230 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
231 g_free(filename);
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_free(source);
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
233 }
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
234
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
235
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
236 }
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
237
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
238 /* Altered from do_colorshift in gnome-panel */
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
239 static void
16639
0ded4b9be48c DennisR noticed that the idle icons were jagged on the sides. This is because I was subtracting 128 from the alpha value of each pixel, rather than halving them, causing anti-aliasing pixels to hit 0
Sean Egan <seanegan@pidgin.im>
parents: 16484
diff changeset
240 do_alphashift (GdkPixbuf *dest, GdkPixbuf *src)
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
241 {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
242 gint i, j;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
243 gint width, height, has_alpha, srcrowstride, destrowstride;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
244 guchar *target_pixels;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
245 guchar *original_pixels;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
246 guchar *pixsrc;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
247 guchar *pixdest;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
248 guchar a;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
249
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
250 has_alpha = gdk_pixbuf_get_has_alpha (src);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
251 if (!has_alpha)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
252 return;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
253
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
254 width = gdk_pixbuf_get_width (src);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
255 height = gdk_pixbuf_get_height (src);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
256 srcrowstride = gdk_pixbuf_get_rowstride (src);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
257 destrowstride = gdk_pixbuf_get_rowstride (dest);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
258 target_pixels = gdk_pixbuf_get_pixels (dest);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
259 original_pixels = gdk_pixbuf_get_pixels (src);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
260
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
261 for (i = 0; i < height; i++) {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
262 pixdest = target_pixels + i*destrowstride;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
263 pixsrc = original_pixels + i*srcrowstride;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
264 for (j = 0; j < width; j++) {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
265 *(pixdest++) = *(pixsrc++);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
266 *(pixdest++) = *(pixsrc++);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
267 *(pixdest++) = *(pixsrc++);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
268 a = *(pixsrc++);
16639
0ded4b9be48c DennisR noticed that the idle icons were jagged on the sides. This is because I was subtracting 128 from the alpha value of each pixel, rather than halving them, causing anti-aliasing pixels to hit 0
Sean Egan <seanegan@pidgin.im>
parents: 16484
diff changeset
269 *(pixdest++) = a / 2;
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
270 }
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
271 }
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
272 }
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
273
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
274 /* TODO: This is almost certainly not the best way to do this, but it's late, I'm tired,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
275 * we're a few hours from getting this thing out, and copy/paste is EASY.
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
276 */
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
277 static void
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
278 add_translucent_sized_icon(GtkIconSet *iconset, GtkIconSize sizeid, const char *dir,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
279 gboolean rtl, const char *size, const char *file)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
280 {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
281 char *filename;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
282 GtkIconSource *source;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
283 GdkPixbuf *pixbuf;
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
284
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
285 filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, file, NULL);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
286 pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
16639
0ded4b9be48c DennisR noticed that the idle icons were jagged on the sides. This is because I was subtracting 128 from the alpha value of each pixel, rather than halving them, causing anti-aliasing pixels to hit 0
Sean Egan <seanegan@pidgin.im>
parents: 16484
diff changeset
287 do_alphashift(pixbuf, pixbuf);
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
288
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
289 source = gtk_icon_source_new();
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
290 gtk_icon_source_set_pixbuf(source, pixbuf);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
291 gtk_icon_source_set_direction(source, GTK_TEXT_DIR_LTR);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
292 gtk_icon_source_set_direction_wildcarded(source, !rtl);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
293 gtk_icon_source_set_size(source, sizeid);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
294 gtk_icon_source_set_size_wildcarded(source, FALSE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
295 gtk_icon_source_set_state_wildcarded(source, TRUE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
296 gtk_icon_set_add_source(iconset, source);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
297 gtk_icon_source_free(source);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
298
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
299 if (sizeid == gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)) {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
300 source = gtk_icon_source_new();
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
301 gtk_icon_source_set_pixbuf(source, pixbuf);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
302 gtk_icon_source_set_direction_wildcarded(source, TRUE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
303 gtk_icon_source_set_size(source, GTK_ICON_SIZE_MENU);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
304 gtk_icon_source_set_size_wildcarded(source, FALSE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
305 gtk_icon_source_set_state_wildcarded(source, TRUE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
306 gtk_icon_set_add_source(iconset, source);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
307 gtk_icon_source_free(source);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
308 }
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
309 g_free(filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
310 g_object_unref(pixbuf);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
311
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
312 if (rtl) {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
313 filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, "rtl", file, NULL);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
314 pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
16639
0ded4b9be48c DennisR noticed that the idle icons were jagged on the sides. This is because I was subtracting 128 from the alpha value of each pixel, rather than halving them, causing anti-aliasing pixels to hit 0
Sean Egan <seanegan@pidgin.im>
parents: 16484
diff changeset
315 do_alphashift(pixbuf, pixbuf);
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
316 source = gtk_icon_source_new();
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
317 gtk_icon_source_set_pixbuf(source, pixbuf);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
318 gtk_icon_source_set_direction(source, GTK_TEXT_DIR_RTL);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
319 gtk_icon_source_set_size(source, sizeid);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
320 gtk_icon_source_set_size_wildcarded(source, FALSE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
321 gtk_icon_source_set_state_wildcarded(source, TRUE);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
322 gtk_icon_set_add_source(iconset, source);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
323 g_free(filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
324 g_object_unref(pixbuf);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
325 gtk_icon_source_free(source);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
326 }
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
327
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
328
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
329 }
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
330
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
331
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
332 void
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15559
diff changeset
333 pidgin_stock_init(void)
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
334 {
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
335 static gboolean stock_initted = FALSE;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
336 GtkIconFactory *icon_factory;
12255
f37495b09522 [gaim-migrate @ 14557]
Richard Laager <rlaager@pidgin.im>
parents: 12191
diff changeset
337 size_t i;
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
338 GtkWidget *win;
15792
862d8eb17606 make rtl icons work: http://gaim.sf.net/sean/rtl.png
Sean Egan <seanegan@pidgin.im>
parents: 15774
diff changeset
339 GtkIconSize extra_small, small, medium, large, huge;
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
340
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
341 if (stock_initted)
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
342 return;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
343
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
344 stock_initted = TRUE;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
345
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
346 /* Setup the icon factory. */
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
347 icon_factory = gtk_icon_factory_new();
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
348
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
349 gtk_icon_factory_add_default(icon_factory);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
350
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
351 /* Er, yeah, a hack, but it works. :) */
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
352 win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
353 gtk_widget_realize(win);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
354
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
355 for (i = 0; i < G_N_ELEMENTS(stock_icons); i++)
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
356 {
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
357 GtkIconSource *source;
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
358 GtkIconSet *iconset;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
359 gchar *filename;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
360
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
361 if (stock_icons[i].dir == NULL)
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
362 {
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
363 /* GTK+ Stock icon */
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
364 iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(win),
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
365 stock_icons[i].filename);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
366 }
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
367 else
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
368 {
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
369 filename = find_file(stock_icons[i].dir, stock_icons[i].filename);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
370
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
371 if (filename == NULL)
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
372 continue;
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
373
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
374 source = gtk_icon_source_new();
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
375 gtk_icon_source_set_filename(source, filename);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
376 gtk_icon_source_set_direction_wildcarded(source, TRUE);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
377 gtk_icon_source_set_size_wildcarded(source, TRUE);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
378 gtk_icon_source_set_state_wildcarded(source, TRUE);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
379
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
380
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
381 iconset = gtk_icon_set_new();
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
382 gtk_icon_set_add_source(iconset, source);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
383
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
384 gtk_icon_source_free(source);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
385 g_free(filename);
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
386 }
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
387
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
388 gtk_icon_factory_add(icon_factory, stock_icons[i].name, iconset);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
389
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
390 gtk_icon_set_unref(iconset);
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
391 }
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
392
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
393 /* register custom icon sizes */
15497
92f02f4bd5ee Dialog icon changes
Sean Egan <seanegan@pidgin.im>
parents: 15458
diff changeset
394 extra_small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL, 16, 16);
92f02f4bd5ee Dialog icon changes
Sean Egan <seanegan@pidgin.im>
parents: 15458
diff changeset
395 small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_SMALL, 22, 22);
92f02f4bd5ee Dialog icon changes
Sean Egan <seanegan@pidgin.im>
parents: 15458
diff changeset
396 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
397 large = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_LARGE, 48, 48);
15497
92f02f4bd5ee Dialog icon changes
Sean Egan <seanegan@pidgin.im>
parents: 15458
diff changeset
398 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
399
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
400 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
401 {
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
402 GtkIconSet *iconset;
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
403
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
404 iconset = gtk_icon_set_new();
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
405 if (sized_stock_icons[i].extra_small)
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
406 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
407 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
408 "16", sized_stock_icons[i].filename);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
409 if (sized_stock_icons[i].small)
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
410 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
411 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
412 "22", sized_stock_icons[i].filename);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
413 if (sized_stock_icons[i].medium)
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
414 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
415 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
416 "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
417 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
418 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
419 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
420 "48", sized_stock_icons[i].filename);
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
421 if (sized_stock_icons[i].huge)
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
422 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
423 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
424 "64", sized_stock_icons[i].filename);
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
425
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
426 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
427 gtk_icon_set_unref(iconset);
16484
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
428
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
429 if (sized_stock_icons[i].translucent_name) {
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
430 iconset = gtk_icon_set_new();
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
431 if (sized_stock_icons[i].extra_small)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
432 add_translucent_sized_icon(iconset, extra_small,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
433 sized_stock_icons[i].dir, sized_stock_icons[i].rtl,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
434 "16", sized_stock_icons[i].filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
435 if (sized_stock_icons[i].small)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
436 add_translucent_sized_icon(iconset, small,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
437 sized_stock_icons[i].dir, sized_stock_icons[i].rtl,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
438 "22", sized_stock_icons[i].filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
439 if (sized_stock_icons[i].medium)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
440 add_translucent_sized_icon(iconset, medium,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
441 sized_stock_icons[i].dir, sized_stock_icons[i].rtl,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
442 "32", sized_stock_icons[i].filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
443 if (sized_stock_icons[i].large)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
444 add_translucent_sized_icon(iconset, large,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
445 sized_stock_icons[i].dir, sized_stock_icons[i].rtl,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
446 "48", sized_stock_icons[i].filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
447 if (sized_stock_icons[i].huge)
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
448 add_translucent_sized_icon(iconset, huge,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
449 sized_stock_icons[i].dir, sized_stock_icons[i].rtl,
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
450 "64", sized_stock_icons[i].filename);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
451
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
452 gtk_icon_factory_add(icon_factory, sized_stock_icons[i].translucent_name, iconset);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
453 gtk_icon_set_unref(iconset);
4c91c9a40dea Don't use translucent pixmaps for idle, but apply transparency to icons in pidginstock.c
Sean Egan <seanegan@pidgin.im>
parents: 16454
diff changeset
454 }
15458
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
455 }
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
456
39c79dc7c965 A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
457 gtk_widget_destroy(win);
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
458 g_object_unref(G_OBJECT(icon_factory));
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
459
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
460 /* Register the stock items. */
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
461 gtk_stock_add_static(stock_items, G_N_ELEMENTS(stock_items));
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
462 }

mercurial