summaryrefslogtreecommitdiffstats
path: root/draksnapshot-config
diff options
context:
space:
mode:
Diffstat (limited to 'draksnapshot-config')
-rwxr-xr-xdraksnapshot-config30
1 files changed, 19 insertions, 11 deletions
diff --git a/draksnapshot-config b/draksnapshot-config
index a0fdc08..7f04a4f 100755
--- a/draksnapshot-config
+++ b/draksnapshot-config
@@ -104,7 +104,21 @@ my (%entries, $where);
# if not configured, just default where will be mounted the discs by HAL:
$backup_directory ||= '/media/';
-my $box;
+my $dialog = ugtk2->new(N("Backup snapshots configuration"));
+my $d_window = $dialog->{window};
+gtkadd($dialog->{rwindow},
+ gtknew('VBox', children => [
+ 0, gtknew('Title2', label => N("Backup list")),
+ 1, format_list($backup_list, 1),
+ 0, gtknew('Title2', label => N("Exclude list")),
+ 1, format_list($exclude_list),
+ 0, gtknew('HButtonBox', layout => 'end',
+ children_tight => [
+ gtknew('Button', text => N("Close"), clicked => sub { $d_window->hide }),
+ ]),
+ ]));
+
+my $button;
gtkadd($my_win->{window},
gtknew('VBox', children => [
if_(!$::isEmbedded, 0, Gtk2::Banner->new('draksnapshot-big',
@@ -113,7 +127,7 @@ gtkadd($my_win->{window},
0, gtknew('CheckButton', text => N("Backup the whole system"),
toggled => sub {
my ($w) = @_;
- $box->set_sensitive(!$w->get_active);
+ $button->set_sensitive(!$w->get_active);
}),
0, gtknew('HBox', spacing => 5, children => [
0, gtknew('Label_Left', text => N("Where to backup")),
@@ -153,14 +167,8 @@ gtkadd($my_win->{window},
];
} @ordered_intervals
])),
- 0, gtknew('Expander', text => N("Advanced"),
- child => $box = gtknew('VBox', children => [
- 0, gtknew('Title2', label => N("Backup list")),
- 1, format_list($backup_list, 1),
- 0, gtknew('Title2', label => N("Exclude list")),
- 1, format_list($exclude_list),
- ]),
- ),
+ 0, $button = gtknew('Install_Button', text => N("Advanced"),
+ clicked => sub { $d_window->show }),
0, gtknew('HButtonBox', layout => 'end', border_width => 5, spacing => 5, children_loose => [
gtknew('Button', text => N("Apply"), clicked => \&save),
gtknew('Button', text => $::isEmbedded ? N("Cancel") : N("Close"), clicked => sub { save(); quit() })
@@ -266,7 +274,7 @@ sub save() {
if_($val, join("\t", 'interval', $_, $val));
} @ordered_intervals);
- if (!$box->get('sensitive')) { # Mandriva defaults
+ if (!$button->get('sensitive')) { # Mandriva defaults
@{$backup_list->{data}} = '/'; #qw(/bin /boot /etc /home /lib /lib64 /opt);
@{$exclude_list->{data}} = qw(/media /mnt /proc /sys /tmp /var/run /var/tmp *~);
}