[Telepathy] [PATCH 8/9] Chooser: (cosmetic) change the key handeling from ifs to a switch/case statement
Niv Sardi
xaiki at debian.org
Mon Jun 8 13:31:43 PDT 2009
I like it better, if you don't nuke it, I don't care
Signed-off-by: Niv Sardi <xaiki at debian.org>
---
libempathy-gtk/empathy-presence-chooser.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index ba55c20..7e96c4e 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -558,14 +558,15 @@ presence_chooser_entry_key_press_event_cb (EmpathyPresenceChooser *self,
GdkEventKey *event,
GtkWidget *entry)
{
- if (event->keyval == GDK_Escape) {
+ switch (event->keyval) {
+ case GDK_Escape:
/* the user pressed Escape, undo the editing */
presence_chooser_reset_status (self);
return TRUE;
- }
-
- if (event->keyval == GDK_Up || event->keyval == GDK_Down) {
+ case GDK_Up:
+ case GDK_Down:
gtk_combo_box_popup (GTK_COMBO_BOX (self));
+ break;
}
return FALSE; /* send this event elsewhere */
--
1.6.3.1
More information about the telepathy
mailing list