[gnome-calendar/search-improvements] window: show/hide buttons according to search mode
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] window: show/hide buttons according to search mode
- Date: Sun, 4 Jan 2015 02:16:34 +0000 (UTC)
commit 3b6357a0419a1b79bf43bc8ba655dca4fc2aa72c
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 | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 7c1edee..b381041 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1341,9 +1341,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]