[network-manager-applet] editor: do not gtk_widget_destroy() dialog on "close" signal



commit 382617897314c0b0e2122cf4d1d5f94d1034aa16
Author: Jiří Klimeš <jklimes redhat com>
Date:   Tue Oct 8 08:54:43 2013 +0200

    editor: do not gtk_widget_destroy() dialog on "close" signal
    
    "response" signal is sufficient. It is issued for dialog closing too (Cancel,
    Esc, Alt-F4, ...).
    
    Trying to destroy dialog as a response to "close" signal caused:
    GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

 src/connection-editor/vpn-helpers.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
---
diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c
index ab9fe98..3bef7f2 100644
--- a/src/connection-editor/vpn-helpers.c
+++ b/src/connection-editor/vpn-helpers.c
@@ -224,13 +224,6 @@ out:
        g_free (info);
 }
 
-static void
-destroy_import_chooser (GtkWidget *dialog, gpointer user_data)
-{
-       g_free (user_data);
-       gtk_widget_destroy (dialog);
-}
-
 void
 vpn_import (VpnImportSuccessCallback callback, gpointer user_data)
 {
@@ -251,7 +244,6 @@ vpn_import (VpnImportSuccessCallback callback, gpointer user_data)
        info->callback = callback;
        info->user_data = user_data;
 
-       g_signal_connect (G_OBJECT (dialog), "close", G_CALLBACK (destroy_import_chooser), info);
        g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (import_vpn_from_file_cb), info);
        gtk_widget_show_all (dialog);
        gtk_window_present (GTK_WINDOW (dialog));
@@ -386,7 +378,6 @@ vpn_export (NMConnection *connection)
                }
        }
 
-       g_signal_connect (G_OBJECT (dialog), "close", G_CALLBACK (gtk_widget_destroy), NULL);
        g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (export_vpn_to_file_cb), g_object_ref 
(connection));
        gtk_widget_show_all (dialog);
        gtk_window_present (GTK_WINDOW (dialog));


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