cpw.nader.asynclogging-3: c198de73: Hooked up the constructed function for P...

morshed.nader at gmail.com morshed.nader at gmail.com
Thu Jan 13 21:05:52 EST 2011


----------------------------------------------------------------------
Revision: c198de7361c9db900c80ebe8fd7d0a53875e4ea8
Parent:   f3f2ce131743f7b3cb698e6204e35d1bff343d3c
Author:   morshed.nader at gmail.com
Date:     01/13/11 17:50:12
Branch:   im.pidgin.cpw.nader.asynclogging-3
URL: http://d.pidgin.im/viewmtn/revision/info/c198de7361c9db900c80ebe8fd7d0a53875e4ea8

Changelog: 

Hooked up the constructed function for PidginLogViewer

Changes against parent f3f2ce131743f7b3cb698e6204e35d1bff343d3c

  patched  pidgin/gtklog.c

-------------- next part --------------
============================================================
--- pidgin/gtklog.c	cd450e7397fc939752f81d9dac07149c8398c6f1
+++ pidgin/gtklog.c	c27818744b39843433c8e9d8a18f75d2639873b6
@@ -1422,67 +1422,10 @@ static void
 }
 
 static void
-pidgin_log_viewer_finalize(GObject *object)
+pidgin_log_viewer_constructed(GObject *object)
 {
-	PidginLogViewer *lv = PIDGIN_LOG_VIEWER(object);
-	// PidginLogViewerPrivate *priv = PIDGIN_LOG_VIEWER_GET_PRIVATE(lv);
-
-	purple_request_close_with_handle(lv);
-
-	// Move these into a finalize function
-	pidgin_log_viewer_clear_logs(lv);
-	pidgin_log_viewer_set_search_string(lv, NULL);
-	pidgin_log_viewer_set_read_cancel(lv, NULL);
-	pidgin_log_viewer_set_search_cancel(lv, NULL);
-	pidgin_log_viewer_set_list_cancel(lv, NULL);
-	g_object_unref(lv);
-
-	// gtk_widget_destroy(w);
-}
-
-static void
-pidgin_log_viewer_class_init(PidginLogViewerClass *class)
-{
-	GObjectClass *gobject_class = G_OBJECT_CLASS(class);
-
-	gobject_class->set_property = pidgin_log_viewer_set_property;
-	gobject_class->get_property = pidgin_log_viewer_get_property;
-	gobject_class->finalize = pidgin_log_viewer_finalize;
-
-	// properties[PROP_LOG_CHAT_TYPE] =
-		// g_param_spec_enum("chat-type",
-			// "Chat Type",
-			// "The chat type of the log",
-			// PURPLE_TYPE_LOG_CHAT_TYPE,
-			// PURPLE_LOG_SYSTEM,
-			// G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
-
-	// Icon : Constructor only
-
-	// g_object_class_install_property(gobject_class,
-		// PROP_LOG_CHAT_TYPE,
-		// properties[PROP_LOG_CHAT_TYPE]);
-
-	g_type_class_add_private(gobject_class, sizeof(PidginLogViewerPrivate));
-}
-
-static void
-pidgin_log_viewer_init(PidginLogViewer *lv)
-{
+	PidginLogViewer *lv;
 	PidginLogViewerPrivate *priv = PIDGIN_LOG_VIEWER_GET_PRIVATE(lv);
-
-	priv->logs = NULL;
-	priv->size = 0;
-	priv->read_cancel = NULL;
-	priv->search_cancel = NULL;
-	priv->list_cancel = NULL;
-	priv->selected = FALSE;
-}
-
-static void
-pidgin_log_viewer_constructed(PidginLogViewer *lv)
-{
-	PidginLogViewerPrivate *priv = PIDGIN_LOG_VIEWER_GET_PRIVATE(lv);
 	GtkCellRenderer *rend;
 	GtkTreeViewColumn *col;
 	GtkTreeSelection *sel;
@@ -1620,6 +1563,65 @@ pidgin_log_viewer_constructed(PidginLogV
 #endif
 }
 
+static void
+pidgin_log_viewer_finalize(GObject *object)
+{
+	PidginLogViewer *lv = PIDGIN_LOG_VIEWER(object);
+	// PidginLogViewerPrivate *priv = PIDGIN_LOG_VIEWER_GET_PRIVATE(lv);
+
+	purple_request_close_with_handle(lv);
+
+	// Move these into a finalize function
+	pidgin_log_viewer_clear_logs(lv);
+	pidgin_log_viewer_set_search_string(lv, NULL);
+	pidgin_log_viewer_set_read_cancel(lv, NULL);
+	pidgin_log_viewer_set_search_cancel(lv, NULL);
+	pidgin_log_viewer_set_list_cancel(lv, NULL);
+	g_object_unref(lv);
+
+	// gtk_widget_destroy(w);
+}
+
+static void
+pidgin_log_viewer_class_init(PidginLogViewerClass *class)
+{
+	GObjectClass *gobject_class = G_OBJECT_CLASS(class);
+
+	gobject_class->set_property = pidgin_log_viewer_set_property;
+	gobject_class->get_property = pidgin_log_viewer_get_property;
+	gobject_class->constructed = pidgin_log_viewer_constructed;
+	gobject_class->finalize = pidgin_log_viewer_finalize;
+
+	// properties[PROP_LOG_CHAT_TYPE] =
+		// g_param_spec_enum("chat-type",
+			// "Chat Type",
+			// "The chat type of the log",
+			// PURPLE_TYPE_LOG_CHAT_TYPE,
+			// PURPLE_LOG_SYSTEM,
+			// G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+
+	// Icon : Constructor only
+
+	// g_object_class_install_property(gobject_class,
+		// PROP_LOG_CHAT_TYPE,
+		// properties[PROP_LOG_CHAT_TYPE]);
+
+	g_type_class_add_private(gobject_class, sizeof(PidginLogViewerPrivate));
+}
+
+static void
+pidgin_log_viewer_init(PidginLogViewer *lv)
+{
+	PidginLogViewerPrivate *priv = PIDGIN_LOG_VIEWER_GET_PRIVATE(lv);
+
+	priv->logs = NULL;
+	priv->size = 0;
+	priv->read_cancel = NULL;
+	priv->search_cancel = NULL;
+	priv->list_cancel = NULL;
+	priv->selected = FALSE;
+}
+
 /****************************************************************************
  * GTK+ LOG SUBSYSTEM *******************************************************
  ****************************************************************************/


More information about the Commits mailing list