[gnome-calendar/ui-rewrite] window: update_view when the property changes



commit 384cf11605299a92a6632c617a15a379dc6c6d23
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Wed Oct 22 00:39:49 2014 -0400

    window: update_view when the property changes
    
    Update the value of the internal holder of the property

 src/gcal-window.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index a945a6c..ed177b0 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -462,8 +462,6 @@ view_changed (GObject    *object,
   /* Get view_type from widget, or widget-name */
   priv->active_view = view_type;
   g_object_notify (G_OBJECT (user_data), "active-view");
-
-  update_view (GCAL_WINDOW (user_data));
 }
 
 static void
@@ -1083,9 +1081,12 @@ gcal_window_set_property (GObject      *object,
   switch (property_id)
     {
     case PROP_ACTIVE_VIEW:
+      priv->active_view = g_value_get_enum (value);
       gtk_stack_set_visible_child (GTK_STACK (priv->views_stack),
-                                   priv->views[g_value_get_enum (value)]);
+                                   priv->views[priv->active_view]);
+
 
+      update_view (GCAL_WINDOW (object));
       return;
     case PROP_ACTIVE_DATE:
       if (priv->active_date != NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]