pidgin/gtkblist-theme.c

Tue, 12 Mar 2019 21:05:04 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Tue, 12 Mar 2019 21:05:04 -0400
changeset 39462
1fcf9a1f920e
parent 39238
53cfb9400de8
child 39548
dfd989c8236e
permissions
-rw-r--r--

Fix broken PurpleProxyInfo copying.

23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
1 /*
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
2 * Buddy List Themes for Pidgin
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
3 *
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
4 * Pidgin is the legal property of its developers, whose names are too numerous
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
6 * source distribution.
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
7 *
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
12 *
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
16 * GNU General Public License for more details.
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
17 *
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
21 */
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
22
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
23 #include "internal.h"
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
24 #include "glibcompat.h"
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
25
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
26 #include "gtkblist-theme.h"
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
27
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
28 /******************************************************************************
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
29 * Structs
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
30 *****************************************************************************/
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
31
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
32 typedef struct {
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
33 /* Buddy list */
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23665
diff changeset
34 gdouble opacity;
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
35 GdkRGBA *bgcolor;
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
36 PidginBlistLayout *layout;
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
37
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
38 /* groups */
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
39 GdkRGBA *expanded_color;
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
40 PidginThemeFont *expanded;
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
41
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
42 GdkRGBA *collapsed_color;
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
43 PidginThemeFont *collapsed;
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
44
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
45 /* buddy */
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
46 GdkRGBA *contact_color;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
47
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
48 PidginThemeFont *contact;
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
49
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
50 PidginThemeFont *online;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
51 PidginThemeFont *away;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
52 PidginThemeFont *offline;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
53 PidginThemeFont *idle;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
54 PidginThemeFont *message;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
55 PidginThemeFont *message_nick_said;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
56
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
57 PidginThemeFont *status;
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
58
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
59 } PidginBlistThemePrivate;
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
60
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
61 struct _PidginThemeFont
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
62 {
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
63 gchar *font;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
64 gchar color[10];
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
65 GdkRGBA *gdkcolor;
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
66 };
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
67
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
68 /******************************************************************************
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
69 * Enums
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
70 *****************************************************************************/
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
71
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
72 enum {
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
73 PROP_ZERO = 0,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
74 PROP_BACKGROUND_COLOR,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
75 PROP_OPACITY,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
76 PROP_LAYOUT,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
77 PROP_EXPANDED_COLOR,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
78 PROP_EXPANDED_TEXT,
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
79 PROP_COLLAPSED_COLOR,
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
80 PROP_COLLAPSED_TEXT,
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
81 PROP_CONTACT_COLOR,
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
82 PROP_CONTACT,
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
83 PROP_ONLINE,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
84 PROP_AWAY,
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
85 PROP_OFFLINE,
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
86 PROP_IDLE,
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
87 PROP_MESSAGE,
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
88 PROP_MESSAGE_NICK_SAID,
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
89 PROP_STATUS,
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
90 PROP_LAST
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
91 };
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
92
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
93 /******************************************************************************
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
94 * Globals
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
95 *****************************************************************************/
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
96
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
97 static GParamSpec *properties[PROP_LAST];
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
98
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
99 G_DEFINE_TYPE_WITH_PRIVATE(PidginBlistTheme, pidgin_blist_theme,
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
100 PURPLE_TYPE_THEME);
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
101
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
102 /******************************************************************************
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
103 * Helpers
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
104 *****************************************************************************/
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
105
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
106 PidginThemeFont *
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
107 pidgin_theme_font_new(const gchar *face, GdkRGBA *color)
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
108 {
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
109 PidginThemeFont *font = g_new0(PidginThemeFont, 1);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
110 font->font = g_strdup(face);
26807
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
111 if (color)
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
112 pidgin_theme_font_set_color(font, color);
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
113 return font;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
114 }
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
115
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
116 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
117 pidgin_theme_font_free(PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
118 {
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
119 if (pair != NULL) {
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
120 g_free(pair->font);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
121 if (pair->gdkcolor)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
122 gdk_rgba_free(pair->gdkcolor);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
123 g_free(pair);
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
124 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
125 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
126
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
127 static PidginThemeFont *
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
128 copy_font_and_color(const PidginThemeFont *pair)
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
129 {
27448
c687c6f42374 Fix a compile warning
Mark Doliner <markdoliner@pidgin.im>
parents: 27444
diff changeset
130 PidginThemeFont *copy;
c687c6f42374 Fix a compile warning
Mark Doliner <markdoliner@pidgin.im>
parents: 27444
diff changeset
131
27444
21add455833a Better error checking on the theme loaders.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26810
diff changeset
132 if (pair == NULL)
21add455833a Better error checking on the theme loaders.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26810
diff changeset
133 return NULL;
21add455833a Better error checking on the theme loaders.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26810
diff changeset
134
27448
c687c6f42374 Fix a compile warning
Mark Doliner <markdoliner@pidgin.im>
parents: 27444
diff changeset
135 copy = g_new0(PidginThemeFont, 1);
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
136 copy->font = g_strdup(pair->font);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
137 strncpy(copy->color, pair->color, sizeof(copy->color) - 1);
26809
c120381fbe45 Fix some assertion failures.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26807
diff changeset
138 if (pair->gdkcolor)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
139 copy->gdkcolor = pair->gdkcolor ? gdk_rgba_copy(pair->gdkcolor) : NULL;
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
140 return copy;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
141 }
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
142
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
143 void
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
144 pidgin_theme_font_set_font_face(PidginThemeFont *font, const gchar *face)
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
145 {
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
146 g_return_if_fail(font);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
147 g_return_if_fail(face);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
148
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
149 g_free(font->font);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
150 font->font = g_strdup(face);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
151 }
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
152
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
153 void
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
154 pidgin_theme_font_set_color(PidginThemeFont *font, const GdkRGBA *color)
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
155 {
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
156 g_return_if_fail(font);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
157
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
158 if (font->gdkcolor)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
159 gdk_rgba_free(font->gdkcolor);
26807
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
160
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
161 font->gdkcolor = color ? gdk_rgba_copy(color) : NULL;
26807
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
162 if (color)
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
163 g_snprintf(font->color, sizeof(font->color),
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
164 "#%02x%02x%02x",
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
165 (unsigned int)(color->red * 255),
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
166 (unsigned int)(color->green * 255),
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
167 (unsigned int)(color->blue * 255));
26807
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
168 else
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
169 font->color[0] = '\0';
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
170 }
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
171
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
172 const gchar *
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
173 pidgin_theme_font_get_font_face(PidginThemeFont *font)
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
174 {
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
175 g_return_val_if_fail(font, NULL);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
176 return font->font;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
177 }
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
178
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
179 const GdkRGBA *
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
180 pidgin_theme_font_get_color(PidginThemeFont *font)
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
181 {
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
182 g_return_val_if_fail(font, NULL);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
183 return font->gdkcolor;
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
184 }
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
185
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
186 const gchar *
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
187 pidgin_theme_font_get_color_describe(PidginThemeFont *font)
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
188 {
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
189 g_return_val_if_fail(font, NULL);
26807
bc47a99e9243 Allow unsetting the color for a PidginThemeFont.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26805
diff changeset
190 return font->color[0] ? font->color : NULL;
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
191 }
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
192
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
193 /******************************************************************************
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
194 * GObject Stuff
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
195 *****************************************************************************/
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
196
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
197 static void
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
198 pidgin_blist_theme_get_property(GObject *obj, guint param_id, GValue *value,
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
199 GParamSpec *psec)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
200 {
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
201 PidginBlistTheme *theme = PIDGIN_BLIST_THEME(obj);
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
202
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
203 switch (param_id) {
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
204 case PROP_BACKGROUND_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
205 g_value_set_boxed(value, pidgin_blist_theme_get_background_color(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
206 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
207 case PROP_OPACITY:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
208 g_value_set_double(value, pidgin_blist_theme_get_opacity(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
209 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
210 case PROP_LAYOUT:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
211 g_value_set_pointer(value, pidgin_blist_theme_get_layout(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
212 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
213 case PROP_EXPANDED_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
214 g_value_set_boxed(value, pidgin_blist_theme_get_expanded_background_color(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
215 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
216 case PROP_EXPANDED_TEXT:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
217 g_value_set_pointer(value, pidgin_blist_theme_get_expanded_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
218 break;
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
219 case PROP_COLLAPSED_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
220 g_value_set_boxed(value, pidgin_blist_theme_get_collapsed_background_color(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
221 break;
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
222 case PROP_COLLAPSED_TEXT:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
223 g_value_set_pointer(value, pidgin_blist_theme_get_collapsed_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
224 break;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
225 case PROP_CONTACT_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
226 g_value_set_boxed(value, pidgin_blist_theme_get_contact_color(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
227 break;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
228 case PROP_CONTACT:
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
229 g_value_set_pointer(value, pidgin_blist_theme_get_contact_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
230 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
231 case PROP_ONLINE:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
232 g_value_set_pointer(value, pidgin_blist_theme_get_online_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
233 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
234 case PROP_AWAY:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
235 g_value_set_pointer(value, pidgin_blist_theme_get_away_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
236 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
237 case PROP_OFFLINE:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
238 g_value_set_pointer(value, pidgin_blist_theme_get_offline_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
239 break;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
240 case PROP_IDLE:
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
241 g_value_set_pointer(value, pidgin_blist_theme_get_idle_text_info(theme));
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
242 break;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
243 case PROP_MESSAGE:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
244 g_value_set_pointer(value, pidgin_blist_theme_get_unread_message_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
245 break;
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
246 case PROP_MESSAGE_NICK_SAID:
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
247 g_value_set_pointer(value, pidgin_blist_theme_get_unread_message_nick_said_text_info(theme));
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
248 break;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
249 case PROP_STATUS:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
250 g_value_set_pointer(value, pidgin_blist_theme_get_status_text_info(theme));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
251 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
252 default:
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
253 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, psec);
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
254 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
255 }
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
256 }
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
257
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
258 static void
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23665
diff changeset
259 pidgin_blist_theme_set_property(GObject *obj, guint param_id, const GValue *value,
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
260 GParamSpec *psec)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
261 {
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
262 PidginBlistTheme *theme = PIDGIN_BLIST_THEME(obj);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
263
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
264 switch (param_id) {
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
265 case PROP_BACKGROUND_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
266 pidgin_blist_theme_set_background_color(theme, g_value_get_boxed(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
267 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
268 case PROP_OPACITY:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
269 pidgin_blist_theme_set_opacity(theme, g_value_get_double(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
270 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
271 case PROP_LAYOUT:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
272 pidgin_blist_theme_set_layout(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
273 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
274 case PROP_EXPANDED_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
275 pidgin_blist_theme_set_expanded_background_color(theme, g_value_get_boxed(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
276 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
277 case PROP_EXPANDED_TEXT:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
278 pidgin_blist_theme_set_expanded_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
279 break;
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
280 case PROP_COLLAPSED_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
281 pidgin_blist_theme_set_collapsed_background_color(theme, g_value_get_boxed(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
282 break;
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
283 case PROP_COLLAPSED_TEXT:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
284 pidgin_blist_theme_set_collapsed_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
285 break;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
286 case PROP_CONTACT_COLOR:
26801
c712e48798a7 Use boxed-types for the color properties.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26791
diff changeset
287 pidgin_blist_theme_set_contact_color(theme, g_value_get_boxed(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
288 break;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
289 case PROP_CONTACT:
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
290 pidgin_blist_theme_set_contact_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
291 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
292 case PROP_ONLINE:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
293 pidgin_blist_theme_set_online_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
294 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
295 case PROP_AWAY:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
296 pidgin_blist_theme_set_away_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
297 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
298 case PROP_OFFLINE:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
299 pidgin_blist_theme_set_offline_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
300 break;
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
301 case PROP_IDLE:
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
302 pidgin_blist_theme_set_idle_text_info(theme, g_value_get_pointer(value));
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
303 break;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
304 case PROP_MESSAGE:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
305 pidgin_blist_theme_set_unread_message_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
306 break;
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
307 case PROP_MESSAGE_NICK_SAID:
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
308 pidgin_blist_theme_set_unread_message_nick_said_text_info(theme, g_value_get_pointer(value));
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
309 break;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
310 case PROP_STATUS:
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
311 pidgin_blist_theme_set_status_text_info(theme, g_value_get_pointer(value));
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
312 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
313 default:
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
314 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, psec);
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
315 break;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
316 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
317 }
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
318
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
319 static void
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
320 pidgin_blist_theme_finalize(GObject *obj)
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
321 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
322 PidginBlistThemePrivate *priv;
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
323
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
324 priv = pidgin_blist_theme_get_instance_private(
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
325 PIDGIN_BLIST_THEME(obj));
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
326
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
327 /* Buddy List */
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
328 if (priv->bgcolor)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
329 gdk_rgba_free(priv->bgcolor);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
330 g_free(priv->layout);
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
331
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
332 /* Group */
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
333 if (priv->expanded_color)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
334 gdk_rgba_free(priv->expanded_color);
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
335 pidgin_theme_font_free(priv->expanded);
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
336 if (priv->collapsed_color)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
337 gdk_rgba_free(priv->collapsed_color);
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
338 pidgin_theme_font_free(priv->collapsed);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
339
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
340 /* Buddy */
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
341 if (priv->contact_color)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
342 gdk_rgba_free(priv->contact_color);
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
343 pidgin_theme_font_free(priv->contact);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
344 pidgin_theme_font_free(priv->online);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
345 pidgin_theme_font_free(priv->away);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
346 pidgin_theme_font_free(priv->offline);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
347 pidgin_theme_font_free(priv->idle);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
348 pidgin_theme_font_free(priv->message);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
349 pidgin_theme_font_free(priv->message_nick_said);
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
350 pidgin_theme_font_free(priv->status);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
351
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
352 G_OBJECT_CLASS(pidgin_blist_theme_parent_class)->finalize (obj);
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
353 }
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
354
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
355 static void
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
356 pidgin_blist_theme_init(PidginBlistTheme *theme)
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
357 {
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
358 PidginBlistThemePrivate *priv =
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
359 pidgin_blist_theme_get_instance_private(theme);
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
360
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
361 priv->opacity = 1.0;
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
362 }
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
363
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
364 static void
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
365 pidgin_blist_theme_class_init(PidginBlistThemeClass *klass)
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
366 {
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
367 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
368
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
369 obj_class->get_property = pidgin_blist_theme_get_property;
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
370 obj_class->set_property = pidgin_blist_theme_set_property;
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
371 obj_class->finalize = pidgin_blist_theme_finalize;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
372
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
373 /* Buddy List */
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
374 properties[PROP_BACKGROUND_COLOR] = g_param_spec_boxed("background-color",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
375 "Background Color",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
376 "The background color for the buddy list",
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
377 GDK_TYPE_RGBA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
378
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
379 properties[PROP_OPACITY] = g_param_spec_double("opacity", "Opacity",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
380 "The opacity of the buddy list",
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
381 0.0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
382
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
383 properties[PROP_LAYOUT] = g_param_spec_pointer("layout", "Layout",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
384 "The layout of icons, name, and status of the buddy list",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
385 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
386
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
387 /* Group */
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
388 properties[PROP_EXPANDED_COLOR] = g_param_spec_boxed("expanded-color",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
389 "Expanded Background Color",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
390 "The background color of an expanded group",
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
391 GDK_TYPE_RGBA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
392
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
393 properties[PROP_EXPANDED_TEXT] = g_param_spec_pointer("expanded-text",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
394 "Expanded Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
395 "The text information for when a group is expanded",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
396 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
397
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
398 properties[PROP_COLLAPSED_COLOR] = g_param_spec_boxed("collapsed-color",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
399 "Collapsed Background Color",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
400 "The background color of a collapsed group",
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
401 GDK_TYPE_RGBA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
402
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
403 properties[PROP_COLLAPSED_TEXT] = g_param_spec_pointer("collapsed-text",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
404 "Collapsed Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
405 "The text information for when a group is collapsed",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
406 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
407
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
408 /* Buddy */
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
409 properties[PROP_CONTACT_COLOR] = g_param_spec_boxed("contact-color",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
410 "Contact/Chat Background Color",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
411 "The background color of a contact or chat",
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
412 GDK_TYPE_RGBA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
413
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
414 properties[PROP_CONTACT] = g_param_spec_pointer("contact",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
415 "Contact Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
416 "The text information for when a contact is expanded",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
417 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
418
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
419 properties[PROP_ONLINE] = g_param_spec_pointer("online",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
420 "Online Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
421 "The text information for when a buddy is online",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
422 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
423
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
424 properties[PROP_AWAY] = g_param_spec_pointer("away",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
425 "Away Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
426 "The text information for when a buddy is away",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
427 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
428
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
429 properties[PROP_OFFLINE] = g_param_spec_pointer("offline",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
430 "Offline Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
431 "The text information for when a buddy is offline",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
432 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
433
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
434 properties[PROP_IDLE] = g_param_spec_pointer("idle",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
435 "Idle Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
436 "The text information for when a buddy is idle",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
437 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
438
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
439 properties[PROP_MESSAGE] = g_param_spec_pointer("message",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
440 "Message Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
441 "The text information for when a buddy has an unread message",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
442 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
443
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
444 properties[PROP_MESSAGE_NICK_SAID] = g_param_spec_pointer("message-nick-said",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
445 "Message (Nick Said) Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
446 "The text information for when a chat has an unread message that mentions your nickname",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
447 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
448
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
449 properties[PROP_STATUS] = g_param_spec_pointer("status",
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
450 "Status Text",
35058
506740af931c Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents: 32538
diff changeset
451 "The text information for a buddy's status",
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
452 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
35082
05a66637ec23 pidgin: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents: 35075
diff changeset
453
05a66637ec23 pidgin: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents: 35075
diff changeset
454 g_object_class_install_properties(obj_class, PROP_LAST, properties);
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
455 }
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
456
35600
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
457 /**************************************************************************
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
458 * GBoxed Stuff
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
459 **************************************************************************/
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
460
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
461 static PidginThemeFont *
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
462 pidgin_theme_font_copy(PidginThemeFont *font)
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
463 {
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
464 g_return_val_if_fail(font != NULL, NULL);
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
465
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
466 return pidgin_theme_font_new(font->font, font->gdkcolor);
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
467 }
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
468
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
469 GType
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
470 pidgin_theme_font_get_type(void)
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
471 {
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
472 static GType type = 0;
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
473
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
474 if (type == 0) {
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
475 type = g_boxed_type_register_static("PidginThemeFont",
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
476 (GBoxedCopyFunc)pidgin_theme_font_copy,
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
477 (GBoxedFreeFunc)pidgin_theme_font_free);
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
478 }
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
479
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
480 return type;
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
481 }
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
482
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
483 static PidginBlistLayout *
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
484 pidgin_blist_layout_copy(const PidginBlistLayout *layout)
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
485 {
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
486 g_return_val_if_fail(layout != NULL, NULL);
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
487
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
488 return g_memdup(layout, sizeof(PidginBlistLayout));
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
489 }
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
490
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
491 GType
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
492 pidgin_blist_layout_get_type(void)
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
493 {
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
494 static GType type = 0;
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
495
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
496 if (type == 0) {
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
497 type = g_boxed_type_register_static("PidginBlistLayout",
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
498 (GBoxedCopyFunc)pidgin_blist_layout_copy,
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
499 (GBoxedFreeFunc)g_free);
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
500 }
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
501
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
502 return type;
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
503 }
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
504
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
505
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
506 /*****************************************************************************
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
507 * Public API functions
23656
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
508 *****************************************************************************/
d4acd51c1446 start of blist themes (themes have no effect on display)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
509
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
510 /* get methods */
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 25863
diff changeset
511
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
512 GdkRGBA *
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
513 pidgin_blist_theme_get_background_color(PidginBlistTheme *theme)
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
514 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
515 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
516
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
517 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
518
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
519 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
520
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
521 return priv->bgcolor;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
522 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
523
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
524 gdouble
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
525 pidgin_blist_theme_get_opacity(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
526 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
527 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
528
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
529 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), 1.0);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
530
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
531 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
532
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
533 return priv->opacity;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
534 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
535
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
536 PidginBlistLayout *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
537 pidgin_blist_theme_get_layout(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
538 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
539 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
540
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
541 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
542
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
543 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
544
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
545 return priv->layout;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
546 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
547
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
548 GdkRGBA *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
549 pidgin_blist_theme_get_expanded_background_color(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
550 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
551 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
552
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
553 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
554
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
555 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
556
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
557 return priv->expanded_color;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
558 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
559
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
560 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
561 pidgin_blist_theme_get_expanded_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
562 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
563 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
564
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
565 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
566
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
567 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
568
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
569 return priv->expanded;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
570 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
571
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
572 GdkRGBA *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
573 pidgin_blist_theme_get_collapsed_background_color(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
574 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
575 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
576
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
577 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
578
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
579 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
580
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
581 return priv->collapsed_color;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
582 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
583
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
584 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
585 pidgin_blist_theme_get_collapsed_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
586 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
587 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
588
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
589 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
590
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
591 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
592
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
593 return priv->collapsed;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
594 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
595
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
596 GdkRGBA *
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
597 pidgin_blist_theme_get_contact_color(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
598 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
599 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
600
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
601 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
602
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
603 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
604
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
605 return priv->contact_color;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
606 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
607
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
608 PidginThemeFont *
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
609 pidgin_blist_theme_get_contact_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
610 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
611 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
612
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
613 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
614
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
615 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
616
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
617 return priv->contact;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
618 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
619
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
620 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
621 pidgin_blist_theme_get_online_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
622 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
623 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
624
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
625 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
626
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
627 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
628
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
629 return priv->online;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
630 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
631
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
632 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
633 pidgin_blist_theme_get_away_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
634 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
635 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
636
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
637 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
638
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
639 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
640
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
641 return priv->away;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
642 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
643
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
644 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
645 pidgin_blist_theme_get_offline_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
646 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
647 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
648
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
649 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
650
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
651 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
652
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
653 return priv->offline;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
654 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
655
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
656 PidginThemeFont *
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
657 pidgin_blist_theme_get_idle_text_info(PidginBlistTheme *theme)
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
658 {
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
659 PidginBlistThemePrivate *priv;
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
660
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
661 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
662
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
663 priv = pidgin_blist_theme_get_instance_private(theme);
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
664
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
665 return priv->idle;
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
666 }
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
667
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
668 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
669 pidgin_blist_theme_get_unread_message_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
670 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
671 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
672
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
673 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
674
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
675 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
676
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
677 return priv->message;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
678 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
679
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
680 PidginThemeFont *
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
681 pidgin_blist_theme_get_unread_message_nick_said_text_info(PidginBlistTheme *theme)
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
682 {
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
683 PidginBlistThemePrivate *priv;
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
684
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
685 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
686
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
687 priv = pidgin_blist_theme_get_instance_private(theme);
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
688
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
689 return priv->message_nick_said;
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
690 }
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
691
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
692 PidginThemeFont *
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
693 pidgin_blist_theme_get_status_text_info(PidginBlistTheme *theme)
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
694 {
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
695 PidginBlistThemePrivate *priv;
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
696
23659
8251d0f67df5 restructured much of the loader and themes for the buddy list, along with a basic trial of group background
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23657
diff changeset
697 g_return_val_if_fail(PIDGIN_IS_BLIST_THEME(theme), NULL);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
698
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
699 priv = pidgin_blist_theme_get_instance_private(theme);
23657
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
700
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
701 return priv->status;
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
702 }
41ba956129e0 flushed out blist themes a bit with lots of properties and get methods
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23656
diff changeset
703
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
704 /* Set Methods */
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
705 void
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
706 pidgin_blist_theme_set_background_color(PidginBlistTheme *theme, const GdkRGBA *color)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
707 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
708 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
709
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
710 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
711
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
712 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
713
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
714 if (priv->bgcolor)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
715 gdk_rgba_free(priv->bgcolor);
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
716 priv->bgcolor = color ? gdk_rgba_copy(color) : NULL;
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
717
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
718 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_BACKGROUND_COLOR]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
719 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
720
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
721 void
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
722 pidgin_blist_theme_set_opacity(PidginBlistTheme *theme, gdouble opacity)
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
723 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
724 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
725
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
726 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme) || opacity < 0.0 || opacity > 1.0);
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
727
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
728 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
729
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
730 priv->opacity = opacity;
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
731
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
732 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_OPACITY]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
733 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
734
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
735 void
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
736 pidgin_blist_theme_set_layout(PidginBlistTheme *theme, const PidginBlistLayout *layout)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
737 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
738 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
739
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
740 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
741
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
742 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
743
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
744 g_free(priv->layout);
35600
a0d221323be1 Box PidginBuddyList, PidginThemeFont, PidginBlistLayout
Ankit Vani <a@nevitus.org>
parents: 35082
diff changeset
745 priv->layout = pidgin_blist_layout_copy(layout);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
746
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
747 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_LAYOUT]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
748 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
749
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
750 void
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
751 pidgin_blist_theme_set_expanded_background_color(PidginBlistTheme *theme, const GdkRGBA *color)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
752 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
753 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
754
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
755 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
756
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
757 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
758
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
759 if (priv->expanded_color)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
760 gdk_rgba_free(priv->expanded_color);
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
761 priv->expanded_color = color ? gdk_rgba_copy(color) : NULL;
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
762
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
763 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_EXPANDED_COLOR]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
764 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
765
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
766 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
767 pidgin_blist_theme_set_expanded_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
768 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
769 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
770
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
771 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
772
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
773 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
774
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
775 pidgin_theme_font_free(priv->expanded);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
776 priv->expanded = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
777
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
778 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_EXPANDED_TEXT]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
779 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
780
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
781 void
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
782 pidgin_blist_theme_set_collapsed_background_color(PidginBlistTheme *theme, const GdkRGBA *color)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
783 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
784 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
785
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
786 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
787
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
788 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
789
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
790 if (priv->collapsed_color)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
791 gdk_rgba_free(priv->collapsed_color);
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
792 priv->collapsed_color = color ? gdk_rgba_copy(color) : NULL;
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
793
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
794 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_COLLAPSED_COLOR]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
795 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
796
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
797 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
798 pidgin_blist_theme_set_collapsed_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
799 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
800 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
801
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
802 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
803
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
804 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
805
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
806 pidgin_theme_font_free(priv->collapsed);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
807 priv->collapsed = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
808
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
809 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_COLLAPSED_TEXT]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
810 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
811
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
812 void
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
813 pidgin_blist_theme_set_contact_color(PidginBlistTheme *theme, const GdkRGBA *color)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
814 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
815 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
816
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
817 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
818
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
819 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
820
26805
30a7f19d9567 Do a null-check before gdk_color_free, and mark property-names for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26804
diff changeset
821 if (priv->contact_color)
37992
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
822 gdk_rgba_free(priv->contact_color);
0185eb26ac7d Use GdkRGBA instead of GdkColor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35600
diff changeset
823 priv->contact_color = color ? gdk_rgba_copy(color) : NULL;
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
824
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
825 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_CONTACT_COLOR]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
826 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
827
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
828 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
829 pidgin_blist_theme_set_contact_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
830 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
831 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
832
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
833 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
834
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
835 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
836
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
837 pidgin_theme_font_free(priv->contact);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
838 priv->contact = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
839
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
840 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_CONTACT]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
841 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
842
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
843 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
844 pidgin_blist_theme_set_online_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
845 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
846 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
847
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
848 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
849
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
850 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
851
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
852 pidgin_theme_font_free(priv->online);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
853 priv->online = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
854
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
855 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_ONLINE]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
856 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
857
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
858 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
859 pidgin_blist_theme_set_away_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
860 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
861 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
862
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
863 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
864
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
865 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
866
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
867 pidgin_theme_font_free(priv->away);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
868 priv->away = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
869
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
870 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_AWAY]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
871 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
872
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
873 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
874 pidgin_blist_theme_set_offline_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
875 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
876 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
877
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
878 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
879
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
880 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
881
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
882 pidgin_theme_font_free(priv->offline);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
883 priv->offline = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
884
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
885 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_OFFLINE]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
886 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
887
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
888 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
889 pidgin_blist_theme_set_idle_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
890 {
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
891 PidginBlistThemePrivate *priv;
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
892
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
893 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
894
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
895 priv = pidgin_blist_theme_get_instance_private(theme);
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
896
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
897 pidgin_theme_font_free(priv->idle);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
898 priv->idle = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
899
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
900 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_IDLE]);
23665
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
901 }
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
902
c9944e9b97e1 Added text and font coloring for buddies, contacts and chats, as well as fix a few small bugs
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23662
diff changeset
903 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
904 pidgin_blist_theme_set_unread_message_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
905 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
906 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
907
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
908 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
909
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
910 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
911
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
912 pidgin_theme_font_free(priv->message);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
913 priv->message = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
914
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
915 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_MESSAGE]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
916 }
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
917
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
918 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
919 pidgin_blist_theme_set_unread_message_nick_said_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
920 {
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
921 PidginBlistThemePrivate *priv;
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
922
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
923 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
924
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
925 priv = pidgin_blist_theme_get_instance_private(theme);
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
926
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
927 pidgin_theme_font_free(priv->message_nick_said);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
928 priv->message_nick_said = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
929
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
930 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_MESSAGE_NICK_SAID]);
25863
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
931 }
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
932
b724badf6cd2 Adding the patch to extend the blist theme to allow coloring of chat nodes with unread messages mentioning your nick.
Paul Aurich <darkrain42@pidgin.im>
parents: 23972
diff changeset
933 void
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
934 pidgin_blist_theme_set_status_text_info(PidginBlistTheme *theme, const PidginThemeFont *pair)
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
935 {
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
936 PidginBlistThemePrivate *priv;
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
937
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
938 g_return_if_fail(PIDGIN_IS_BLIST_THEME(theme));
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
939
39238
53cfb9400de8 Port Pidgin away from deprecated g_type_class_add_private()
Mike Ruprecht <cmaiku@gmail.com>
parents: 37992
diff changeset
940 priv = pidgin_blist_theme_get_instance_private(theme);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
941
26803
d48e945e622f Several changes:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26801
diff changeset
942 pidgin_theme_font_free(priv->status);
26785
a4411d5d13d1 PidginBlistTheme now copies all its parameters instead of taking ownership.
Paul Aurich <darkrain42@pidgin.im>
parents: 26784
diff changeset
943 priv->status = copy_font_and_color(pair);
35060
195dbb3b6432 pidgin: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents: 35058
diff changeset
944
35075
3a3c90a0ec07 pidgin: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents: 35060
diff changeset
945 g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_STATUS]);
23660
8637cec033e1 Fixed gtkblist-loader_build to no longer assume xml file is correct, added set methods to gtkblist-theme
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23659
diff changeset
946 }

mercurial