From 4889fc41e90b73c9e46ebe17c82b55313c1d75a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Thu, 19 Jun 2008 17:25:34 +0000 Subject: [PATCH] Make storage-based and time-based "Next file every" checkboxes behave equal in "Use multiple files". Also default to storage-based if not time-based. This fixes the initial problem in bug #2599. svn path=/trunk/; revision=25489 --- gtk/capture_dlg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 04762fb45f..c4ef737a66 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -1349,7 +1349,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) /* Ring buffer filesize row */ ring_filesize_cb = gtk_check_button_new_with_label("Next file every"); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(ring_filesize_cb), - capture_opts->has_autostop_filesize); + capture_opts->has_autostop_filesize || !capture_opts->has_file_duration); g_signal_connect(ring_filesize_cb, "toggled", G_CALLBACK(capture_prep_adjust_sensitivity), cap_open_w); gtk_tooltips_set_tip(tooltips, ring_filesize_cb, "If the selected file size is exceeded, capturing switches to the next file.\n" @@ -2390,7 +2390,10 @@ capture_prep_adjust_sensitivity(GtkWidget *tb _U_, gpointer parent_w) /* Force at least one of the "file switch" conditions (we need at least one) */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ring_filesize_cb)) == FALSE && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(file_duration_cb)) == FALSE) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ring_filesize_cb), TRUE); + if (tb == ring_filesize_cb) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(file_duration_cb), TRUE); + else + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ring_filesize_cb), TRUE); } gtk_widget_set_sensitive(GTK_WIDGET(ringbuffer_nbf_cb), TRUE);