[empathy: 3/6] Assume GDK_KEY_PRESS in the default case



commit 5beda725e1aff0da12703e2f51cdb4b95c63b321
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Tue Jul 26 13:36:18 2011 +1000

    Assume GDK_KEY_PRESS in the default case
    
    Warn if making this assumption.

 libempathy-gtk/empathy-chat.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 5f441af..032dd24 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -2245,14 +2245,16 @@ chat_input_populate_popup_cb (GtkTextView *view,
 						    &iter, x, y);
 		break;
 
+	    default:
+		g_warn_if_reached ();
+		/* assume the KEY_PRESS case */
+
 	    case GDK_KEY_PRESS:
 		/* get the location from the cursor */
 		gtk_text_buffer_get_iter_at_mark (buffer, &iter,
 				gtk_text_buffer_get_insert (buffer));
 		break;
 
-	    default:
-		break;
 	}
 
 	start = end = iter;



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