Sun, 17 Nov 2013 18:11:04 +0530
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
|
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 | */ |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
23 | #include "blistnodetypes.h" |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
24 | #include "internal.h" |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
25 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
26 | #define PURPLE_BLIST_NODE_GET_PRIVATE(obj) \ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
27 | (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
|
28 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
29 | /** @copydoc _PurpleBlistNodePrivate */ |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
30 | typedef struct _PurpleBlistNodePrivate PurpleBlistNodePrivate; |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
31 | |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
32 | #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
|
33 | (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
|
34 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
35 | /** @copydoc _PurpleCountingNodePrivate */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
36 | typedef struct _PurpleCountingNodePrivate PurpleCountingNodePrivate; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
37 | |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
38 | /** Private data of a buddy list node */ |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
39 | 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
|
40 | GHashTable *settings; /**< per-node settings */ |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
41 | 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
|
42 | }; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
43 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
44 | /* 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
|
45 | 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
|
46 | { |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
47 | 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
|
48 | BLNODE_PROP_TRANSIENT, |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
49 | BLNODE_PROP_LAST |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
50 | }; |
|
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 | /** 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
|
53 | struct _PurpleCountingNodePrivate { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
54 | 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
|
55 | 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
|
56 | corresponding to online accounts */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
57 | 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
|
58 | currently online */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
59 | }; |
|
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 | /* Counting node property enums */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
62 | enum |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
63 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
64 | CNODE_PROP_0, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
65 | CNODE_PROP_TOTAL_SIZE, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
66 | CNODE_PROP_CURRENT_SIZE, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
67 | CNODE_PROP_ONLINE_COUNT, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
68 | 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
|
69 | }; |
|
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 | 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
|
72 | |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
73 | /**************************************************************************/ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
74 | /* Buddy list node API */ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
75 | /**************************************************************************/ |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
76 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
77 | static PurpleBlistNode *get_next_node(PurpleBlistNode *node, gboolean godeep) |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
78 | { |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
79 | if (node == NULL) |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
80 | return NULL; |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
81 | |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
82 | if (godeep && node->child) |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
83 | return node->child; |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
84 | |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
85 | if (node->next) |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
86 | return node->next; |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
87 | |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
88 | return get_next_node(node->parent, FALSE); |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
89 | } |
|
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
90 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
91 | 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
|
92 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
93 | PurpleBlistNode *ret = node; |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
94 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
95 | if (offline) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
96 | return get_next_node(ret, TRUE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
97 | do |
|
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 | ret = get_next_node(ret, TRUE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
100 | } while (ret && PURPLE_IS_BUDDY(ret) && |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
101 | !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
|
102 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
103 | return ret; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
104 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
105 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
106 | PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
107 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
108 | return node ? node->parent : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
109 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
110 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
111 | 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
|
112 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
113 | return node ? node->child : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
114 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
115 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
116 | 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
|
117 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
118 | return node? node->next : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
119 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
120 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
121 | 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
|
122 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
123 | return node? node->prev : NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
124 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
125 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
126 | void * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
127 | 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
|
128 | { |
|
34983
81638be26f41
Check types of GObjects instead of just for NULL values
Ankit Vani <a@nevitus.org>
parents:
34865
diff
changeset
|
129 | 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
|
130 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
131 | return node->ui_data; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
132 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
133 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
134 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
135 | 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
|
136 | 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
|
137 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
138 | node->ui_data = ui_data; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
139 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
140 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
141 | 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
|
142 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
143 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
144 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
145 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
146 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
147 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
148 | g_return_if_fail(key != NULL); |
|
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_hash_table_remove(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
151 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
152 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
153 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
154 | ops->save_node(node); |
|
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 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
157 | void |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
158 | 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
|
159 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
160 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
161 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
162 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
163 | |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
164 | 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
|
165 | |
|
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
166 | g_object_notify(G_OBJECT(node), "transient"); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
167 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
168 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
169 | gboolean |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
170 | purple_blist_node_is_transient(PurpleBlistNode *node) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
171 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
172 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
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 | g_return_val_if_fail(priv != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
175 | |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
176 | return priv->transient; |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
177 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
178 | |
| 34730 | 179 | GHashTable * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
180 | purple_blist_node_get_settings(PurpleBlistNode *node) |
| 34730 | 181 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
182 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
| 34730 | 183 | |
| 184 | g_return_val_if_fail(priv != NULL, NULL); | |
| 185 | ||
| 186 | return priv->settings; | |
| 187 | } | |
| 188 | ||
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
189 | gboolean |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
190 | 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
|
191 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
192 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
193 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
194 | g_return_val_if_fail(priv != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
195 | g_return_val_if_fail(priv->settings != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
196 | g_return_val_if_fail(key != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
197 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
198 | /* 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
|
199 | return (g_hash_table_lookup(priv->settings, key) != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
200 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
201 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
202 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
203 | 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
|
204 | { |
|
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
|
205 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
206 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
207 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
208 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
209 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
210 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
211 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
212 | |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
213 | 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
|
214 | g_value_set_boolean(value, data); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
215 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
216 | 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
|
217 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
218 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
219 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
220 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
221 | } |
|
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 | gboolean |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
224 | 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
|
225 | { |
|
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
|
226 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
227 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
228 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
229 | g_return_val_if_fail(priv != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
230 | g_return_val_if_fail(priv->settings != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
231 | g_return_val_if_fail(key != NULL, FALSE); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
232 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
233 | value = g_hash_table_lookup(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
234 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
235 | if (value == NULL) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
236 | return FALSE; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
237 | |
|
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
|
238 | 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
|
239 | |
|
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
|
240 | return g_value_get_boolean(value); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
241 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
242 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
243 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
244 | 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
|
245 | { |
|
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
|
246 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
247 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
248 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
249 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
250 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
251 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
252 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
253 | |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
254 | 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
|
255 | g_value_set_int(value, data); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
256 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
257 | 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
|
258 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
259 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
260 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
261 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
262 | } |
|
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 | int |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
265 | 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
|
266 | { |
|
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
|
267 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
268 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
269 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
270 | g_return_val_if_fail(priv != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
271 | g_return_val_if_fail(priv->settings != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
272 | g_return_val_if_fail(key != NULL, 0); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
273 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
274 | value = g_hash_table_lookup(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
275 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
276 | if (value == NULL) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
277 | return 0; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
278 | |
|
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
|
279 | 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
|
280 | |
|
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
|
281 | return g_value_get_int(value); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
282 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
283 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
284 | void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
285 | 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
|
286 | { |
|
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
|
287 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
288 | PurpleBlistUiOps *ops; |
|
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
289 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
290 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
291 | g_return_if_fail(priv != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
292 | g_return_if_fail(priv->settings != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
293 | g_return_if_fail(key != NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
294 | |
|
35005
bff56dfca65d
Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents:
34983
diff
changeset
|
295 | value = purple_value_new(G_TYPE_STRING); |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
296 | g_value_set_string(value, data); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
297 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
298 | 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
|
299 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
300 | ops = purple_blist_get_ui_ops(); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
301 | if (ops && ops->save_node) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
302 | ops->save_node(node); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
303 | } |
|
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 | const char * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
306 | 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
|
307 | { |
|
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
|
308 | GValue *value; |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
309 | PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
310 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
311 | g_return_val_if_fail(priv != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
312 | g_return_val_if_fail(priv->settings != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
313 | g_return_val_if_fail(key != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
314 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
315 | value = g_hash_table_lookup(priv->settings, key); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
316 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
317 | if (value == NULL) |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
318 | return NULL; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
319 | |
|
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
|
320 | 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
|
321 | |
|
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
|
322 | return g_value_get_string(value); |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
323 | } |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
324 | |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
325 | GList * |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
326 | purple_blist_node_get_extended_menu(PurpleBlistNode *n) |
|
34707
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
327 | { |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
328 | GList *menu = NULL; |
|
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 | g_return_val_if_fail(n != NULL, NULL); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
331 | |
|
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
|
332 | 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
|
333 | n, &menu); |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
334 | return menu; |
|
d433bf40792a
Added blistnode.[ch] and blistnodetypes.[ch]
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
335 | } |
|
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
|
336 | |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
337 | /************************************************************************** |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
338 | * GObject code for PurpleBlistNode |
|
34713
e4fc06261814
GObjectified PurpleBListNode source
Ankit Vani <a@nevitus.org>
parents:
34712
diff
changeset
|
339 | **************************************************************************/ |
|
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
|
340 | |
|
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 | /* 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
|
342 | 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
|
343 | 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
|
344 | 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
|
345 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
346 | 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
|
347 | |
|
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 | 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
|
349 | case BLNODE_PROP_TRANSIENT: |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
350 | 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
|
351 | 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
|
352 | 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
|
353 | 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
|
354 | 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
|
355 | } |
|
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 | } |
|
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 | |
|
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 | /* 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
|
359 | 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
|
360 | 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
|
361 | 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
|
362 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
363 | 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
|
364 | |
|
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 | 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
|
366 | case BLNODE_PROP_TRANSIENT: |
|
34865
764a33b41ac7
Renamed blist node's dont_save to transient.
Ankit Vani <a@nevitus.org>
parents:
34864
diff
changeset
|
367 | 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
|
368 | 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
|
369 | 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
|
370 | 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
|
371 | 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
|
372 | } |
|
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 | } |
|
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 | |
|
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 | /* 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
|
376 | 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
|
377 | 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
|
378 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
379 | 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
|
380 | |
|
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 | 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
|
382 | (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
|
383 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
384 | |
|
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 | /* 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
|
386 | 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
|
387 | 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
|
388 | { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
389 | 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
|
390 | |
|
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 | 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
|
392 | |
|
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 | 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
|
394 | } |
|
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 | /* 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
|
397 | static void |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
398 | 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
|
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 | 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
|
401 | |
|
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 | 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
|
403 | |
|
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 | 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
|
405 | |
|
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 | /* 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
|
407 | 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
|
408 | 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
|
409 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
410 | g_object_class_install_property(obj_class, BLNODE_PROP_TRANSIENT, |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
411 | g_param_spec_boolean("transient", "Transient", |
|
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
412 | "Whether node should not be saved with the buddy list.", |
|
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
|
413 | 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
|
414 | ); |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
415 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
416 | g_type_class_add_private(klass, sizeof(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
|
417 | } |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
418 | |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
419 | 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
|
420 | 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
|
421 | { |
|
caeb3904c991
Added GObject code to PurpleBListNode. Changed blist node setting value from PurpleValue to GValue.
Ankit Vani <a@nevitus.org>
parents:
34709
diff
changeset
|
422 | 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
|
423 | |
|
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 | 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
|
425 | static const GTypeInfo info = { |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
426 | 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
|
427 | 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
|
428 | 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
|
429 | (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
|
430 | 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
|
431 | NULL, |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
432 | 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
|
433 | 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
|
434 | (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
|
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 | }; |
|
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 | |
|
34864
0e292d8887de
Renamed PurpleBListNode back to PurpleBlistNode
Ankit Vani <a@nevitus.org>
parents:
34852
diff
changeset
|
438 | 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
|
439 | &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
|
440 | } |
|
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 | |
|
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 | 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
|
443 | } |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
444 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
445 | /**************************************************************************/ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
446 | /* Counting node API */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
447 | /**************************************************************************/ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
448 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
449 | int |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
450 | 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
|
451 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
452 | 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
|
453 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
454 | 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
|
455 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
456 | return priv->totalsize; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
457 | } |
|
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 | int |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
460 | 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
|
461 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
462 | 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
|
463 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
464 | 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
|
465 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
466 | return priv->currentsize; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
467 | } |
|
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 | int |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
470 | 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
|
471 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
472 | 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
|
473 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
474 | 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
|
475 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
476 | return priv->onlinecount; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
477 | } |
|
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 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
480 | 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
|
481 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
482 | 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
|
483 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
484 | 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
|
485 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
486 | 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
|
487 | } |
|
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 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
490 | 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
|
491 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
492 | 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
|
493 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
494 | 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
|
495 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
496 | 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
|
497 | } |
|
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 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
500 | 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
|
501 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
502 | 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
|
503 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
504 | 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
|
505 | |
|
35010
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
506 | 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
|
507 | } |
|
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 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
510 | 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
|
511 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
512 | 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
|
513 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
514 | 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
|
515 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
516 | 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
|
517 | |
|
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
518 | g_object_notify(G_OBJECT(counter), "total-size"); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
519 | } |
|
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 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
522 | 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
|
523 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
524 | 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
|
525 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
526 | 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
|
527 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
528 | 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
|
529 | |
|
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
530 | g_object_notify(G_OBJECT(counter), "current-size"); |
|
34722
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 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
533 | void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
534 | 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
|
535 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
536 | 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
|
537 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
538 | 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
|
539 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
540 | 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
|
541 | |
|
9c2d352b1d96
Cleaned up properties and added g_object_notify calls for PurpleAccount and PurpleBlistNodes
Ankit Vani <a@nevitus.org>
parents:
35005
diff
changeset
|
542 | g_object_notify(G_OBJECT(counter), "online-count"); |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
543 | } |
|
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 | /************************************************************************** |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
546 | * GObject code for PurpleCountingNode |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
547 | **************************************************************************/ |
|
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 | /* 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
|
550 | static void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
551 | 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
|
552 | GParamSpec *pspec) |
|
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 | 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
|
555 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
556 | switch (param_id) { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
557 | 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
|
558 | 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
|
559 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
560 | 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
|
561 | 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
|
562 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
563 | 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
|
564 | 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
|
565 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
566 | default: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
567 | 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
|
568 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
569 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
570 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
571 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
572 | /* 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
|
573 | static void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
574 | 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
|
575 | GParamSpec *pspec) |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
576 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
577 | 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
|
578 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
579 | switch (param_id) { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
580 | 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
|
581 | 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
|
582 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
583 | 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
|
584 | 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
|
585 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
586 | 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
|
587 | 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
|
588 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
589 | default: |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
590 | 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
|
591 | break; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
592 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
593 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
594 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
595 | /* Class initializer function */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
596 | static void |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
597 | 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
|
598 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
599 | 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
|
600 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
601 | /* Setup properties */ |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
602 | 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
|
603 | 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
|
604 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
605 | g_object_class_install_property(obj_class, CNODE_PROP_TOTAL_SIZE, |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
606 | g_param_spec_int("total-size", "Total size", |
|
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
607 | "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
|
608 | G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | |
|
f997e5384f79
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
35058
diff
changeset
|
609 | 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
|
610 | ); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
611 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
612 | g_object_class_install_property(obj_class, CNODE_PROP_CURRENT_SIZE, |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
613 | g_param_spec_int("current-size", "Current size", |
|
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
614 | "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
|
615 | G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | |
|
f997e5384f79
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
35058
diff
changeset
|
616 | 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
|
617 | ); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
618 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
619 | g_object_class_install_property(obj_class, CNODE_PROP_ONLINE_COUNT, |
|
35058
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
620 | g_param_spec_int("online-count", "Online count", |
|
506740af931c
Unmark property names and blurbs from translatable to non-translatable
Ankit Vani <a@nevitus.org>
parents:
35010
diff
changeset
|
621 | "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
|
622 | G_MININT, G_MAXINT, 0, G_PARAM_READWRITE | |
|
f997e5384f79
libpurple: Use G_PARAM_STATIC_STRINGS and ensure g_object_notify is always called
Ankit Vani <a@nevitus.org>
parents:
35058
diff
changeset
|
623 | 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
|
624 | ); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
625 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
626 | g_type_class_add_private(klass, sizeof(PurpleCountingNodePrivate)); |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
627 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
628 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
629 | GType |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
630 | 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
|
631 | { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
632 | static GType type = 0; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
633 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
634 | if(type == 0) { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
635 | static const GTypeInfo info = { |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
636 | sizeof(PurpleCountingNodeClass), |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
637 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
638 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
639 | (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
|
640 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
641 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
642 | sizeof(PurpleCountingNode), |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
643 | 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
|
644 | NULL, |
|
34722
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
645 | NULL, |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
646 | }; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
647 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
648 | 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
|
649 | "PurpleCountingNode", |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
650 | &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
|
651 | } |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
652 | |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
653 | return type; |
|
32e636146d3f
Added PurpleCountingNode to blistnodes.[ch]. PurpleContact and PurpleGroup inherit PurpleCountingNode.
Ankit Vani <a@nevitus.org>
parents:
34713
diff
changeset
|
654 | } |