Commit 0aa64509 authored by Dan Williams's avatar Dan Williams
Browse files

editor: really fix CEPolkitButton

Don't destroy widgets that glade owns; don't hide the Editor dialog
buttons either.
parent c9583f50
......@@ -320,7 +320,7 @@ dispose (GObject *object)
editor->orig_connection = NULL;
}
if (editor->window) {
gtk_widget_destroy (editor->window);
gtk_widget_hide (editor->window);
editor->window = NULL;
}
if (editor->xml) {
......@@ -392,7 +392,6 @@ nm_connection_editor_new (NMConnection *connection,
settings,
NM_SETTINGS_SYSTEM_PERMISSION_CONNECTION_MODIFY);
ce_polkit_button_set_use_polkit (CE_POLKIT_BUTTON (editor->ok_button), use_polkit);
g_object_ref_sink (editor->ok_button);
g_signal_connect (editor->ok_button, "actionable",
G_CALLBACK (ok_button_actionable_cb), editor);
......@@ -645,7 +644,6 @@ cancel_button_clicked_cb (GtkWidget *widget, gpointer user_data)
{
NMConnectionEditor *self = NM_CONNECTION_EDITOR (user_data);
gtk_widget_hide (widget);
g_signal_emit (self, editor_signals[EDITOR_DONE], 0, GTK_RESPONSE_CANCEL, NULL);
}
......@@ -660,7 +658,6 @@ ok_button_clicked_cb (GtkWidget *widget, gpointer user_data)
{
NMConnectionEditor *self = NM_CONNECTION_EDITOR (user_data);
gtk_widget_hide (widget);
g_signal_emit (self, editor_signals[EDITOR_DONE], 0, GTK_RESPONSE_OK, NULL);
}
......
......@@ -1065,8 +1065,6 @@ dispose (GObject *object)
if (list->unknown_icon)
g_object_unref (list->unknown_icon);
if (list->dialog)
gtk_widget_destroy (list->dialog);
if (list->gui)
g_object_unref (list->gui);
if (list->client)
......@@ -1249,7 +1247,6 @@ add_connection_buttons (NMConnectionList *self,
GTK_STOCK_EDIT,
self->system_settings,
NM_SETTINGS_SYSTEM_PERMISSION_CONNECTION_MODIFY);
g_object_ref_sink (button);
gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0);
action_info_set_button (info, button);
......@@ -1267,7 +1264,6 @@ add_connection_buttons (NMConnectionList *self,
GTK_STOCK_DELETE,
self->system_settings,
NM_SETTINGS_SYSTEM_PERMISSION_CONNECTION_MODIFY);
g_object_ref_sink (button);
gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0);
action_info_set_button (info, button);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment