[gnome-calendar] window: show/hide buttons according to search mode
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: show/hide buttons according to search mode
- Date: Fri, 9 Jan 2015 14:29:35 +0000 (UTC)
commit bcbdb82baa7cd1e941e3b687b1dd216dd0637aee
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Jan 4 00:16:23 2015 -0200
window: show/hide buttons according to search mode
src/gcal-window.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 80b7fce..0d054e8 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1337,6 +1337,17 @@ gcal_window_constructed (GObject *object)
"active-date",
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
+ /* search related bindings */
+ g_object_bind_property (priv->search_button, "active", priv->search_bar, "search-mode-enabled",
+ G_BINDING_BIDIRECTIONAL);
+
+ g_object_bind_property (priv->search_bar, "search-mode-enabled", priv->back_button, "visible",
+ G_BINDING_DEFAULT | G_BINDING_INVERT_BOOLEAN);
+ g_object_bind_property (priv->search_bar, "search-mode-enabled", priv->today_button, "visible",
+ G_BINDING_DEFAULT | G_BINDING_INVERT_BOOLEAN);
+ g_object_bind_property (priv->search_bar, "search-mode-enabled", priv->forward_button, "visible",
+ G_BINDING_DEFAULT | G_BINDING_INVERT_BOOLEAN);
+
/* signals connection/handling */
/* HACK to ensure proper destroy of search-view widget */
g_signal_connect_swapped (priv->views_stack, "destroy",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]