summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraksnapshot-config17
1 files changed, 10 insertions, 7 deletions
diff --git a/draksnapshot-config b/draksnapshot-config
index c389bcf..bd98c64 100755
--- a/draksnapshot-config
+++ b/draksnapshot-config
@@ -45,6 +45,11 @@ ugtk2::add_icon_path("/usr/share/draksnapshot/pixmaps/");
my $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
my @ordered_intervals = qw(hourly daily weekly monthly);
+my %default_values = (
+ "hourly" => 6,
+ "daily" => 7,
+ "weekly" => 4,
+);
my ($backup_list, $exclude_list) = map {
my $key = $_;
@@ -66,7 +71,7 @@ my %default_intervals = (
);
# initialize commented out fields:
-$default_intervals{$_} ||= undef foreach @ordered_intervals;
+$default_intervals{$_} ||= $default_values{$_} foreach @ordered_intervals;
######### GUI
@@ -285,12 +290,10 @@ sub add {
}
sub save() {
- # $entries are currently not added to window so $val will always be 0
- # As there is no way currently to change interval, the best is to not rewrite them (#58534)
-# save_keyword('interval', map {
-# my $val = $entries{$_}->get_text;
-# if_($val, join("\t", 'interval', $_, $val));
-# } @ordered_intervals);
+ save_keyword('interval', map {
+ my $val = $default_intervals{$_};
+ if_($val, join("\t", 'interval', $_, $val));
+ } @ordered_intervals);
if (!$button->get('sensitive')) { # Mandriva defaults
@{$backup_list->{data}} = '/'; #qw(/bin /boot /etc /home /lib /lib64 /opt);