Set up the buttons in the "Capture Preferences" dialog box to use
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 8 May 2000 05:51:37 +0000 (05:51 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 8 May 2000 05:51:37 +0000 (05:51 +0000)
mnemonics.

Give the button, in the "Display Options" dialog box, that controls
whether name resolution is enabled or not the same label ("Enable name
resolution") as the equivalent button in the "Capture Preferencs" dialog
box.

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

gtk/capture_dlg.c
gtk/display_opts.c

index 4ffb6c40bb60e5e39af7ac211f8537d84e1fd5b8..b172c57c322da94ccd862febfeca9a84ecad27d8 100644 (file)
@@ -1,7 +1,7 @@
 /* capture_dlg.c
  * Routines for packet capture windows
  *
- * $Id: capture_dlg.c,v 1.23 2000/05/08 05:42:54 guy Exp $
+ * $Id: capture_dlg.c,v 1.24 2000/05/08 05:51:36 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -112,6 +112,7 @@ capture_prep_cb(GtkWidget *w, gpointer d)
                 *caplen_hb,
                 *bbox, *ok_bt, *cancel_bt, *snap_lb,
                 *snap_sb, *sync_cb, *auto_scroll_cb, *resolv_cb;
+  GtkAccelGroup *accel_group;
   GtkAdjustment *adj;
   GList         *if_list, *count_list = NULL;
   gchar         *count_item1 = "0 (Infinite)", count_item2[16];
@@ -134,6 +135,12 @@ capture_prep_cb(GtkWidget *w, gpointer d)
   gtk_window_set_title(GTK_WINDOW(cap_open_w), "Ethereal: Capture Preferences");
   gtk_signal_connect(GTK_OBJECT(cap_open_w), "destroy",
        GTK_SIGNAL_FUNC(capture_prep_destroy_cb), NULL);
+
+  /* Accelerator group for the accelerators (or, as they're called in
+     Windows and, I think, in Motif, "mnemonics"; Alt+<key> is a mnemonic,
+     Ctrl+<key> is an accelerator). */
+  accel_group = gtk_accel_group_new();
+  gtk_window_add_accel_group(GTK_WINDOW(cap_open_w), accel_group);
   
   /* Container for each row of widgets */
   main_vb = gtk_vbox_new(FALSE, 3);
@@ -236,7 +243,8 @@ capture_prep_cb(GtkWidget *w, gpointer d)
   gtk_box_pack_start (GTK_BOX(caplen_hb), snap_sb, FALSE, FALSE, 3); 
   gtk_widget_show(snap_sb);
   
-  sync_cb = gtk_check_button_new_with_label("Update list of packets in real time");
+  sync_cb = dlg_check_button_new_with_label_with_mnemonic(
+               "_Update list of packets in real time", accel_group);
   gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(sync_cb), sync_mode);
 #ifdef _WIN32
   gtk_widget_set_sensitive(sync_cb, FALSE);
@@ -244,7 +252,8 @@ capture_prep_cb(GtkWidget *w, gpointer d)
   gtk_container_add(GTK_CONTAINER(main_vb), sync_cb);
   gtk_widget_show(sync_cb);
 
-  auto_scroll_cb = gtk_check_button_new_with_label("Automatic scrolling in live capture");
+  auto_scroll_cb = dlg_check_button_new_with_label_with_mnemonic(
+               "_Automatic scrolling in live capture", accel_group);
   gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(auto_scroll_cb), auto_scroll_live);
 #ifdef _WIN32
   gtk_widget_set_sensitive(auto_scroll_cb, FALSE);
@@ -252,7 +261,8 @@ capture_prep_cb(GtkWidget *w, gpointer d)
   gtk_container_add(GTK_CONTAINER(main_vb), auto_scroll_cb);
   gtk_widget_show(auto_scroll_cb);
 
-  resolv_cb = gtk_check_button_new_with_label("Enable name resolution");
+  resolv_cb = dlg_check_button_new_with_label_with_mnemonic(
+               "Enable _name resolution", accel_group);
   gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(resolv_cb), g_resolving_actif);
   gtk_container_add(GTK_CONTAINER(main_vb), resolv_cb);
   gtk_widget_show(resolv_cb);
index 110396b15258fd8dd4c195a3ece674ec824af03a..44addcd1f81679caa2db696ffca2029bbaef245d 100644 (file)
@@ -1,7 +1,7 @@
 /* display_opts.c
  * Routines for packet display windows
  *
- * $Id: display_opts.c,v 1.6 2000/05/08 05:12:19 guy Exp $
+ * $Id: display_opts.c,v 1.7 2000/05/08 05:51:37 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -161,8 +161,8 @@ display_opt_cb(GtkWidget *w, gpointer d) {
   gtk_box_pack_start(GTK_BOX(main_vb), button, TRUE, TRUE, 0);
   gtk_widget_show(button);
 
-  button = dlg_check_button_new_with_label_with_mnemonic("_Name resolution",
-               accel_group);
+  button = dlg_check_button_new_with_label_with_mnemonic(
+               "Enable _name resolution", accel_group);
   gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), g_resolving_actif);
   gtk_object_set_data(GTK_OBJECT(display_opt_w), E_DISPLAY_NAME_RESOLUTION_KEY,
                      button);