aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main_toolbar.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-14 02:19:46 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-14 02:19:46 +0000
commite1ec927708771d5349e50fe0d7eab117e2592956 (patch)
tree5cbed046f37e3e30a3454a65aa5d6f1c0da695d3 /ui/gtk/main_toolbar.c
parentd86f0b527121bd6968a5ac6b781bcb277acbea55 (diff)
Disable some menu items and toolbar items while we're waiting for a
capture to stop, so that we don't try to quit while we're in the middle of quitting or try to stop or restart the capture we're in the middle of stopping. svn path=/trunk/; revision=43250
Diffstat (limited to 'ui/gtk/main_toolbar.c')
-rw-r--r--ui/gtk/main_toolbar.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/gtk/main_toolbar.c b/ui/gtk/main_toolbar.c
index d4714fea23..19c7c15d62 100644
--- a/ui/gtk/main_toolbar.c
+++ b/ui/gtk/main_toolbar.c
@@ -191,6 +191,24 @@ void set_toolbar_for_capture_in_progress(gboolean capture_in_progress) {
}
}
+/* set toolbar state "stopping a capture" */
+void set_toolbar_for_capture_stopping(void) {
+
+ if (toolbar_init) {
+#ifdef HAVE_LIBPCAP
+ gtk_widget_set_sensitive(GTK_WIDGET(stop_button), FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(clear_button), FALSE);
+ /*if (capture_in_progress) {
+ gtk_widget_hide(GTK_WIDGET(new_button));
+ gtk_widget_show(GTK_WIDGET(stop_button));
+ } else {
+ gtk_widget_show(GTK_WIDGET(new_button));
+ gtk_widget_hide(GTK_WIDGET(stop_button));
+ }*/
+#endif /* HAVE_LIBPCAP */
+ }
+}
+
/* set toolbar state "have packets captured" */
void set_toolbar_for_captured_packets(gboolean have_captured_packets) {