[gnome-calendar/ui-rewrite] window: hook key events to search-mode
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/ui-rewrite] window: hook key events to search-mode
- Date: Sat, 27 Sep 2014 12:51:50 +0000 (UTC)
commit 61d4ee195ba4bd93d8db3b62efdcdff46b282f62
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Fri Sep 26 13:01:18 2014 -0400
window: hook key events to search-mode
src/gcal-window.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index d14f328..42023b5 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -228,6 +228,25 @@ key_pressed (GtkWidget *widget,
set_new_event_mode (GCAL_WINDOW (user_data), FALSE);
return TRUE;
}
+ else
+ {
+ if ((event->state & GDK_META_MASK) != 0 ||
+ (event->state & GDK_CONTROL_MASK) != 0 ||
+ event->keyval == GDK_KEY_Control_L ||
+ event->keyval == GDK_KEY_Control_R ||
+ event->keyval == GDK_KEY_Meta_L ||
+ event->keyval == GDK_KEY_Meta_R ||
+ event->keyval == GDK_KEY_Alt_L ||
+ event->keyval == GDK_KEY_Alt_R)
+ {
+ return FALSE;
+ }
+
+ if (priv->search_mode && event->keyval == GDK_KEY_Escape)
+ gcal_window_set_search_mode (GCAL_WINDOW (widget), FALSE);
+ if (!priv->search_mode)
+ gcal_window_set_search_mode (GCAL_WINDOW (widget), TRUE);
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]