aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-10 22:25:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-11 00:46:22 +0800
commitab42fdc8c751622e3239d43e793f06e8b6703bf7 (patch)
tree65748cacdff56ab8c6840843dac4f73c89461ceb
parentc80966db005f9fb5acb4f994ee467b56ea43d993 (diff)
downloadgsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.tar
gsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.tar.gz
gsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.tar.bz2
gsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.tar.lz
gsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.tar.xz
gsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.tar.zst
gsoc2013-evolution-ab42fdc8c751622e3239d43e793f06e8b6703bf7.zip
Add e_source_selector_update_all_rows().
Calls e_source_selector_update_row() for each ESource being shown by the ESourceSelector, according to the "extension-name" property.
-rw-r--r--doc/reference/evolution-util/evolution-util-sections.txt1
-rw-r--r--e-util/e-source-selector.c31
-rw-r--r--e-util/e-source-selector.h2
3 files changed, 34 insertions, 0 deletions
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt b/doc/reference/evolution-util/evolution-util-sections.txt
index 159ad1a674..71ed6c67a7 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -3230,6 +3230,7 @@ e_source_selector_ref_source_by_iter
e_source_selector_ref_source_by_path
e_source_selector_queue_write
e_source_selector_update_row
+e_source_selector_update_all_rows
<SUBSECTION Standard>
E_SOURCE_SELECTOR
E_IS_SOURCE_SELECTOR
diff --git a/e-util/e-source-selector.c b/e-util/e-source-selector.c
index 07a375448e..e84566d887 100644
--- a/e-util/e-source-selector.c
+++ b/e-util/e-source-selector.c
@@ -2132,3 +2132,34 @@ e_source_selector_update_row (ESourceSelector *selector,
}
}
+/**
+ * e_source_selector_update_all_rows:
+ * @selector: an #ESourceSelector
+ *
+ * Calls e_source_selector_update_row() for each #ESource being shown by
+ * @selector, according to the #ESourceSelector:extension_name property.
+ *
+ * Since: 3.10
+ **/
+void
+e_source_selector_update_all_rows (ESourceSelector *selector)
+{
+ ESourceRegistry *registry;
+ GList *list, *link;
+ const gchar *extension_name;
+
+ g_return_if_fail (E_IS_SOURCE_SELECTOR (selector));
+
+ registry = e_source_selector_get_registry (selector);
+ extension_name = e_source_selector_get_extension_name (selector);
+
+ list = e_source_registry_list_sources (registry, extension_name);
+
+ for (link = list; link != NULL; link = g_list_next (link)) {
+ ESource *source = E_SOURCE (link->data);
+ e_source_selector_update_row (selector, source);
+ }
+
+ g_list_free_full (list, (GDestroyNotify) g_object_unref);
+}
+
diff --git a/e-util/e-source-selector.h b/e-util/e-source-selector.h
index b49d65a782..949c94bf33 100644
--- a/e-util/e-source-selector.h
+++ b/e-util/e-source-selector.h
@@ -140,6 +140,8 @@ void e_source_selector_queue_write (ESourceSelector *selector,
ESource *source);
void e_source_selector_update_row (ESourceSelector *selector,
ESource *source);
+void e_source_selector_update_all_rows
+ (ESourceSelector *selector);
G_END_DECLS