window: update_view when the property changes
Update the value of the internal holder of the property
This commit is contained in:
+4
-3
@@ -462,8 +462,6 @@ view_changed (GObject *object,
|
|||||||
/* Get view_type from widget, or widget-name */
|
/* Get view_type from widget, or widget-name */
|
||||||
priv->active_view = view_type;
|
priv->active_view = view_type;
|
||||||
g_object_notify (G_OBJECT (user_data), "active-view");
|
g_object_notify (G_OBJECT (user_data), "active-view");
|
||||||
|
|
||||||
update_view (GCAL_WINDOW (user_data));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1083,9 +1081,12 @@ gcal_window_set_property (GObject *object,
|
|||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_ACTIVE_VIEW:
|
case PROP_ACTIVE_VIEW:
|
||||||
|
priv->active_view = g_value_get_enum (value);
|
||||||
gtk_stack_set_visible_child (GTK_STACK (priv->views_stack),
|
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;
|
return;
|
||||||
case PROP_ACTIVE_DATE:
|
case PROP_ACTIVE_DATE:
|
||||||
if (priv->active_date != NULL)
|
if (priv->active_date != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user