[bijiben: 3/3] Do not popup search bar when any shortcut is pressed



commit 220781602980173d1275fe64d78d4a4941ff7891
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Wed Sep 18 21:24:19 2013 +0200

    Do not popup search bar when any shortcut is pressed
    
    Fixes #708203

 src/bjb-search-toolbar.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/bjb-search-toolbar.c b/src/bjb-search-toolbar.c
index eb9f79c..af1d7da 100644
--- a/src/bjb-search-toolbar.c
+++ b/src/bjb-search-toolbar.c
@@ -132,7 +132,15 @@ on_key_released (GtkWidget *widget,GdkEvent  *event,gpointer user_data)
 static gboolean
 on_key_pressed (GtkWidget *widget,GdkEvent  *event,gpointer user_data)
 {
-  BjbSearchToolbar *self = BJB_SEARCH_TOOLBAR (user_data);
+  BjbSearchToolbar *self;
+  GdkModifierType modifiers;
+
+  self = BJB_SEARCH_TOOLBAR (user_data);
+  modifiers = gtk_accelerator_get_default_mod_mask ();
+
+
+  if ((event->key.state & modifiers) == GDK_CONTROL_MASK)
+    return FALSE;
 
   /* Reveal the entry is text is input. TODO add more keys not input */
   if (gtk_revealer_get_child_revealed (self->priv->revealer) == FALSE)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]