diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2001-07-03 03:44:16 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2001-07-03 03:44:16 +0800 |
commit | 309177c38a868abb86f3158264ea2053748a5809 (patch) | |
tree | dbf0ae0c903d5dced4d216fc16b2da141f8569c9 /calendar/gui/dialogs | |
parent | 44bdae41f77f732f1e0347f32872ecde23984974 (diff) | |
download | gsoc2013-evolution-309177c38a868abb86f3158264ea2053748a5809.tar.gz gsoc2013-evolution-309177c38a868abb86f3158264ea2053748a5809.tar.zst gsoc2013-evolution-309177c38a868abb86f3158264ea2053748a5809.zip |
use the new self-contained e_categories_config_open_dialog_for_entry()
2001-07-02 Rodrigo Moya <rodrigo@ximian.com>
* gui/dialogs/task-page.c (categories_clicked_cb):
* gui/dialogs/event-page.c (categories_clicked_cb): use the new
self-contained e_categories_config_open_dialog_for_entry() function
* gui/e-week-view-event-item.c (e_week_view_item_draw_icons):
* gui/e-day-view-top-item.c (e_day_view_reshape_long_event):
(e_day_view_reshape_day_event): ditto
* gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
use e_categories_config_get_icon_for() to retrieve the icon
associated with each category
svn path=/trunk/; revision=10699
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 19 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 20 |
2 files changed, 3 insertions, 36 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 5646a31a76..89835ae4b3 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -837,30 +837,13 @@ categories_clicked_cb (GtkWidget *button, gpointer data) { EventPage *epage; EventPagePrivate *priv; - char *categories; - GnomeDialog *dialog; - int result; GtkWidget *entry; epage = EVENT_PAGE (data); priv = epage->priv; entry = priv->categories; - categories = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry)); - - dialog = GNOME_DIALOG (e_categories_new (categories)); - result = gnome_dialog_run (dialog); - g_free (categories); - - if (result == 0) { - gtk_object_get (GTK_OBJECT (dialog), - "categories", &categories, - NULL); - e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), categories); - g_free (categories); - } - - gtk_object_destroy (GTK_OBJECT (dialog)); + e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry)); } /* This is called when any field is changed; it notifies upstream. */ diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index ce01a389e6..705477f794 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -36,6 +36,7 @@ #include <gal/widgets/e-categories.h> #include <widgets/misc/e-dateedit.h> #include "e-util/e-dialog-widgets.h" +#include "e-util/e-categories-config.h" #include "../e-timezone-entry.h" #include "comp-editor-util.h" #include "task-page.h" @@ -722,30 +723,13 @@ categories_clicked_cb (GtkWidget *button, gpointer data) { TaskPage *tpage; TaskPagePrivate *priv; - char *categories; - GnomeDialog *dialog; - int result; GtkWidget *entry; tpage = TASK_PAGE (data); priv = tpage->priv; entry = priv->categories; - categories = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry)); - - dialog = GNOME_DIALOG (e_categories_new (categories)); - result = gnome_dialog_run (dialog); - g_free (categories); - - if (result == 0) { - gtk_object_get (GTK_OBJECT (dialog), - "categories", &categories, - NULL); - e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), categories); - g_free (categories); - } - - gtk_object_destroy (GTK_OBJECT (dialog)); + e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry)); } /* This is called when any field is changed; it notifies upstream. */ |