evolution r34799 - trunk/plugins/plugin-manager



Author: mcrha
Date: Fri Jan 11 15:13:47 2008
New Revision: 34799
URL: http://svn.gnome.org/viewvc/evolution?rev=34799&view=rev

Log:
2008-01-11  Milan Crha  <mcrha redhat com>

	** Fix for bug #502303

	* plugin-manager.c: (eppm_response):
	Always destroy dialog and unset global variable.
	* plugin-manager.c: (org_gnome_plugin_manager_manage):
	Use G_TYPE_POINTER instead of GTK_TYPE_WIDGET in a list store
	to get rid of reference counting troubles on configuration
	widgets of plugins. Remember created dialog for future use.



Modified:
   trunk/plugins/plugin-manager/ChangeLog
   trunk/plugins/plugin-manager/plugin-manager.c

Modified: trunk/plugins/plugin-manager/plugin-manager.c
==============================================================================
--- trunk/plugins/plugin-manager/plugin-manager.c	(original)
+++ trunk/plugins/plugin-manager/plugin-manager.c	Fri Jan 11 15:13:47 2008
@@ -196,10 +196,8 @@
 static void
 eppm_response (GtkDialog *w, int button, Manager *m)
 {
-	if (button == GTK_RESPONSE_CLOSE) {
-		gtk_widget_destroy (GTK_WIDGET (w));
-		dialog = NULL;
-	}
+	gtk_widget_destroy (GTK_WIDGET (w));
+	dialog = NULL;
 }
 
 void
@@ -217,7 +215,7 @@
 	GtkWidget *subvbox;
 
 	if (dialog) {
-		gdk_window_raise (GTK_WIDGET (dialog)->window);
+		gtk_window_present (GTK_WINDOW (dialog));
 		return;
 	}
 
@@ -280,7 +278,7 @@
 	gtk_widget_hide (def_configure_label);
 	gtk_box_pack_start (GTK_BOX (configure_page), def_configure_label, FALSE, FALSE, 6);
 
-	store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER, GTK_TYPE_WIDGET);
+	store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_POINTER);
 
 	/* fill store */
 	m->plugins = e_plugin_list_plugins ();
@@ -396,6 +394,8 @@
 	g_object_set_data_full (G_OBJECT (m->dialog), "plugin-manager", m, eppm_free);
 	g_signal_connect (m->dialog, "response", G_CALLBACK (eppm_response), m);
 
+	dialog = m->dialog;
+
 	gtk_widget_show (GTK_WIDGET (m->dialog));
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]