[gnome-calendar] manager: emit ::source-activated on enabled sources
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: emit ::source-activated on enabled sources
- Date: Mon, 22 Dec 2014 13:42:58 +0000 (UTC)
commit 6081b9547c9506f2d61947a77dd6581389b278c6
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Sun Dec 21 23:01:12 2014 -0500
manager: emit ::source-activated on enabled sources
The ::source-activated signal has no much sense right now, I'm leaving
it around, for a while, in case some use case pop up. Otherwise in time,
it will go.
src/gcal-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index 73f216a..e453e70 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -335,13 +335,16 @@ on_client_readonly_changed (EClient *client,
GParamSpec *pspec,
gpointer user_data)
{
+ GcalManagerPrivate *priv;
ESource *source;
- gboolean readonly;
+ GcalManagerUnit *unit;
+ priv = gcal_manager_get_instance_private (GCAL_MANAGER (user_data));
source = e_client_get_source (client);
- readonly = e_client_is_readonly (client);
- g_signal_emit (GCAL_MANAGER (user_data), signals[SOURCE_ACTIVATED], 0, source, !readonly);
+ unit = g_hash_table_lookup (priv->clients, source);
+ if (unit->enabled)
+ g_signal_emit (GCAL_MANAGER (user_data), signals[SOURCE_ACTIVATED], 0, source, !e_client_is_readonly
(client));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]