]> git.0d.be Git - empathy.git/commitdiff
live-search: don't forward shift keys
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 5 Apr 2012 12:35:27 +0000 (14:35 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 20 Apr 2012 09:33:08 +0000 (11:33 +0200)
Not doing so cancel any group renaming operation.

https://bugzilla.gnome.org/show_bug.cgi?id=501065

libempathy-gtk/empathy-live-search.c

index 3dc77998c39d7d24d9f644a5098ea8f0cfe45db7..f03aa9fe4c4c563568e1e35753dccce7b667edb2 100644 (file)
@@ -357,6 +357,14 @@ live_search_key_press_event_cb (GtkWidget *widget,
          return FALSE;
      }
 
+   /* Don't forward shift keys events as focusing the search entry would
+    * cancel an in-progress editing on a cell renderer (like when renaming a
+    * group). There is no point focusing it anyway as we don't display the
+    * search entry when only a shift key is pressed. */
+   if (event->keyval == GDK_KEY_Shift_L ||
+       event->keyval == GDK_KEY_Shift_R)
+       return FALSE;
+
   /* realize the widget if it is not realized yet */
   gtk_widget_realize (priv->search_entry);
   if (!gtk_widget_has_focus (priv->search_entry))