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