summaryrefslogtreecommitdiff
path: root/ui/gtk/main_80211_toolbar.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2012-06-25 23:30:23 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2012-06-25 23:30:23 +0000
commit3294c9876a8d70583f740a02e9eceeb9bd9e132f (patch)
tree0430cd8d136446d283ce950ab5107360b0400f7b /ui/gtk/main_80211_toolbar.c
parent289707eccc94036db196783a8c7af7f5bbe3f9ac (diff)
downloadwireshark-3294c9876a8d70583f740a02e9eceeb9bd9e132f.tar.gz
Don't let the user set the frequency or channel when we don't HAVE_PCAP;
instead disable the toolbar items (I hope). Hopefully this will fix the MacOS buildbots' --without-pcap builds. svn path=/trunk/; revision=43492
Diffstat (limited to 'ui/gtk/main_80211_toolbar.c')
-rw-r--r--ui/gtk/main_80211_toolbar.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/gtk/main_80211_toolbar.c b/ui/gtk/main_80211_toolbar.c
index d12873c06b..103457c613 100644
--- a/ui/gtk/main_80211_toolbar.c
+++ b/ui/gtk/main_80211_toolbar.c
@@ -149,6 +149,7 @@ void tb80211_update_freq_and_type(void)
tb80211_dont_set_chan = FALSE;
}
+#ifdef HAVE_PCAP
/* Get currently selected channel type type enum */
static
int get_selected_channel_type(void)
@@ -236,6 +237,7 @@ tb80211_set_chan_cb(GtkWidget *widget _U_, gpointer data _U_)
tb80211_set_channel();
}
+#endif
static void
tb80211_iface_changed_cb(GtkWidget *widget, gpointer data _U_)
@@ -383,7 +385,11 @@ ws80211_toolbar_new(void)
ti = gtk_tool_item_new();
gtk_widget_show(GTK_WIDGET (ti));
tb80211_freq_list_box = gtk_combo_box_text_new();
+#ifdef HAVE_PCAP
g_signal_connect(tb80211_freq_list_box, "changed", G_CALLBACK(tb80211_set_chan_cb), NULL);
+#else
+ gtk_widget_set_sensitive(GTK_WIDGET(tb80211_freq_list_box), FALSE);
+#endif
gtk_container_add(GTK_CONTAINER(ti), tb80211_freq_list_box);
gtk_widget_show(GTK_WIDGET (tb80211_freq_list_box));
gtk_toolbar_insert(GTK_TOOLBAR(tb80211_tb), ti, -1);
@@ -391,7 +397,11 @@ ws80211_toolbar_new(void)
ti = gtk_tool_item_new();
gtk_widget_show(GTK_WIDGET (ti));
tb80211_chan_type_box = gtk_combo_box_text_new();
+#ifdef HAVE_PCAP
g_signal_connect(tb80211_chan_type_box, "changed", G_CALLBACK(tb80211_set_chan_cb), NULL);
+#else
+ gtk_widget_set_sensitive(GTK_WIDGET(tb80211_freq_list_box), FALSE);
+#endif
gtk_container_add(GTK_CONTAINER(ti), tb80211_chan_type_box);
gtk_widget_show(GTK_WIDGET (tb80211_chan_type_box));
gtk_toolbar_insert(GTK_TOOLBAR(tb80211_tb), ti, -1);