pidgin/gtkconv.c

changeset 35609
6bcd0955c8a4
parent 35548
e3ee59a7965c
child 35610
24b06c5e7760
--- a/pidgin/gtkconv.c	Tue Feb 25 20:01:15 2014 +0530
+++ b/pidgin/gtkconv.c	Wed Feb 26 04:06:48 2014 +0530
@@ -11358,3 +11358,40 @@
 
 	return colors;
 }
+
+/**************************************************************************
+ * PidginWindow GBoxed code
+ **************************************************************************/
+static PidginWindow *
+pidgin_window_ref(PidginWindow *win)
+{
+	g_return_val_if_fail(win != NULL, NULL);
+
+	win->box_count++;
+
+	return win;
+}
+
+static void
+pidgin_window_unref(PidginWindow *win)
+{
+	g_return_if_fail(win != NULL);
+	g_return_if_fail(win->box_count >= 0);
+
+	if (!win->box_count--)
+		pidgin_conv_window_destroy(win);
+}
+
+GType
+pidgin_window_get_type(void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		type = g_boxed_type_register_static("PidginWindow",
+				(GBoxedCopyFunc)pidgin_window_ref,
+				(GBoxedFreeFunc)pidgin_window_unref);
+	}
+
+	return type;
+}

mercurial