[gnome-calendar] month-view: reallocate children when date changes



commit f39991c7c389fe21513e2fb42b62064f7e3bcf70
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Feb 15 21:12:41 2016 -0200

    month-view: reallocate children when date changes
    
    The subscriber does not add components who are already
    added to the view - and doesn't need to do it. To overcome
    that fact, we have to reallocate the events even when
    nothing was added.
    
    Fix that by setting the GcalSubscriberView->children_changed
    to TRUE and queueing an allocation right after the date
    changes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762066

 src/gcal-month-view.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 173cf27..e50e1a6 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -856,8 +856,10 @@ gcal_month_view_set_property (GObject       *object,
                               const GValue  *value,
                               GParamSpec    *pspec)
 {
+  GcalSubscriberViewPrivate *ppriv;
   GcalMonthViewPrivate *priv;
 
+  ppriv = GCAL_SUBSCRIBER_VIEW (object)->priv;
   priv = gcal_month_view_get_instance_private (GCAL_MONTH_VIEW (object));
 
   switch (property_id)
@@ -872,7 +874,9 @@ gcal_month_view_set_property (GObject       *object,
         priv->keyboard_cell = priv->days_delay;
         priv->start_mark_cell = -1;
         priv->end_mark_cell = -1;
-        gtk_widget_queue_draw (GTK_WIDGET (object));
+
+        ppriv->children_changed = TRUE;
+        gtk_widget_queue_resize (GTK_WIDGET (object));
         break;
       }
     default:


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