[gnome-calendar] app: update date when change in views
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] app: update date when change in views
- Date: Wed, 28 Jan 2015 18:59:03 +0000 (UTC)
commit 6d2dfdf9a11f315570008a86ad41664cdf6d4c82
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Tue Jan 27 19:10:28 2015 -0500
app: update date when change in views
year-view: update date on selection
src/gcal-window.c | 2 +-
src/gcal-year-view.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 3e1ca7c..b8c2549 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1272,7 +1272,7 @@ gcal_window_constructed (GObject *object)
if (priv->views[i] != NULL)
{
g_object_bind_property (GCAL_WINDOW (object), "active-date", priv->views[i], "active-date",
- G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
+ G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
g_signal_connect (priv->views[i], "create-event", G_CALLBACK (show_new_event_widget), object);
g_signal_connect (priv->views[i], "create-event-detailed", G_CALLBACK (create_event_detailed_cb),
object);
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index 04e0111..f85a644 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -836,6 +836,12 @@ navigator_button_release_cb (GcalYearView *year_view,
priv->button_pressed = FALSE;
priv->selected_data->end_day = day;
priv->selected_data->end_month = month;
+
+ /* update date and notify */
+ priv->date->day = priv->end_selected_date->day;
+ priv->date->month = priv->end_selected_date->month + 1;
+ g_object_notify (G_OBJECT (year_view), "active-date");
+
gtk_widget_queue_draw (widget);
if (priv->popover_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]