[gnome-calendar] Added read-only query API to GcalManager.
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] Added read-only query API to GcalManager.
- Date: Thu, 23 Aug 2012 13:46:21 +0000 (UTC)
commit bba41ad78496ca1ca3430fd22e1ac9c1438d54f0
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Thu Aug 23 09:38:42 2012 -0400
Added read-only query API to GcalManager.
src/gcal-manager.c | 14 ++++++++++++++
src/gcal-manager.h | 3 +++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index bf58ccc..74b3ef4 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -1029,6 +1029,20 @@ gcal_manager_get_source_name (GcalManager *manager,
return e_source_get_display_name (unit->source);
}
+gboolean
+gcal_manager_get_source_readonly (GcalManager *manager,
+ const gchar *source_uid)
+{
+ GcalManagerPrivate *priv;
+ GcalManagerUnit *unit;
+
+ g_return_val_if_fail (GCAL_IS_MANAGER (manager), FALSE);
+ priv = manager->priv;
+
+ unit = g_hash_table_lookup (priv->clients, source_uid);
+ return e_client_is_readonly (E_CLIENT (unit->client));
+}
+
/**
* gcal_manager_set_new_range:
* @manager: a #GcalManager
diff --git a/src/gcal-manager.h b/src/gcal-manager.h
index f378d6c..f536e4b 100644
--- a/src/gcal-manager.h
+++ b/src/gcal-manager.h
@@ -73,6 +73,9 @@ gchar* gcal_manager_add_source (GcalManager *manager
const gchar* gcal_manager_get_source_name (GcalManager *manager,
const gchar *source_uid);
+gboolean gcal_manager_get_source_readonly (GcalManager *manager,
+ const gchar *source_uid);
+
void gcal_manager_set_new_range (GcalManager *manager,
const icaltimetype *initial_date,
const icaltimetype *final_date);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]