aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-22 10:15:40 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-22 10:15:40 +0800
commit0f614b2e971aa0f7168b63f335e1c738bf4f9379 (patch)
treef11955384408c35730103a9fb825891fa615e82e
parentcbaa9eb7432b11d9bd6cb38fe5ef027612720623 (diff)
downloadgsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.tar
gsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.tar.gz
gsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.tar.bz2
gsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.tar.lz
gsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.tar.xz
gsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.tar.zst
gsoc2013-evolution-0f614b2e971aa0f7168b63f335e1c738bf4f9379.zip
Fix what I assume are some merge errors.
-rw-r--r--calendar/module/e-cal-shell-sidebar.c2
-rw-r--r--calendar/module/e-memo-shell-backend.c25
-rw-r--r--calendar/module/e-task-shell-backend.c25
-rw-r--r--e-util/e-util.c21
-rw-r--r--e-util/e-util.h2
5 files changed, 40 insertions, 35 deletions
diff --git a/calendar/module/e-cal-shell-sidebar.c b/calendar/module/e-cal-shell-sidebar.c
index 4c37c8272d..2646836e3e 100644
--- a/calendar/module/e-cal-shell-sidebar.c
+++ b/calendar/module/e-cal-shell-sidebar.c
@@ -406,7 +406,7 @@ cal_shell_sidebar_constructed (GObject *object)
shell_settings = e_shell_get_shell_settings (shell);
source_list = e_cal_shell_backend_get_source_list (
- E_CAL_SHELL_BACKEND (shell_view));
+ E_CAL_SHELL_BACKEND (shell_backend));
container = GTK_WIDGET (shell_sidebar);
diff --git a/calendar/module/e-memo-shell-backend.c b/calendar/module/e-memo-shell-backend.c
index 174830874d..f910bcf798 100644
--- a/calendar/module/e-memo-shell-backend.c
+++ b/calendar/module/e-memo-shell-backend.c
@@ -67,7 +67,7 @@ memo_module_ensure_sources (EShellBackend *shell_backend)
/* XXX This is basically the same algorithm across all modules.
* Maybe we could somehow integrate this into EShellBackend? */
- ESourceList *source_list;
+ EMemoShellBackendPrivate *priv;
ESourceGroup *on_this_computer;
ESourceGroup *on_the_web;
ESource *personal;
@@ -81,28 +81,19 @@ memo_module_ensure_sources (EShellBackend *shell_backend)
on_the_web = NULL;
personal = NULL;
- if (!e_cal_get_sources (&source_list, E_CAL_SOURCE_TYPE_JOURNAL, NULL)) {
+ priv = E_MEMO_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+
+ if (!e_cal_get_sources (&priv->source_list, E_CAL_SOURCE_TYPE_JOURNAL, NULL)) {
g_warning ("Could not get memo sources from GConf!");
return;
}
- /* Share the source list with all memo views. This is
- * accessible via e_memo_shell_view_get_source_list().
- * Note: EShellBackend takes ownership of the reference.
- *
- * XXX I haven't yet decided if I want to add a proper
- * EShellBackend API for this. The mail module would
- * not use it. */
- g_object_set_data_full (
- G_OBJECT (shell_backend), "source-list",
- source_list, (GDestroyNotify) g_object_unref);
-
data_dir = e_shell_backend_get_data_dir (shell_backend);
filename = g_build_filename (data_dir, "local", NULL);
base_uri = g_filename_to_uri (filename, NULL, NULL);
g_free (filename);
- groups = e_source_list_peek_groups (source_list);
+ groups = e_source_list_peek_groups (priv->source_list);
for (iter = groups; iter != NULL; iter = iter->next) {
ESourceGroup *source_group = iter->data;
const gchar *group_base_uri;
@@ -159,14 +150,14 @@ memo_module_ensure_sources (EShellBackend *shell_backend)
* but that happens in an idle loop and too late
* to prevent the user from seeing a "Cannot
* Open ... because of invalid URI" error. */
- e_source_list_sync (source_list, NULL);
+ e_source_list_sync (priv->source_list, NULL);
}
} else {
ESourceGroup *source_group;
source_group = e_source_group_new (name, base_uri);
- e_source_list_add_group (source_list, source_group, -1);
+ e_source_list_add_group (priv->source_list, source_group, -1);
g_object_unref (source_group);
}
@@ -208,7 +199,7 @@ memo_module_ensure_sources (EShellBackend *shell_backend)
ESourceGroup *source_group;
source_group = e_source_group_new (name, WEB_BASE_URI);
- e_source_list_add_group (source_list, source_group, -1);
+ e_source_list_add_group (priv->source_list, source_group, -1);
g_object_unref (source_group);
} else {
/* Force the group name to the current locale. */
diff --git a/calendar/module/e-task-shell-backend.c b/calendar/module/e-task-shell-backend.c
index a9bc2d9a6c..9e35b47871 100644
--- a/calendar/module/e-task-shell-backend.c
+++ b/calendar/module/e-task-shell-backend.c
@@ -69,7 +69,7 @@ task_module_ensure_sources (EShellBackend *shell_backend)
/* XXX This is basically the same algorithm across all modules.
* Maybe we could somehow integrate this into EShellBackend? */
- ESourceList *source_list;
+ ETaskShellBackendPrivate *priv;
ESourceGroup *on_this_computer;
ESourceGroup *on_the_web;
ESource *personal;
@@ -83,28 +83,19 @@ task_module_ensure_sources (EShellBackend *shell_backend)
on_the_web = NULL;
personal = NULL;
- if (!e_cal_get_sources (&source_list, E_CAL_SOURCE_TYPE_TODO, NULL)) {
+ priv = E_TASK_SHELL_BACKEND_GET_PRIVATE (shell_backend);
+
+ if (!e_cal_get_sources (&priv->source_list, E_CAL_SOURCE_TYPE_TODO, NULL)) {
g_warning ("Could not get task sources from GConf!");
return;
}
- /* Share the source list with all task views. This is
- * accessible via e_task_shell_view_get_source_list().
- * Note: EShellBackend takes ownership of the reference.
- *
- * XXX I haven't yet decided if I want to add a proper
- * EShellBackend API for this. The mail module would
- * not use it. */
- g_object_set_data_full (
- G_OBJECT (shell_backend), "source-list",
- source_list, (GDestroyNotify) g_object_unref);
-
data_dir = e_shell_backend_get_data_dir (shell_backend);
filename = g_build_filename (data_dir, "local", NULL);
base_uri = g_filename_to_uri (filename, NULL, NULL);
g_free (filename);
- groups = e_source_list_peek_groups (source_list);
+ groups = e_source_list_peek_groups (priv->source_list);
for (iter = groups; iter != NULL; iter = iter->next) {
ESourceGroup *source_group = iter->data;
const gchar *group_base_uri;
@@ -161,14 +152,14 @@ task_module_ensure_sources (EShellBackend *shell_backend)
* but that happens in an idle loop and too late
* to prevent the user from seeing a "Cannot
* Open ... because of invalid URI" error. */
- e_source_list_sync (source_list, NULL);
+ e_source_list_sync (priv->source_list, NULL);
}
} else {
ESourceGroup *source_group;
source_group = e_source_group_new (name, base_uri);
- e_source_list_add_group (source_list, source_group, -1);
+ e_source_list_add_group (priv->source_list, source_group, -1);
g_object_unref (source_group);
}
@@ -210,7 +201,7 @@ task_module_ensure_sources (EShellBackend *shell_backend)
ESourceGroup *source_group;
source_group = e_source_group_new (name, WEB_BASE_URI);
- e_source_list_add_group (source_list, source_group, -1);
+ e_source_list_add_group (priv->source_list, source_group, -1);
g_object_unref (source_group);
} else {
/* Force the group name to the current locale. */
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 576f46e54b..e4658c1bd7 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1511,6 +1511,27 @@ 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 gchar *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);
+}
+
static gpointer
e_camel_object_copy (gpointer camel_object)
{
diff --git a/e-util/e-util.h b/e-util/e-util.h
index c748aaed8e..458bef77a7 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -140,6 +140,8 @@ gboolean e_util_read_file (const gchar *filename,
gchar **buffer,
gsize *read,
GError **error);
+GSList * e_util_get_category_filter_options
+ (void);
/* Camel uses its own object system, so we have to box
* CamelObjects to safely use them as GObject properties. */