[gnome-calendar] month-cell: only update label when date changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-cell: only update label when date changes
- Date: Tue, 31 Oct 2017 03:12:12 +0000 (UTC)
commit 5977eeefc8beeacd07eb88767252bcbf02a3080b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Oct 31 01:11:26 2017 -0200
month-cell: only update label when date changes
If the date is the same, we don't need to update the label.
This might cause an infinite resize loop.
src/views/gcal-month-cell.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/views/gcal-month-cell.c b/src/views/gcal-month-cell.c
index d9246ff..623fd3a 100644
--- a/src/views/gcal-month-cell.c
+++ b/src/views/gcal-month-cell.c
@@ -470,6 +470,9 @@ gcal_month_cell_set_date (GcalMonthCell *self,
g_return_if_fail (GCAL_IS_MONTH_CELL (self));
+ if (self->date && date && datetime_compare_date (self->date, date) == 0)
+ return;
+
gcal_clear_datetime (&self->date);
self->date = g_date_time_ref (date);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]