From 6fe4c5e0ff5ee2272977fd7c6835a46047ed707d Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 25 Jan 2005 00:28:13 +0000 Subject: use the new ECategoriesDialog widget. 2005-01-25 Rodrigo Moya * gui/contact-editor/e-contact-editor.c (categories_clicked): use the new ECategoriesDialog widget. svn path=/trunk/; revision=28538 --- addressbook/ChangeLog | 5 +++++ addressbook/gui/contact-editor/e-contact-editor.c | 20 ++++---------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index a3ee26d549..bc7152414c 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2005-01-25 Rodrigo Moya + + * gui/contact-editor/e-contact-editor.c (categories_clicked): use the + new ECategoriesDialog widget. + 2005-01-21 JP Rosevear Fixes #70622 diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index b26c40811d..363e05dcc9 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -40,15 +40,13 @@ #include #include -#include +#include #include #include #include #include -#include - #include #include "addressbook/gui/component/addressbook.h" @@ -2446,37 +2444,27 @@ categories_clicked (GtkWidget *button, EContactEditor *editor) GtkDialog *dialog; int result; GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories"); - ECategoriesMasterList *ecml; + if (entry && GTK_IS_ENTRY(entry)) categories = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry))); else if (editor->contact) categories = e_contact_get (editor->contact, E_CONTACT_CATEGORIES); - if (!(dialog = GTK_DIALOG (e_categories_new (categories)))) { + if (!(dialog = GTK_DIALOG (e_categories_dialog_new (categories)))) { e_error_run (NULL, "addressbook:edit-categories", NULL); g_free (categories); return; } - ecml = e_categories_master_list_wombat_new (); - g_object_set (dialog, - "header", _("This contact belongs to these categories:"), - "ecml", ecml, - NULL); - g_object_unref (ecml); gtk_widget_show(GTK_WIDGET(dialog)); result = gtk_dialog_run (dialog); g_free (categories); if (result == GTK_RESPONSE_OK) { - g_object_get (dialog, - "categories", &categories, - NULL); + 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); - - g_free(categories); } gtk_widget_destroy(GTK_WIDGET(dialog)); } -- cgit v1.2.3