Mon, 03 Feb 2014 22:40:31 +0530
Swap @title and @short_description roles
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
1 | /* |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
2 | * purple |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
3 | * |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
4 | * Purple is the legal property of its developers, whose names are too numerous |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
6 | * source distribution. |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
7 | * |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
11 | * (at your option) any later version. |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
12 | * |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
16 | * GNU General Public License for more details. |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
17 | * |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
21 | * |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
22 | */ |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
23 | #include "internal.h" |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
24 | #include "glibcompat.h" |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
25 | #include "blistnodetypes.h" |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
26 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
27 | #define PURPLE_BLIST_NODE_GET_PRIVATE(obj) \ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
28 | (G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_BLIST_NODE, PurpleBlistNodePrivate)) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
29 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
30 | /** @copydoc _PurpleBlistNodePrivate */ |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
31 | typedef struct _PurpleBlistNodePrivate PurpleBlistNodePrivate; |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
32 | |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
33 | #define PURPLE_COUNTING_NODE_GET_PRIVATE(obj) \ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
34 | (G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_COUNTING_NODE, PurpleCountingNodePrivate)) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
35 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
36 | /** @copydoc _PurpleCountingNodePrivate */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
37 | typedef struct _PurpleCountingNodePrivate PurpleCountingNodePrivate; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
38 | |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
39 | /** Private data of a buddy list node */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
40 | struct _PurpleBlistNodePrivate { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
41 | GHashTable *settings; /**< per-node settings */ |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
42 | gboolean transient; /**< node should not be saved with the buddy list */ |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
43 | }; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
44 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
45 | /* Blist node property enums */ |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
46 | enum |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
47 | { |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
48 | BLNODE_PROP_0, |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
49 | BLNODE_PROP_TRANSIENT, |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
50 | BLNODE_PROP_LAST |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
51 | }; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
52 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
53 | /** Private data of a counting node */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
54 | struct _PurpleCountingNodePrivate { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
55 | int totalsize; /**< The number of children under this node */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
56 | int currentsize; /**< The number of children under this node |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
57 | corresponding to online accounts */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
58 | int onlinecount; /**< The number of children under this contact who are |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
59 | currently online */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
60 | }; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
61 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
62 | /* Counting node property enums */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
63 | enum |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
64 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
65 | CNODE_PROP_0, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
66 | CNODE_PROP_TOTAL_SIZE, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
67 | CNODE_PROP_CURRENT_SIZE, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
68 | CNODE_PROP_ONLINE_COUNT, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
69 | CNODE_PROP_LAST |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
70 | }; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
71 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
72 | static GObjectClass *parent_class; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
73 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
74 | static GParamSpec *bn_properties[BLNODE_PROP_LAST]; |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
75 | static GParamSpec *cn_properties[CNODE_PROP_LAST]; |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
76 | |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
77 | /**************************************************************************/ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
78 | /* Buddy list node API */ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
79 | /**************************************************************************/ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
80 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
81 | static PurpleBlistNode *get_next_node(PurpleBlistNode *node, gboolean godeep) |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
82 | { |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
83 | if (node == NULL) |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
84 | return NULL; |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
85 | |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
86 | if (godeep && node->child) |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
87 | return node->child; |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
88 | |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
89 | if (node->next) |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
90 | return node->next; |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
91 | |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
92 | return get_next_node(node->parent, FALSE); |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
93 | } |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
94 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
95 | PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
96 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
97 | PurpleBlistNode *ret = node; |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
98 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
99 | if (offline) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
100 | return get_next_node(ret, TRUE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
101 | do |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
102 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
103 | ret = get_next_node(ret, TRUE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
104 | } while (ret && PURPLE_IS_BUDDY(ret) && |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
105 | !purple_account_is_connected(purple_buddy_get_account((PurpleBuddy *)ret))); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
106 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
107 | return ret; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
108 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
109 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
110 | PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
111 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
112 | return node ? node->parent : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
113 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
114 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
115 | PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
116 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
117 | return node ? node->child : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
118 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
119 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
120 | PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
121 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
122 | return node? node->next : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
123 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
124 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
125 | PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
126 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
127 | return node? node->prev : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
128 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
129 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
130 | void * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
131 | purple_blist_node_get_ui_data(const PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
132 | { |
|
34983
81638be26f41
Check types of GObjects instead of just for NULL values
Ankit Vani <a@nevitus.org>
parents:
34865
diff
changeset
|
133 | g_return_val_if_fail(PURPLE_IS_BLIST_NODE(node), NULL); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
134 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
135 | return node->ui_data; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
136 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
137 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
138 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
139 | purple_blist_node_set_ui_data(PurpleBlistNode *node, void *ui_data) { |
|
34983
81638be26f41
Check types of GObjects instead of just for NULL values
Ankit Vani <a@nevitus.org>
parents:
34865
diff
changeset
|
140 | g_return_if_fail(PURPLE_IS_BLIST_NODE(node)); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
141 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
142 | node->ui_data = ui_data; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
143 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
144 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
145 | void purple_blist_node_remove_setting(PurpleBlistNode *node, const char *key) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
146 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
147 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
148 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
149 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
150 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
151 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
152 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
153 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
154 | g_hash_table_remove(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
155 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
156 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
157 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
158 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
159 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
160 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
161 | void |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
162 | purple_blist_node_set_transient(PurpleBlistNode *node, gboolean transient) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
163 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
164 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
165 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
166 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
167 | |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
168 | priv->transient = transient; |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
169 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
170 | g_object_notify_by_pspec(G_OBJECT(node), |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
171 | bn_properties[BLNODE_PROP_TRANSIENT]); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
172 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
173 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
174 | gboolean |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
175 | purple_blist_node_is_transient(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
176 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
177 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
178 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
179 | g_return_val_if_fail(priv != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
180 | |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
181 | return priv->transient; |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
182 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
183 | |
| 34730 | 184 | GHashTable * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
185 | purple_blist_node_get_settings(PurpleBlistNode *node) |
| 34730 | 186 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
187 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
| 34730 | 188 | |
| 189 | g_return_val_if_fail(priv != NULL, NULL); | |
| 190 | ||
| 191 | return priv->settings; | |
| 192 | } | |
| 193 | ||
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
194 | gboolean |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
195 | purple_blist_node_has_setting(PurpleBlistNode* node, const char *key) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
196 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
197 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
198 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
199 | g_return_val_if_fail(priv != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
200 | g_return_val_if_fail(priv->settings != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
201 | g_return_val_if_fail(key != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
202 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
203 | /* Boxed type, so it won't ever be NULL, so no need for _extended */ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
204 | return (g_hash_table_lookup(priv->settings, key) != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
205 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
206 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
207 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
208 | purple_blist_node_set_bool(PurpleBlistNode* node, const char *key, gboolean data) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
209 | { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
210 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
211 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
212 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
213 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
214 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
215 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
216 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
217 | |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
218 | value = purple_value_new(G_TYPE_BOOLEAN); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
219 | g_value_set_boolean(value, data); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
220 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
221 | g_hash_table_replace(priv->settings, g_strdup(key), value); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
222 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
223 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
224 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
225 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
226 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
227 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
228 | gboolean |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
229 | purple_blist_node_get_bool(PurpleBlistNode* node, const char *key) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
230 | { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
231 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
232 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
233 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
234 | g_return_val_if_fail(priv != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
235 | g_return_val_if_fail(priv->settings != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
236 | g_return_val_if_fail(key != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
237 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
238 | value = g_hash_table_lookup(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
239 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
240 | if (value == NULL) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
241 | return FALSE; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
242 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
243 | g_return_val_if_fail(G_VALUE_HOLDS_BOOLEAN(value), FALSE); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
244 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
245 | return g_value_get_boolean(value); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
246 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
247 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
248 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
249 | purple_blist_node_set_int(PurpleBlistNode* node, const char *key, int data) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
250 | { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
251 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
252 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
253 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
254 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
255 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
256 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
257 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
258 | |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
259 | value = purple_value_new(G_TYPE_INT); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
260 | g_value_set_int(value, data); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
261 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
262 | g_hash_table_replace(priv->settings, g_strdup(key), value); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
263 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
264 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
265 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
266 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
267 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
268 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
269 | int |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
270 | purple_blist_node_get_int(PurpleBlistNode* node, const char *key) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
271 | { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
272 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
273 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
274 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
275 | g_return_val_if_fail(priv != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
276 | g_return_val_if_fail(priv->settings != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
277 | g_return_val_if_fail(key != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
278 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
279 | value = g_hash_table_lookup(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
280 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
281 | if (value == NULL) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
282 | return 0; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
283 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
284 | g_return_val_if_fail(G_VALUE_HOLDS_INT(value), 0); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
285 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
286 | return g_value_get_int(value); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
287 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
288 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
289 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
290 | purple_blist_node_set_string(PurpleBlistNode* node, const char *key, const char *data) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
291 | { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
292 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
293 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
294 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
295 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
296 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
297 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
298 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
299 | |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
300 | value = purple_value_new(G_TYPE_STRING); |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
301 | g_value_set_string(value, data); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
302 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
303 | g_hash_table_replace(priv->settings, g_strdup(key), value); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
304 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
305 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
306 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
307 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
308 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
309 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
310 | const char * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
311 | purple_blist_node_get_string(PurpleBlistNode* node, const char *key) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
312 | { |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
313 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
314 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
315 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
316 | g_return_val_if_fail(priv != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
317 | g_return_val_if_fail(priv->settings != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
318 | g_return_val_if_fail(key != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
319 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
320 | value = g_hash_table_lookup(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
321 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
322 | if (value == NULL) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
323 | return NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
324 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
325 | g_return_val_if_fail(G_VALUE_HOLDS_STRING(value), NULL); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
326 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
327 | return g_value_get_string(value); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
328 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
329 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
330 | GList * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
331 | purple_blist_node_get_extended_menu(PurpleBlistNode *n) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
332 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
333 | GList *menu = NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
334 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
335 | g_return_val_if_fail(n != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
336 | |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
337 | purple_signal_emit(purple_blist_get_handle(), "blist-node-extended-menu", |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
338 | n, &menu); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
339 | return menu; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
340 | } |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
341 | |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
342 | /************************************************************************** |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
343 | * GObject code for PurpleBlistNode |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
344 | **************************************************************************/ |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
345 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
346 | /* Set method for GObject properties */ |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
347 | static void |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
348 | purple_blist_node_set_property(GObject *obj, guint param_id, const GValue *value, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
349 | GParamSpec *pspec) |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
350 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
351 | PurpleBlistNode *node = PURPLE_BLIST_NODE(obj); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
352 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
353 | switch (param_id) { |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
354 | case BLNODE_PROP_TRANSIENT: |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
355 | purple_blist_node_set_transient(node, g_value_get_boolean(value)); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
356 | break; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
357 | default: |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
358 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
359 | break; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
360 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
361 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
362 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
363 | /* Get method for GObject properties */ |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
364 | static void |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
365 | purple_blist_node_get_property(GObject *obj, guint param_id, GValue *value, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
366 | GParamSpec *pspec) |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
367 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
368 | PurpleBlistNode *node = PURPLE_BLIST_NODE(obj); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
369 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
370 | switch (param_id) { |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
371 | case BLNODE_PROP_TRANSIENT: |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
372 | g_value_set_boolean(value, purple_blist_node_is_transient(node)); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
373 | break; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
374 | default: |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
375 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
376 | break; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
377 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
378 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
379 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
380 | /* GObject initialization function */ |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
381 | static void |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
382 | purple_blist_node_init(GTypeInstance *instance, gpointer klass) |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
383 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
384 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(instance); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
385 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
386 | priv->settings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
387 | (GDestroyNotify)purple_value_free); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
388 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
389 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
390 | /* GObject finalize function */ |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
391 | static void |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
392 | purple_blist_node_finalize(GObject *object) |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
393 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
394 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(object); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
395 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
396 | g_hash_table_destroy(priv->settings); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
397 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
398 | parent_class->finalize(object); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
399 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
400 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
401 | /* Class initializer function */ |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
402 | static void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
403 | purple_blist_node_class_init(PurpleBlistNodeClass *klass) |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
404 | { |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
405 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
406 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
407 | parent_class = g_type_class_peek_parent(klass); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
408 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
409 | obj_class->finalize = purple_blist_node_finalize; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
410 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
411 | /* Setup properties */ |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
412 | obj_class->get_property = purple_blist_node_get_property; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
413 | obj_class->set_property = purple_blist_node_set_property; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
414 | |
|
35085
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
415 | g_type_class_add_private(klass, sizeof(PurpleBlistNodePrivate)); |
|
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
416 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
417 | bn_properties[BLNODE_PROP_TRANSIENT] = g_param_spec_boolean("transient", |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
418 | "Transient", |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
419 | "Whether node should not be saved with the buddy list.", |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
420 | FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
421 | |
|
35085
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
422 | g_object_class_install_properties(obj_class, BLNODE_PROP_LAST, |
|
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
423 | bn_properties); |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
424 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
425 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
426 | GType |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
427 | purple_blist_node_get_type(void) |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
428 | { |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
429 | static GType type = 0; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
430 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
431 | if(type == 0) { |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
432 | static const GTypeInfo info = { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
433 | sizeof(PurpleBlistNodeClass), |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
434 | NULL, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
435 | NULL, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
436 | (GClassInitFunc)purple_blist_node_class_init, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
437 | NULL, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
438 | NULL, |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
439 | sizeof(PurpleBlistNode), |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
440 | 0, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
441 | (GInstanceInitFunc)purple_blist_node_init, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
442 | NULL, |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
443 | }; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
444 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
445 | type = g_type_register_static(G_TYPE_OBJECT, "PurpleBlistNode", |
|
34712
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
446 | &info, G_TYPE_FLAG_ABSTRACT); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
447 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
448 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
449 | return type; |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
450 | } |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
451 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
452 | /**************************************************************************/ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
453 | /* Counting node API */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
454 | /**************************************************************************/ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
455 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
456 | int |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
457 | purple_counting_node_get_total_size(PurpleCountingNode *counter) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
458 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
459 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
460 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
461 | g_return_val_if_fail(priv != NULL, -1); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
462 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
463 | return priv->totalsize; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
464 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
465 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
466 | int |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
467 | purple_counting_node_get_current_size(PurpleCountingNode *counter) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
468 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
469 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
470 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
471 | g_return_val_if_fail(priv != NULL, -1); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
472 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
473 | return priv->currentsize; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
474 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
475 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
476 | int |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
477 | purple_counting_node_get_online_count(PurpleCountingNode *counter) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
478 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
479 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
480 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
481 | g_return_val_if_fail(priv != NULL, -1); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
482 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
483 | return priv->onlinecount; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
484 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
485 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
486 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
487 | purple_counting_node_change_total_size(PurpleCountingNode *counter, int delta) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
488 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
489 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
490 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
491 | g_return_if_fail(priv != NULL); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
492 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
493 | purple_counting_node_set_total_size(counter, priv->totalsize + delta); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
494 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
495 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
496 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
497 | purple_counting_node_change_current_size(PurpleCountingNode *counter, int delta) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
498 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
499 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
500 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
501 | g_return_if_fail(priv != NULL); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
502 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
503 | purple_counting_node_set_current_size(counter, priv->currentsize + delta); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
504 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
505 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
506 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
507 | purple_counting_node_change_online_count(PurpleCountingNode *counter, int delta) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
508 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
509 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
510 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
511 | g_return_if_fail(priv != NULL); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
512 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
513 | purple_counting_node_set_online_count(counter, priv->onlinecount + delta); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
514 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
515 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
516 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
517 | purple_counting_node_set_total_size(PurpleCountingNode *counter, int totalsize) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
518 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
519 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
520 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
521 | g_return_if_fail(priv != NULL); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
522 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
523 | priv->totalsize = totalsize; |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
524 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
525 | g_object_notify_by_pspec(G_OBJECT(counter), |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
526 | cn_properties[CNODE_PROP_TOTAL_SIZE]); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
527 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
528 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
529 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
530 | purple_counting_node_set_current_size(PurpleCountingNode *counter, int currentsize) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
531 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
532 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
533 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
534 | g_return_if_fail(priv != NULL); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
535 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
536 | priv->currentsize = currentsize; |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
537 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
538 | g_object_notify_by_pspec(G_OBJECT(counter), |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
539 | cn_properties[CNODE_PROP_CURRENT_SIZE]); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
540 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
541 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
542 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
543 | purple_counting_node_set_online_count(PurpleCountingNode *counter, int onlinecount) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
544 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
545 | PurpleCountingNodePrivate *priv = PURPLE_COUNTING_NODE_GET_PRIVATE(counter); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
546 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
547 | g_return_if_fail(priv != NULL); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
548 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
549 | priv->onlinecount = onlinecount; |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
550 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
551 | g_object_notify_by_pspec(G_OBJECT(counter), |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
552 | cn_properties[CNODE_PROP_ONLINE_COUNT]); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
553 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
554 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
555 | /************************************************************************** |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
556 | * GObject code for PurpleCountingNode |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
557 | **************************************************************************/ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
558 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
559 | /* Set method for GObject properties */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
560 | static void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
561 | purple_counting_node_set_property(GObject *obj, guint param_id, const GValue *value, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
562 | GParamSpec *pspec) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
563 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
564 | PurpleCountingNode *node = PURPLE_COUNTING_NODE(obj); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
565 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
566 | switch (param_id) { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
567 | case CNODE_PROP_TOTAL_SIZE: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
568 | purple_counting_node_set_total_size(node, g_value_get_int(value)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
569 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
570 | case CNODE_PROP_CURRENT_SIZE: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
571 | purple_counting_node_set_current_size(node, g_value_get_int(value)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
572 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
573 | case CNODE_PROP_ONLINE_COUNT: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
574 | purple_counting_node_set_online_count(node, g_value_get_int(value)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
575 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
576 | default: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
577 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
578 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
579 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
580 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
581 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
582 | /* Get method for GObject properties */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
583 | static void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
584 | purple_counting_node_get_property(GObject *obj, guint param_id, GValue *value, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
585 | GParamSpec *pspec) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
586 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
587 | PurpleCountingNode *node = PURPLE_COUNTING_NODE(obj); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
588 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
589 | switch (param_id) { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
590 | case CNODE_PROP_TOTAL_SIZE: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
591 | g_value_set_int(value, purple_counting_node_get_total_size(node)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
592 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
593 | case CNODE_PROP_CURRENT_SIZE: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
594 | g_value_set_int(value, purple_counting_node_get_current_size(node)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
595 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
596 | case CNODE_PROP_ONLINE_COUNT: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
597 | g_value_set_int(value, purple_counting_node_get_online_count(node)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
598 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
599 | default: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
600 | G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
601 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
602 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
603 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
604 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
605 | /* Class initializer function */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
606 | static void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
607 | purple_counting_node_class_init(PurpleCountingNodeClass *klass) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
608 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
609 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
610 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
611 | /* Setup properties */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
612 | obj_class->get_property = purple_counting_node_get_property; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
613 | obj_class->set_property = purple_counting_node_set_property; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
614 | |
|
35085
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
615 | g_type_class_add_private(klass, sizeof(PurpleCountingNodePrivate)); |
|
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
616 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
617 | cn_properties[CNODE_PROP_TOTAL_SIZE] = g_param_spec_int("total-size", |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
618 | "Total size", |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
619 | "The number of children under this node.", |
|
35066
f997e5384f79
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
35058
diff
changeset
|
620 | G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
621 | G_PARAM_STATIC_STRINGS); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
622 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
623 | cn_properties[CNODE_PROP_CURRENT_SIZE] = g_param_spec_int("current-size", |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
624 | "Current size", |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
625 | "The number of children with online accounts.", |
|
35066
f997e5384f79
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
35058
diff
changeset
|
626 | G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
627 | G_PARAM_STATIC_STRINGS); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
628 | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
629 | cn_properties[CNODE_PROP_ONLINE_COUNT] = g_param_spec_int("online-count", |
|
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
630 | "Online count", |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
631 | "The number of children that are online.", |
|
35066
f997e5384f79
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
35058
diff
changeset
|
632 | G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | |
|
35080
58bddd91956c
libpurple: use g_object_notify_by_pspec instead of g_object_notify
Ankit Vani <a@nevitus.org>
parents:
35066
diff
changeset
|
633 | G_PARAM_STATIC_STRINGS); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
634 | |
|
35085
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
635 | g_object_class_install_properties(obj_class, CNODE_PROP_LAST, |
|
abab0adfa0ec
libpurple: use g_object_class_install_properties instead of repeated g_object_class_install_property
Ankit Vani <a@nevitus.org>
parents:
35080
diff
changeset
|
636 | cn_properties); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
637 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
638 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
639 | GType |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
640 | purple_counting_node_get_type(void) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
641 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
642 | static GType type = 0; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
643 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
644 | if(type == 0) { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
645 | static const GTypeInfo info = { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
646 | sizeof(PurpleCountingNodeClass), |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
647 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
648 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
649 | (GClassInitFunc)purple_counting_node_class_init, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
650 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
651 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
652 | sizeof(PurpleCountingNode), |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
653 | 0, |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
654 | NULL, |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
655 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
656 | }; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
657 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
658 | type = g_type_register_static(PURPLE_TYPE_BLIST_NODE, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
659 | "PurpleCountingNode", |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
660 | &info, G_TYPE_FLAG_ABSTRACT); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
661 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
662 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
663 | return type; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
664 | } |