aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorDevashish Sharma <dsharma@src.gnome.org>2006-02-28 12:45:42 +0800
committerDevashish Sharma <dsharma@src.gnome.org>2006-02-28 12:45:42 +0800
commit08e634b2b5d572d1cabe831415fdb6d1a77a345f (patch)
tree4fe33c47da78037fcfce0a97269b74e086e80aeb /addressbook/gui
parentb48d5ac98ecdd45a93d49ccdaf334a0eeb6f6f23 (diff)
downloadgsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.tar
gsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.tar.gz
gsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.tar.bz2
gsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.tar.lz
gsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.tar.xz
gsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.tar.zst
gsoc2013-evolution-08e634b2b5d572d1cabe831415fdb6d1a77a345f.zip
Fix for Bug #332498: Orphaned category editor crashes evo.
svn path=/trunk/; revision=31600
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 */