aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util-labels.h
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-01-10 19:19:37 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-01-10 19:19:37 +0800
commitdd7bad07415b4b2a46d3bae6236838d52334f6fb (patch)
tree9a64bb9cd03b79fafe14ef7f8eee2399675fdd51 /e-util/e-util-labels.h
parent510eb1f01695c5d92df90bb3a2d2fbbc2bec8f40 (diff)
downloadgsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar
gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar.gz
gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar.bz2
gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar.lz
gsoc2013-evolution-dd7bad07415b4b2a46d3bae6236838d52334f6fb.tar.xz
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 'e-util/e-util-labels.h')
-rw-r--r--e-util/e-util-labels.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/e-util/e-util-labels.h b/e-util/e-util-labels.h
new file mode 100644
index 0000000000..97a49f4db3
--- /dev/null
+++ b/e-util/e-util-labels.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* e-util-labels.h
+ *
+ * Copyright (C) 2007 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _E_UTIL_LABELS_H
+#define _E_UTIL_LABELS_H
+
+#include <glib.h>
+#include <gdk/gdkcolor.h>
+
+struct _GtkWindow;
+struct _GConfClient;
+
+typedef struct {
+ char *tag;
+ char *name;
+ char *colour;
+} EUtilLabel;
+
+#define E_UTIL_LABELS_GCONF_KEY "/apps/evolution/mail/labels"
+
+#define LABEL_DEFAULTS_NUM 5
+extern EUtilLabel label_defaults[LABEL_DEFAULTS_NUM];
+
+GSList * e_util_labels_parse (struct _GConfClient *client);
+void e_util_labels_free (GSList *labels);
+
+char * e_util_labels_add (const char *name, const GdkColor *color);
+char * e_util_labels_add_with_dlg (struct _GtkWindow *parent, const char *tag);
+gboolean e_util_labels_remove (const char *tag);
+gboolean e_util_labels_set_data (const char *tag, const char *name, const GdkColor *color);
+
+gboolean e_util_labels_is_system (const char *tag);
+const char *e_util_labels_get_new_tag (const char *old_tag);
+
+const char *e_util_labels_get_name (GSList *labels, const char *tag);
+gboolean e_util_labels_get_color (GSList *labels, const char *tag, GdkColor *color);
+const char *e_util_labels_get_color_str (GSList *labels, const char *tag);
+
+#endif /* _E_UTIL_LABELS_H */