[gnome-calendar] manager: implement GcalManager::set_default_source method
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: implement GcalManager::set_default_source method
- Date: Mon, 25 May 2015 16:48:25 +0000 (UTC)
commit 3070922f5eb5a8e8582ad83c3ae133704b779cd9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Feb 9 16:39:22 2015 -0200
manager: implement GcalManager::set_default_source method
src/gcal-manager.c | 17 +++++++++++++++++
src/gcal-manager.h | 3 +++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index ac3770e..91b3a08 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -916,6 +916,23 @@ gcal_manager_get_default_source (GcalManager *manager)
return e_source_registry_ref_default_calendar (priv->source_registry);
}
+/**
+ * gcal_manager_set_default_source:
+ * @manager: App singleton { link GcalManager} instance
+ * @source: the new default source.
+ *
+ * Returns:
+ **/
+ESource*
+gcal_manager_set_default_source (GcalManager *manager,
+ ESource *source)
+{
+ GcalManagerPrivate *priv;
+
+ priv = gcal_manager_get_instance_private (manager);
+ e_source_registry_set_default_calendar (priv->source_registry, source);
+}
+
icaltimezone*
gcal_manager_get_system_timezone (GcalManager *manager)
{
diff --git a/src/gcal-manager.h b/src/gcal-manager.h
index 7f61d97..b547506 100644
--- a/src/gcal-manager.h
+++ b/src/gcal-manager.h
@@ -69,6 +69,9 @@ GList* gcal_manager_get_sources_connected (GcalManager *manager
ESource* gcal_manager_get_default_source (GcalManager *manager);
+void gcal_manager_set_default_source (GcalManager *manager,
+ ESource *source);
+
icaltimezone* gcal_manager_get_system_timezone (GcalManager *manager);
void gcal_manager_setup_shell_search (GcalManager *manager,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]