[gnome-calendar/date-selector] date-selector: fire MODIFIED signal
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/date-selector] date-selector: fire MODIFIED signal
- Date: Sun, 21 Dec 2014 16:17:38 +0000 (UTC)
commit 5d05e8835dff42e63ec57a00bdcb43116a9c2666
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Dec 21 14:17:23 2014 -0200
date-selector: fire MODIFIED signal
Also, some code cleanup.
src/gcal-date-selector.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index dda320b..37ffb4f 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -414,17 +414,17 @@ gcal_date_selector_constructed (GObject *object)
g_object_bind_property (priv->popover, "visible", object, "active", G_BINDING_BIDIRECTIONAL);
g_signal_connect (priv->entries[DAY], "insert-text", G_CALLBACK (text_inserted), object);
- g_signal_connect (priv->entries[MONTH], "insert-text", G_CALLBACK (text_inserted), object);
- g_signal_connect (priv->entries[YEAR], "insert-text", G_CALLBACK (text_inserted), object);
-
- g_signal_connect (priv->calendar, "day-selected", G_CALLBACK (calendar_day_selected), object);
g_signal_connect (priv->entries[DAY], "focus-out-event", G_CALLBACK (date_entry_focus_out), object);
- g_signal_connect (priv->entries[MONTH], "focus-out-event", G_CALLBACK (date_entry_focus_out), object);
- g_signal_connect (priv->entries[YEAR], "focus-out-event", G_CALLBACK (date_entry_focus_out), object);
g_signal_connect (priv->entries[DAY], "activate", G_CALLBACK (entry_activated), object);
+ g_signal_connect (priv->entries[MONTH], "insert-text", G_CALLBACK (text_inserted), object);
+ g_signal_connect (priv->entries[MONTH], "focus-out-event", G_CALLBACK (date_entry_focus_out), object);
g_signal_connect (priv->entries[MONTH], "activate", G_CALLBACK (entry_activated), object);
+ g_signal_connect (priv->entries[YEAR], "insert-text", G_CALLBACK (text_inserted), object);
+ g_signal_connect (priv->entries[YEAR], "focus-out-event", G_CALLBACK (date_entry_focus_out), object);
g_signal_connect (priv->entries[YEAR], "activate", G_CALLBACK (entry_activated), object);
+ g_signal_connect (priv->calendar, "day-selected", G_CALLBACK (calendar_day_selected), object);
+
g_object_unref (builder);
}
@@ -496,6 +496,9 @@ gcal_date_selector_set_date (GcalDateSelector *selector,
gtk_entry_set_text (GTK_ENTRY (priv->entries[YEAR]), label);
+ /* emit the MODIFIED signal */
+ g_signal_emit (selector, signals[MODIFIED], 0);
+
g_free (label);
g_date_time_unref (dt);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]