aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main_toolbar.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2012-01-30 13:05:27 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2012-01-30 13:05:27 +0000
commitd86b90ce048628c05adb2fc3c78ae80a73fc8fb6 (patch)
tree2b00041f505dde36b7c1ffa6784e232fe73ce025 /ui/gtk/main_toolbar.c
parent4308ba7dc53630a9a0764266f3e9cb54b4b2b4b2 (diff)
Disable the save-as button in the toolbar if we cannot save-as,
because this will assert. svn path=/trunk/; revision=40769
Diffstat (limited to 'ui/gtk/main_toolbar.c')
-rw-r--r--ui/gtk/main_toolbar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gtk/main_toolbar.c b/ui/gtk/main_toolbar.c
index a834953ca3..1d6c797d48 100644
--- a/ui/gtk/main_toolbar.c
+++ b/ui/gtk/main_toolbar.c
@@ -104,9 +104,9 @@ toolbar_redraw_all(void)
/* Enable or disable toolbar items based on whether you have a capture file
you've finished reading. */
-void set_toolbar_for_capture_file(gboolean have_capture_file) {
+void set_toolbar_for_capture_file(gboolean have_capture_file, gboolean can_save_as) {
if (toolbar_init) {
- gtk_widget_set_sensitive(GTK_WIDGET(save_button), have_capture_file);
+ gtk_widget_set_sensitive(GTK_WIDGET(save_button), have_capture_file && can_save_as);
gtk_widget_set_sensitive(GTK_WIDGET(close_button), have_capture_file);
gtk_widget_set_sensitive(GTK_WIDGET(reload_button), have_capture_file);
}
@@ -408,7 +408,7 @@ toolbar_new(void)
toolbar_init = TRUE;
set_toolbar_for_unsaved_capture_file(FALSE);
set_toolbar_for_captured_packets(FALSE);
- set_toolbar_for_capture_file(FALSE);
+ set_toolbar_for_capture_file(FALSE, FALSE);
#ifdef HAVE_LIBPCAP
set_toolbar_for_capture_in_progress(FALSE);
#endif /* HAVE_LIBPCAP */