aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c29
2 files changed, 25 insertions, 10 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 36f38a7a6a..2d63614344 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-19 Devashish Sharma <sdevashish@novell.com>
+
+ * gui/contact-editor/e-contact-editor.c (categories_clicked): Makes Edit
+ categories dialog non-modal.
+ Fixes Bug #241219
+
2005-08-22 Sushma Rai <rsushma@novell.com>
* tools/evolution-addressbook-export-list-cards.c
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 59f7b2cb78..50aef51334 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2544,11 +2544,26 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor)
}
static void
+response (GtkDialog *dialog, int response, EContactEditor *editor)
+{
+ char *categories = NULL;
+ GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
+
+ if (response == GTK_RESPONSE_OK) {
+ categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
+ if (entry && GTK_IS_ENTRY(entry))
+ gtk_entry_set_text (GTK_ENTRY (entry), categories);
+ else
+ e_contact_set (editor->contact, E_CONTACT_CATEGORIES, categories);
+ }
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+}
+
+static void
categories_clicked (GtkWidget *button, EContactEditor *editor)
{
char *categories = NULL;
GtkDialog *dialog;
- int result;
GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
if (entry && GTK_IS_ENTRY(entry))
@@ -2561,18 +2576,12 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
g_free (categories);
return;
}
+
+ g_signal_connect(dialog, "response",
+ G_CALLBACK (response), editor);
gtk_widget_show(GTK_WIDGET(dialog));
- result = gtk_dialog_run (dialog);
g_free (categories);
- if (result == GTK_RESPONSE_OK) {
- categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
- if (entry && GTK_IS_ENTRY(entry))
- gtk_entry_set_text (GTK_ENTRY (entry), categories);
- else
- e_contact_set (editor->contact, E_CONTACT_CATEGORIES, categories);
- }
- gtk_widget_destroy(GTK_WIDGET(dialog));
}
static void