diff options
author | Rodrigo Moya <rodrigo@novell.com> | 2005-01-25 08:28:13 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2005-01-25 08:28:13 +0800 |
commit | 6fe4c5e0ff5ee2272977fd7c6835a46047ed707d (patch) | |
tree | 2481a031bc0ebfac15c25431d2c6949889cb3e5d /addressbook | |
parent | 501090887ddf9dbe396b6dc831c543cbb0650cda (diff) | |
download | gsoc2013-evolution-6fe4c5e0ff5ee2272977fd7c6835a46047ed707d.tar.gz gsoc2013-evolution-6fe4c5e0ff5ee2272977fd7c6835a46047ed707d.tar.zst gsoc2013-evolution-6fe4c5e0ff5ee2272977fd7c6835a46047ed707d.zip |
use the new ECategoriesDialog widget.
2005-01-25 Rodrigo Moya <rodrigo@novell.com>
* gui/contact-editor/e-contact-editor.c (categories_clicked): use the
new ECategoriesDialog widget.
svn path=/trunk/; revision=28538
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <rodrigo@novell.com> + + * gui/contact-editor/e-contact-editor.c (categories_clicked): use the + new ECategoriesDialog widget. + 2005-01-21 JP Rosevear <jpr@novell.com> 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 <libgnome/gnome-help.h> #include <gdk-pixbuf/gdk-pixbuf.h> -#include <gal/widgets/e-categories.h> +#include <libedataserverui/e-categories-dialog.h> #include <gal/widgets/e-gui-utils.h> #include <gal/e-text/e-entry.h> #include <libebook/e-address-western.h> #include <libedataserverui/e-source-option-menu.h> -#include <e-util/e-categories-master-list-wombat.h> - #include <camel/camel.h> #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)); } |