Don't set the focus on the display filter entry when we're passed a
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 22 May 2007 23:06:22 +0000 (23:06 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 22 May 2007 23:06:22 +0000 (23:06 +0000)
contorl- or alt-modified character.  Fixes bug 1610.

Fixup whitespace.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21898 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/main.c

index 3c93ec3e5cb74f5bd2ebb2bf83aced2e19194587..4adec4d06daa5a6c2ad3d54195b46387681347a9 100644 (file)
@@ -2397,7 +2397,7 @@ main(int argc, char *argv[])
      "-G" flag, as the "-G" flag dumps information registered by the
      dissectors, and we must do it before we read the preferences, in
      case any dissectors register preferences. */
-  epan_init(register_all_protocols,register_all_protocol_handoffs, 
+  epan_init(register_all_protocols,register_all_protocol_handoffs,
            splash_update, (gpointer) splash_win,
             failure_alert_box,open_failure_alert_box,read_failure_alert_box);
 
@@ -2885,7 +2885,7 @@ main(int argc, char *argv[])
   font_init();
 
   /* close the splash screen, as we are going to open the main window now */
-  splash_destroy(splash_win); 
+  splash_destroy(splash_win);
 
   /************************************************************************/
   /* Everything is prepared now, preferences and command line was read in */
@@ -3459,7 +3459,7 @@ is_widget_visible(GtkWidget *widget, gpointer data)
 /* XXX - There seems to be some disagreement about if and how this feature should be implemented.
    As I currently don't have the time to continue this, it's temporarily disabled. - ULFL */
 GtkWidget *
-welcome_item(const gchar *stock_item, const gchar * label, const gchar * message, const gchar * tooltip, 
+welcome_item(const gchar *stock_item, const gchar * label, const gchar * message, const gchar * tooltip,
                         GtkSignalFunc callback, void *callback_data)
 {
     GtkWidget *w, *item_hb;
@@ -3626,7 +3626,7 @@ welcome_link_enter_cb(GtkWidget *widget _U_, GdkEventCrossing *event _U_, gpoint
 {
     gchar *message;
     GtkWidget *w = user_data;
-       
+
        message = g_strdup_printf("<span foreground='blue' underline='single'>%s</span>", OBJECT_GET_DATA(w,"TEXT"));
 #if GTK_MAJOR_VERSION >= 2
     gtk_label_set_markup(GTK_LABEL(w), message);
@@ -3638,10 +3638,10 @@ welcome_link_enter_cb(GtkWidget *widget _U_, GdkEventCrossing *event _U_, gpoint
 
 static gboolean
 welcome_link_leave_cb(GtkWidget *widget _U_, GdkEvent *event _U_, gpointer user_data)
-{      
+{
     gchar *message;
     GtkWidget *w = user_data;
-       
+
        message = g_strdup_printf("<span foreground='blue'>%s</span>", OBJECT_GET_DATA(w,"TEXT"));
 #if GTK_MAJOR_VERSION >= 2
     gtk_label_set_markup(GTK_LABEL(w), message);
@@ -3655,7 +3655,7 @@ welcome_link_leave_cb(GtkWidget *widget _U_, GdkEvent *event _U_, gpointer user_
 
 static gboolean
 welcome_link_press_cb(GtkWidget *widget _U_, GdkEvent *event _U_, gpointer data _U_) {
-       
+
        g_warning("TBD: link pressed");
 
        return FALSE;
@@ -3915,7 +3915,7 @@ welcome_new(void)
     gtk_box_pack_start(GTK_BOX(topic_to_fill), w, FALSE, FALSE, 0);
 
        w = welcome_filename_link_new(
-               "C:\\Testfiles\\to avoid screen garbage\\Unfortunately this is a very long filename which had to be truncated.pcap", 
+               "C:\\Testfiles\\to avoid screen garbage\\Unfortunately this is a very long filename which had to be truncated.pcap",
                &label);
 #if GTK_MAJOR_VERSION >= 2
        gtk_widget_modify_bg(w, GTK_STATE_NORMAL, &topic_bg);
@@ -4273,6 +4273,7 @@ toolbar_display_airpcap_key_management_cb(GtkWidget *w, gpointer data)
 #endif /* HAVE_AIRPCAP */
 
 #if GTK_MAJOR_VERSION >= 2
+#define NO_SHIFT_MOD_MASK (GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK|GDK_LOCK_MASK))
 static int
 top_level_key_pressed_cb(GtkCTree *ctree _U_, GdkEventKey *event, gpointer user_data _U_)
 {
@@ -4282,6 +4283,8 @@ top_level_key_pressed_cb(GtkCTree *ctree _U_, GdkEventKey *event, gpointer user_
     } else if (event->keyval == GDK_F7) {
        packet_list_prev();
        return TRUE;
+    } else if (event->keyval | NO_SHIFT_MOD_MASK) {
+        return FALSE; /* Skip control, alt, and other modifiers */
     /*
      * A comment in gdkkeysyms.h says that it's autogenerated from
      * freedesktop.org/x.org's keysymdef.h.  Although the GDK docs