aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-12-11 02:30:29 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-12-11 02:30:29 +0800
commitd158af8cdfa6e4bf85c1e74769e8d61bc469494c (patch)
treeba55b970ae3a23e5ade4edbddc4eb8dcaf3033bd /e-util/e-util.c
parentdc0d0ee010319425b19d8d8d493f0bc489d5fd07 (diff)
downloadgsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.gz
gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.tar.zst
gsoc2013-evolution-d158af8cdfa6e4bf85c1e74769e8d61bc469494c.zip
Merge revisions 36811:36865 from trunk.
svn path=/branches/kill-bonobo/; revision=36867
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r--e-util/e-util.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index adfd7bf807..373002d4d9 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -39,13 +39,15 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <libgnome/gnome-help.h>
-#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-init.h>
#ifdef G_OS_WIN32
#include <windows.h>
#endif
#include <libedataserver/e-data-server-util.h>
+#include <libedataserver/e-categories.h>
+#include "filter/filter-option.h"
#include "e-util.h"
#include "e-util-private.h"
@@ -70,6 +72,27 @@ e_get_user_data_dir (void)
}
/**
+ * e_get_accels_filename:
+ *
+ * Returns the name of the user data file containing custom keyboard
+ * accelerator specifications.
+ *
+ * Returns: filename for accelerator specifications
+ **/
+const gchar *
+e_get_accels_filename (void)
+{
+ static gchar *filename = NULL;
+
+ if (G_UNLIKELY (filename == NULL))
+ filename = g_build_filename (
+ gnome_user_dir_get (),
+ "accels", PACKAGE, NULL);
+
+ return filename;
+}
+
+/**
* e_display_help:
* @parent: a parent #GtkWindow or %NULL
* @link_id: help section to present or %NULL
@@ -1282,3 +1305,23 @@ e_util_read_file (const char *filename, gboolean filename_is_uri, char **buffer,
return res;
}
+GSList *
+e_util_get_category_filter_options (void)
+{
+ GSList *res = NULL;
+ GList *clist, *l;
+
+ clist = e_categories_get_list ();
+ for (l = clist; l; l = l->next) {
+ const char *cname = l->data;
+ struct _filter_option *fo = g_new0 (struct _filter_option, 1);
+
+ fo->title = g_strdup (cname);
+ fo->value = g_strdup (cname);
+ res = g_slist_prepend (res, fo);
+ }
+
+ g_list_free (clist);
+
+ return g_slist_reverse (res);
+}