[gnome-calendar] date-selector: fixed re-entry in ::set_date
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] date-selector: fixed re-entry in ::set_date
- Date: Wed, 24 Dec 2014 20:17:48 +0000 (UTC)
commit d1315de42abfe79d53ba1af4463e91af57277ac5
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Wed Dec 24 15:00:56 2014 -0500
date-selector: fixed re-entry in ::set_date
This was causing double actualization of internal day,month,year
variables because GtkCalendar::day-selected signal handler is run by
default after the user connected ones.
src/gcal-date-selector.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index 7db6e77..d119a26 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -411,7 +411,9 @@ gcal_date_selector_set_date (GcalDateSelector *selector,
month = CLAMP (month - 1, 0, 11);
/* set calendar's date */
+ g_signal_handlers_block_by_func (priv->calendar, calendar_day_selected, selector);
g_object_set (priv->calendar, "day", day, "month", month, "year", year, NULL);
+ g_signal_handlers_unblock_by_func (priv->calendar, calendar_day_selected, selector);
/* rebuild the date label */
label = g_date_time_format (dt, priv->mask);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]