aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-08-13 21:26:44 +0800
committerMilan Crha <mcrha@redhat.com>2013-08-13 21:26:44 +0800
commit44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14 (patch)
tree17f200b4ae658f8fd26a3850b94c629f8c64b699
parent9b44f89c94e9d1555a529508bf86f7a3dae713f5 (diff)
downloadgsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.tar
gsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.tar.gz
gsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.tar.bz2
gsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.tar.lz
gsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.tar.xz
gsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.tar.zst
gsoc2013-evolution-44b6cb5d3b3cf5c0fda8ed34fba5ccbae891df14.zip
Bug #698723 - Crash on saving contact with categories
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 0d3f41e2d5..8e126d0260 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -3308,23 +3308,13 @@ categories_response (GtkDialog *dialog,
editor->categories_dialog = NULL;
}
-static gint
-categories_editor_delete_event_cb (GtkWidget *widget,
- GdkEvent *event,
- gpointer data)
-{
- if (GTK_IS_WIDGET (widget))
- gtk_widget_destroy (widget);
-
- return TRUE;
-}
-
static void
categories_clicked (GtkWidget *button,
EContactEditor *editor)
{
gchar *categories = NULL;
GtkDialog *dialog;
+ GtkWindow *window;
GtkWidget *entry = e_builder_get_widget (editor->builder, "entry-categories");
if (entry && GTK_IS_ENTRY (entry))
@@ -3348,10 +3338,12 @@ categories_clicked (GtkWidget *button,
dialog, "response",
G_CALLBACK (categories_response), editor);
- /* Close the category dialog if the editor is closed*/
- g_signal_connect_swapped (
- editor, "editor_closed",
- G_CALLBACK (categories_editor_delete_event_cb), dialog);
+ window = GTK_WINDOW (dialog);
+
+ /* Close the category dialog if the editor is closed */
+ gtk_window_set_destroy_with_parent (window, TRUE);
+ gtk_window_set_modal (window, FALSE);
+ gtk_window_set_transient_for (window, eab_editor_get_window (EAB_EDITOR (editor)));
gtk_widget_show (GTK_WIDGET (dialog));
g_free (categories);