diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-09-24 07:41:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-09-24 07:41:19 +0000 |
commit | 8c174d2ae72932a2063af4973750e41f2b1680e4 (patch) | |
tree | 1a3726f3700e96340b1db4f1a3936ebc2d658028 | |
parent | a9ddd42c2844aebd19263b57411d6fe4c831edeb (diff) |
Just as we don't show the "Wireless Settings" button for non-AirPcap
adapters, we don't show the "Remote Settings" button for local adapters.
(Back when the buttons were in the Capture Options dialog, always having
the button there and making it sensitive or insensitive based on the
interface you specified may have made sense; now that it's in a dialog
popped up when you double-click on a particular interface, so the dialog
always applies to a particular interface, it no longer makes sense.)
Get rid of the unused E_OPT_REMOTE_BT_KEY key.
svn path=/trunk/; revision=45085
-rw-r--r-- | ui/gtk/capture_dlg.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index c1b09a54b4..b891ceb475 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -176,7 +176,6 @@ enum #define E_REMOTE_OK_BT_KEY "cap_remote_ok_bt" #define E_REMOTE_DEL_BT_KEY "cap_remote_delete_bt" #define E_CAP_CBX_IFTYPE_NOUPDATE_KEY "cap_cbx_iftype_noupdate" -#define E_OPT_REMOTE_BT_KEY "cap_remote_opt_bt" #define E_OPT_REMOTE_DIALOG_PTR_KEY "cap_remote_opt_dialog" #define E_OPT_REMOTE_CALLER_PTR_KEY "cap_remote_opt_caller" #endif @@ -2897,21 +2896,23 @@ void options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColum #endif #ifdef HAVE_PCAP_REMOTE - remote_bt = gtk_button_new_with_label("Remote Settings"); - gtk_widget_set_tooltip_text(remote_bt, "Various settings for remote capture."); - + /* + * *IF* this is a remote interface, add the "Remote Settings" + * button. Do *not* add it for other interfaces, as that could + * lead users to believe that it could somehow be enabled. + */ /* Both the callback and the data are global */ - g_signal_connect(remote_bt, "clicked", G_CALLBACK(options_remote_cb), NULL); - g_object_set_data(G_OBJECT(opt_edit_w), E_OPT_REMOTE_BT_KEY, remote_bt); if (strncmp (device.name, "rpcap://", 8) == 0) { - gtk_widget_set_sensitive(remote_bt, TRUE); - } else { - gtk_widget_set_sensitive(remote_bt, FALSE); + remote_bt = gtk_button_new_with_label("Remote Settings"); + gtk_widget_set_tooltip_text(remote_bt, "Various settings for remote capture."); + + g_signal_connect(remote_bt, "clicked", G_CALLBACK(options_remote_cb), NULL); + + gtk_box_pack_start(GTK_BOX(right_vb), remote_bt, FALSE, FALSE, 0); + gtk_widget_show(remote_bt); } - gtk_box_pack_start(GTK_BOX(right_vb), remote_bt, FALSE, FALSE, 0); - gtk_widget_show(remote_bt); #endif - /* advanced row */ + #ifdef HAVE_AIRPCAP /* * *IF* this is an AirPcap interface, add the "Wireless Settings" |