[dates] Fix selection logic in year view
- From: Ross Burton <rburton src gnome org>
- To: svn-commits-list gnome org
- Subject: [dates] Fix selection logic in year view
- Date: Fri, 17 Jul 2009 14:52:34 +0000 (UTC)
commit ac94879afbf1013789f06eeffef46a9c564f099a
Author: Jussi Kukkonen <jku linux intel com>
Date: Fri Jul 17 15:34:39 2009 +0100
Fix selection logic in year view
Signed-off-by: Ross Burton <ross linux intel com>
src/dates_view.c | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/dates_view.c b/src/dates_view.c
index b32ce04..e0a4e6d 100644
--- a/src/dates_view.c
+++ b/src/dates_view.c
@@ -3611,7 +3611,26 @@ dates_view_main_button_press (GtkWidget *widget,
in_region = dates_view_in_region (view, event->x, event->y,
&month, &day) ? TRUE : FALSE;
- if ((priv->months <= 1) && (!priv->read_only)) {
+ if (priv->months > 1) {
+ /* make sure we unselect */
+ if (priv->selected_event) {
+ DatesViewEventData *data = priv->selected_event;
+
+ g_signal_emit (view, signals[COMMIT_EVENT], 0);
+ priv->selected_event = NULL;
+ priv->unselected = TRUE;
+ /* Synthetic change event to get rid of any
+ * data that we hung onto because it was
+ * selected.
+ */
+ dates_view_refresh_event (view, data->parent);
+
+ g_signal_emit (
+ view, signals[EVENT_SELECTED], 0);
+ dates_view_redraw (view);
+ }
+
+ } else if ((priv->months <= 1) && (!priv->read_only)) {
gboolean unselected = FALSE;
DatesViewEventData *data =
dates_view_point_in_event (view,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]