Merged default branch soc.2013.gobjectification.plugins

Fri, 21 Feb 2014 02:52:27 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 21 Feb 2014 02:52:27 +0530
branch
soc.2013.gobjectification.plugins
changeset 37118
5bbf6b8c30fd
parent 37117
ece784fc00a9 (current diff)
parent 35595
855c4a88c3c6 (diff)
child 37119
fdd7282fdad6

Merged default branch

finch/libgnt/gntfilesel.h file | annotate | diff | comparison | revisions
finch/libgnt/gnttree.h file | annotate | diff | comparison | revisions
libpurple/buddylist.c file | annotate | diff | comparison | revisions
--- a/README.hg	Wed Feb 19 18:13:59 2014 +0530
+++ b/README.hg	Fri Feb 21 02:52:27 2014 +0530
@@ -19,12 +19,12 @@
 check out the information available at: https://developer.pidgin.im
 
 By far the best documentation, however, is the documented code.  You can pass
-"--enable-gtk-doc" to ./configure before running "make" in the source tree to
-generate pretty documentation using gtk-doc.  Otherwise (or even if you do!),
-the header files for each subsystem contain documentation for the functions they
-contain.  For instance, conversation.h contains documentation for the entire
-purple_conversation_* API, and account.h contains documentation for the
-purple_account_* API.
+"--enable-gtk-doc" to ./configure then run "make" in the source tree to
+generate pretty documentation in the doc/reference/*/html directories.
+Otherwise (or even if you do!), the header files for each subsystem contain
+documentation for the functions they contain.  For instance, conversation.h
+contains documentation for the entire purple_conversation_* API, and account.h
+contains documentation for the purple_account_* API.
 
 If you have questions, please feel free to contact the Pidgin, Finch, and
 libpurple developers by email at devel@pidgin.im or on IRC at irc.freenode.net
--- a/finch/libgnt/gntfilesel.c	Wed Feb 19 18:13:59 2014 +0530
+++ b/finch/libgnt/gntfilesel.c	Fri Feb 21 02:52:27 2014 +0530
@@ -184,6 +184,8 @@
 static void
 gnt_file_free(GntFile *file)
 {
+	g_return_if_fail(file != NULL);
+
 	g_free(file->fullpath);
 	g_free(file->basename);
 	g_free(file);
@@ -685,4 +687,35 @@
 	sel->read_fn = read_fn;
 }
 
+/**************************************************************************
+ * GntFile GBoxed API
+ **************************************************************************/
+static GntFile *
+gnt_file_copy(GntFile *file)
+{
+	GntFile *file_new;
 
+	g_return_val_if_fail(file != NULL, NULL);
+
+	file_new = g_new(GntFile, 1);
+	*file_new = *file;
+
+	file_new->fullpath = g_strdup(file->fullpath);
+	file_new->basename = g_strdup(file->basename);
+
+	return file_new;
+}
+
+GType
+gnt_file_get_type(void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		type = g_boxed_type_register_static("GntFile",
+				(GBoxedCopyFunc)gnt_file_copy,
+				(GBoxedFreeFunc)gnt_file_free);
+	}
+
+	return type;
+}
--- a/finch/libgnt/gntfilesel.h	Wed Feb 19 18:13:59 2014 +0530
+++ b/finch/libgnt/gntfilesel.h	Fri Feb 21 02:52:27 2014 +0530
@@ -45,6 +45,8 @@
 #define GNT_FILE_SEL_SET_FLAGS(obj, flags)		(GNT_FILE_SEL_FLAGS(obj) |= flags)
 #define GNT_FILE_SEL_UNSET_FLAGS(obj, flags)	(GNT_FILE_SEL_FLAGS(obj) &= ~(flags))
 
+#define GNT_TYPE_FILE					(gnt_file_get_type())
+
 typedef struct _GntFileSel			GntFileSel;
 typedef struct _GntFileSelPriv		GntFileSelPriv;
 typedef struct _GntFileSelClass		GntFileSelClass;
@@ -109,6 +111,13 @@
 GType gnt_file_sel_get_type(void);
 
 /**
+ * gnt_file_get_type:
+ *
+ * Returns: The #GType for the #GntFile boxed structure.
+ */
+GType gnt_file_get_type(void);
+
+/**
  * gnt_file_sel_new:
  *
  * Create a new file selector.
--- a/finch/libgnt/gnttree.c	Wed Feb 19 18:13:59 2014 +0530
+++ b/finch/libgnt/gnttree.c	Fri Feb 21 02:52:27 2014 +0530
@@ -1955,3 +1955,32 @@
 	return row->parent;
 }
 
+/**************************************************************************
+ * GntTreeRow GBoxed API
+ **************************************************************************/
+static GntTreeRow *
+copy_tree_row(GntTreeRow *row)
+{
+	GntTreeRow *row_new;
+
+	g_return_val_if_fail(row != NULL, NULL);
+
+	row_new = g_new(GntTreeRow, 1);
+	*row_new = *row;
+
+	return row_new;
+}
+
+GType
+gnt_tree_row_get_type(void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		type = g_boxed_type_register_static("GntTreeRow",
+				(GBoxedCopyFunc)copy_tree_row,
+				(GBoxedFreeFunc)free_tree_row);
+	}
+
+	return type;
+}
--- a/finch/libgnt/gnttree.h	Wed Feb 19 18:13:59 2014 +0530
+++ b/finch/libgnt/gnttree.h	Fri Feb 21 02:52:27 2014 +0530
@@ -42,6 +42,8 @@
 #define GNT_IS_TREE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_TREE))
 #define GNT_TREE_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_TREE, GntTreeClass))
 
+#define GNT_TYPE_TREE_ROW			(gnt_tree_row_get_type())
+
 typedef guint (*GntTreeHashFunc)(gconstpointer);
 typedef gboolean (*GntTreeHashEqualityFunc)(gconstpointer, gconstpointer);
 
@@ -118,6 +120,13 @@
 GType gnt_tree_get_type(void);
 
 /**
+ * gnt_tree_row_get_type:
+ *
+ * Returns: The #GType for the #GntTreeRow boxed structure.
+ */
+GType gnt_tree_row_get_type(void);
+
+/**
  * gnt_tree_new:
  *
  * Create a tree with one column.
--- a/libpurple/buddylist.c	Wed Feb 19 18:13:59 2014 +0530
+++ b/libpurple/buddylist.c	Fri Feb 21 02:52:27 2014 +0530
@@ -1364,7 +1364,7 @@
 		if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
 			purple_counting_node_change_online_count(contact_counter, -1);
 			if (purple_counting_node_get_online_count(contact_counter) == 0)
-				purple_counting_node_set_online_count(group_counter, -1);
+				purple_counting_node_change_online_count(group_counter, -1);
 		}
 		if (purple_account_is_connected(account)) {
 			purple_counting_node_change_current_size(contact_counter, -1);

mercurial