From 0859d42faed775ce440ff18ed86e150b3f904424 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Jan 2008 15:13:47 +0000 Subject: ** Fix for bug #502303 2008-01-11 Milan Crha ** 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. svn path=/trunk/; revision=34799 --- plugins/plugin-manager/ChangeLog | 11 +++++++++++ plugins/plugin-manager/plugin-manager.c | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/plugins/plugin-manager/ChangeLog b/plugins/plugin-manager/ChangeLog index 2f09d9165e..868fe13f03 100644 --- a/plugins/plugin-manager/ChangeLog +++ b/plugins/plugin-manager/ChangeLog @@ -1,3 +1,14 @@ +2008-01-11 Milan Crha + + ** 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. + 2008-02-01 Andre Klapper * plugin-manager.c: (org_gnome_plugin_manager_manage): diff --git a/plugins/plugin-manager/plugin-manager.c b/plugins/plugin-manager/plugin-manager.c index 733c776064..3fadd007dc 100644 --- a/plugins/plugin-manager/plugin-manager.c +++ b/plugins/plugin-manager/plugin-manager.c @@ -196,10 +196,8 @@ eppm_free (void *data) 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 @@ org_gnome_plugin_manager_manage (void *ep, ESMenuTargetShell *t) GtkWidget *subvbox; if (dialog) { - gdk_window_raise (GTK_WIDGET (dialog)->window); + gtk_window_present (GTK_WINDOW (dialog)); return; } @@ -280,7 +278,7 @@ org_gnome_plugin_manager_manage (void *ep, ESMenuTargetShell *t) 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 @@ org_gnome_plugin_manager_manage (void *ep, ESMenuTargetShell *t) 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)); } -- cgit v1.2.3