pidgin/pidginstock.c

Tue, 12 Oct 2021 05:05:29 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 12 Oct 2021 05:05:29 -0500
changeset 41097
e0b11d28b39e
parent 41093
13d97dcd0e67
permissions
-rw-r--r--

Remove registration of all stock icons

There's still a few things in `pidginstock.[ch]` that we need, but we definitely don't need the stock icons.

Testing Done:
Compile only

Reviewed at https://reviews.imfreedom.org/r/1042/

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* pidgin
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
2 *
15930
d851247cb931 Install pixmaps to the right directories and make them load properly.
Richard Laager <rlaager@pidgin.im>
parents: 15914
diff changeset
3 * 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
4 * to list here. Please refer to the COPYRIGHT file distributed with this
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
5 * source distribution.
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
6 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
8 * 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
9 * the Free Software Foundation; either version 2 of the License, or
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
11 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
16 *
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19667
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
10297
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 */
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
22 #ifdef HAVE_CONFIG_H
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
23 # include <config.h>
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
24 #endif
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
25
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
26 #include <glib/gi18n-lib.h>
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
27
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
28 #include <purple.h>
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
29
40496
6941fece679b phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
30 #include "pidginstock.h"
23964
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
31
24377
8d0bfda8402d renamed gtkblist-loader.[ch] to gtblist-theme-loader.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 24376
diff changeset
32 #include "gtkicon-theme-loader.h"
40496
6941fece679b phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
33 #include "pidgincore.h"
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
34
39030
a2b1c1a2ac86 pidginstock: Silence excessive GtkStock deprecation warnings
Mike Ruprecht <cmaiku@gmail.com>
parents: 38358
diff changeset
35 #warning GtkStock is deprecated. Port usage of PidginStock to GtkIconTheme \
a2b1c1a2ac86 pidginstock: Silence excessive GtkStock deprecation warnings
Mike Ruprecht <cmaiku@gmail.com>
parents: 38358
diff changeset
36 and friends.
a2b1c1a2ac86 pidginstock: Silence excessive GtkStock deprecation warnings
Mike Ruprecht <cmaiku@gmail.com>
parents: 38358
diff changeset
37
23964
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
38 /**************************************************************************
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
39 * Globals
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
40 **************************************************************************/
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
41
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
42 static gboolean stock_initted = FALSE;
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
43 static GtkIconSize microscopic, extra_small, small, medium, large, huge;
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
44
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
45 /**************************************************************************
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
46 * Structures
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
47 **************************************************************************/
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
48
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
49 /*****************************************************************************
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 25000
diff changeset
50 * Public API functions
23964
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
51 *****************************************************************************/
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
52
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
53 void
23967
cc5667bc8f1e Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23966
diff changeset
54 pidgin_stock_load_status_icon_theme(PidginStatusIconTheme *theme)
23964
342e3f5bedd9 partially working status icon theme stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23423
diff changeset
55 {
23970
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
56 if (theme != NULL) {
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 25000
diff changeset
57 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/status/icon-theme",
27262
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
58 purple_theme_get_name(PURPLE_THEME(theme)));
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 25000
diff changeset
59 purple_prefs_set_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir",
27262
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
60 purple_theme_get_dir(PURPLE_THEME(theme)));
23970
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
61 }
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
62 else {
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
63 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/status/icon-theme", "");
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
64 purple_prefs_set_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir", "");
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
65 }
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
66 }
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
67
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
68 void
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
69 pidgin_stock_load_stock_icon_theme(PidginStockIconTheme *theme)
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
70 {
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
71 if (theme != NULL) {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
72 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/stock/icon-theme",
27262
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
73 purple_theme_get_name(PURPLE_THEME(theme)));
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
74 purple_prefs_set_path(PIDGIN_PREFS_ROOT "/stock/icon-theme-dir",
27262
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
75 purple_theme_get_dir(PURPLE_THEME(theme)));
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
76 }
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
77 else {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
78 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/stock/icon-theme", "");
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
79 purple_prefs_set_path(PIDGIN_PREFS_ROOT "/stock/icon-theme-dir", "");
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
80 }
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
81 }
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
82
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
83 void
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
84 pidgin_stock_init(void)
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
85 {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
86 PidginIconThemeLoader *loader, *stockloader;
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
87 const gchar *path = NULL;
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
88
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
89 if (stock_initted)
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
90 return;
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
91
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
92 stock_initted = TRUE;
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
93
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
94 /* Setup the status icon theme */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
95 loader = g_object_new(PIDGIN_TYPE_ICON_THEME_LOADER, "type", "status-icon", NULL);
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
96 purple_theme_manager_register_type(PURPLE_THEME_LOADER(loader));
28476
04e8f641aa37 Call purple_prefs_add_none on the parents for the status and stock icon
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 28449
diff changeset
97 purple_prefs_add_none(PIDGIN_PREFS_ROOT "/status");
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
98 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/status/icon-theme", "");
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
99 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir", "");
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
100
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
101 stockloader = g_object_new(PIDGIN_TYPE_ICON_THEME_LOADER, "type", "stock-icon", NULL);
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
102 purple_theme_manager_register_type(PURPLE_THEME_LOADER(stockloader));
28476
04e8f641aa37 Call purple_prefs_add_none on the parents for the status and stock icon
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 28449
diff changeset
103 purple_prefs_add_none(PIDGIN_PREFS_ROOT "/stock");
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
104 purple_prefs_add_string(PIDGIN_PREFS_ROOT "/stock/icon-theme", "");
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
105 purple_prefs_add_path(PIDGIN_PREFS_ROOT "/stock/icon-theme-dir", "");
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
106
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
107 /* register custom icon sizes */
39030
a2b1c1a2ac86 pidginstock: Silence excessive GtkStock deprecation warnings
Mike Ruprecht <cmaiku@gmail.com>
parents: 38358
diff changeset
108 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
109 microscopic = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC, 11, 11);
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
110 extra_small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL, 16, 16);
27262
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
111 small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_SMALL, 22, 22);
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
112 medium = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MEDIUM, 32, 32);
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
113 large = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_LARGE, 48, 48);
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
114 huge = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_HUGE, 64, 64);
39030
a2b1c1a2ac86 pidginstock: Silence excessive GtkStock deprecation warnings
Mike Ruprecht <cmaiku@gmail.com>
parents: 38358
diff changeset
115 G_GNUC_END_IGNORE_DEPRECATIONS
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
116
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
117 pidgin_stock_load_stock_icon_theme(NULL);
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
118
23973
189295d2ee8e clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23972
diff changeset
119 /* Pre-load Status icon theme - this avoids a bug with displaying the correct icon in the tray, theme is destroyed after*/
28449
69dd8af58b41 I guess this pref name was changed but this one line was not. This would
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 27910
diff changeset
120 if (purple_prefs_get_string(PIDGIN_PREFS_ROOT "/status/icon-theme") &&
23970
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
121 (path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/status/icon-theme-dir"))) {
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 25000
diff changeset
122
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23970
diff changeset
123 PidginStatusIconTheme *theme = PIDGIN_STATUS_ICON_THEME(purple_theme_loader_build(PURPLE_THEME_LOADER(loader), path));
23970
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
124 pidgin_stock_load_status_icon_theme(theme);
28515
10d8aab24f2e Fix minor assert so I can run with G_DEBUG=fatal_criticals.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 28476
diff changeset
125 if (theme)
10d8aab24f2e Fix minor assert so I can run with G_DEBUG=fatal_criticals.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 28476
diff changeset
126 g_object_unref(G_OBJECT(theme));
23970
85dcf9218f63 fixes initialize icon theme bug by pre-loading the theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
127
27262
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
128 }
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
129 else
ce9c568ee33c A few bits of whitespace changes...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26843
diff changeset
130 pidgin_stock_load_status_icon_theme(NULL);
10297
b36800725b7a [gaim-migrate @ 11480]
Evan Schoenberg <evands@pidgin.im>
parents:
diff changeset
131 }
26813
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
132
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
133 static void
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
134 pidgin_stock_icon_theme_class_init(PidginStockIconThemeClass *klass)
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
135 {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
136 }
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
137
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
138 GType
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
139 pidgin_stock_icon_theme_get_type(void)
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
140 {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
141 static GType type = 0;
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
142 if (type == 0) {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
143 static const GTypeInfo info = {
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
144 sizeof (PidginStockIconThemeClass),
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
145 NULL, /* base_init */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
146 NULL, /* base_finalize */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
147 (GClassInitFunc)pidgin_stock_icon_theme_class_init, /* class_init */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
148 NULL, /* class_finalize */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
149 NULL, /* class_data */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
150 sizeof (PidginStockIconTheme),
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
151 0, /* n_preallocs */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
152 NULL,
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
153 NULL, /* value table */
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
154 };
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
155 type = g_type_register_static(PIDGIN_TYPE_ICON_THEME,
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
156 "PidginStockIconTheme", &info, 0);
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
157 }
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
158 return type;
c1a058a2466e Make it possible to load non-status icons using a PidginStockIconTheme.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26747
diff changeset
159 }

mercurial