aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 2097eee1f6..120a73f13f 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2622,7 +2622,7 @@ response (GtkDialog *dialog, int response, EContactEditor *editor)
else
e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (char *)categories);
}
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_hide(GTK_WIDGET(dialog));
}
static gboolean
@@ -2635,6 +2635,15 @@ categories_key_press_event( GtkWidget *widget, GdkEventKey *event, EContactEdito
return FALSE;
}
+static gint
+editor_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
+{
+ if (widget)
+ if (GTK_IS_WIDGET (widget))
+ gtk_widget_destroy(widget);
+ return TRUE;
+}
+
static void
categories_clicked (GtkWidget *button, EContactEditor *editor)
{
@@ -2656,7 +2665,11 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
g_signal_connect (GTK_WIDGET (dialog), "key-press-event", G_CALLBACK (categories_key_press_event), editor);
g_signal_connect(dialog, "response",
- G_CALLBACK (response), editor);
+ G_CALLBACK (response), editor);
+
+ /* Close the category dialog if the editor is closed*/
+ g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed",
+ G_CALLBACK (editor_delete_event_cb), GTK_WIDGET (dialog));
gtk_widget_show(GTK_WIDGET(dialog));
g_free (categories);
@@ -3137,7 +3150,7 @@ static gint
app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
{
EContactEditor *ce;
-
+
ce = E_CONTACT_EDITOR (data);
/* if we're saving, don't allow the dialog to close */