diff options
author | Milan Crha <mcrha@redhat.com> | 2008-01-10 19:19:37 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-01-10 19:19:37 +0800 |
commit | dd7bad07415b4b2a46d3bae6236838d52334f6fb (patch) | |
tree | 9a64bb9cd03b79fafe14ef7f8eee2399675fdd51 /mail/em-folder-view.c | |
parent | 510eb1f01695c5d92df90bb3a2d2fbbc2bec8f40 (diff) | |
download | gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar.gz gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar.zst gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.zip |
** Fix for bug #211353
2008-01-10 Milan Crha <mcrha@redhat.com>
** Fix for bug #211353
* po/POTFILES.in: Added new file e-util/e-util-labels.c
* mail/filtertypes.xml:
* mail/vfoldertypes.xml:
* mail/em-folder-view.c:
* mail/em-folder-browser.c:
* mail/em-mailer-prefs.h:
* mail/em-mailer-prefs.c:
* mail/mail-config.h:
* mail/mail-config.c:
* mail/mail-config.glade:
* mail/message-list.c:
Label tags are now generated based on label name when creating, except
of first 5 labels. New menu option "New Label" in popup menu over
message list and editing of labels has been changed in Preferences.
Also renaming tab in Preferences for "Labels", not "Colors", and the
tab label too.
mail-config-label... functions was moved to e-util/e-util-labels.c/.h.
* mail/message-list.etspec: Normalized columns has been moved by one
when label column has been added.
* filter/filter-option.h:
* filter/filter-option.c: (filter_option_get_current),
(filter_option_remove_all): New functions to be able to refill options
even after initialization of the filter element.
* filter/filter-label.c: Added support to notify changes on labels in runtime
and use actual labels.
* e-util/Makefile.am:
* e-util/e-util-labels.h:
* e-util/e-util-labels.c: New files to work with labels.
svn path=/trunk/; revision=34788
Diffstat (limited to 'mail/em-folder-view.c')
-rw-r--r-- | mail/em-folder-view.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 97b7359402..c745ebf073 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -89,6 +89,7 @@ #include "e-util/e-print.h" #include "e-util/e-profile-event.h" #include "e-util/e-util-private.h" +#include "e-util/e-util-labels.h" #include "filter/filter-rule.h" @@ -1233,9 +1234,9 @@ emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, void *data) { EMFolderView *emfv = data; GSList *l; - MailConfigLabel *label; + EUtilLabel *label; - for (l = mail_config_get_labels(); l; l = l->next) { + for (l = mail_config_get_labels (); l; l = l->next) { label = l->data; emfv_unset_label(emfv, label->tag); } @@ -1253,6 +1254,18 @@ emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, void *data) } static void +emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, void *data) +{ + EMFolderView *emfv = data; + char *tag = e_util_labels_add_with_dlg (NULL, NULL); + + if (tag) { + emfv_set_label (emfv, tag); + g_free (tag); + } +} + +static void emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, void *data) { EMFolderView *emfv = data; @@ -1343,6 +1356,8 @@ static EPopupItem emfv_popup_items[] = { { E_POPUP_SUBMENU, "60.label.00", N_("_Label"), NULL, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY }, { E_POPUP_ITEM, "60.label.00/00.label", N_("_None"), emfv_popup_label_clear, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY }, { E_POPUP_BAR, "60.label.00/00.label.00", NULL, NULL, NULL, NULL }, + { E_POPUP_BAR, "60.label.00/01.label", NULL, NULL, NULL, NULL }, + { E_POPUP_ITEM, "60.label.00/01.label.00", N_("_New Label"), emfv_popup_label_new, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY }, { E_POPUP_BAR, "70.emfv.06", NULL, NULL, NULL, NULL }, @@ -1381,7 +1396,7 @@ emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const if (camel_folder_get_message_user_flag (emfv->folder, uids->pdata[i], label_tag)) exists = TRUE; else { - const char *label = mail_config_get_new_label_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label")); + const char *label = e_util_labels_get_new_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label")); /* backward compatibility... */ if (label && !strcmp (label, label_tag)) @@ -1448,9 +1463,9 @@ emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display) if (!on_display) { GPtrArray *uids = message_list_get_selected (emfv->list); - for (l = mail_config_get_labels(); l; l = l->next) { + for (l = mail_config_get_labels (); l; l = l->next) { EPopupItem *item; - MailConfigLabel *label = l->data; + EUtilLabel *label = l->data; GdkPixmap *pixmap; GdkColor colour; GdkGC *gc; |