summaryrefslogtreecommitdiffstats
path: root/draksnapshot-config
diff options
context:
space:
mode:
authortv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-26 15:43:30 +0000
committertv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-26 15:43:30 +0000
commit1037fcb44c16b6a865a4fe94cea07fb7438448cb (patch)
tree753cf9c953895bc9f6788562cc674be6c21ef43c /draksnapshot-config
parent05bbd10f274e9ff509f331d628a387d0eab56c6b (diff)
downloaddraksnapshot-1037fcb44c16b6a865a4fe94cea07fb7438448cb.tar
draksnapshot-1037fcb44c16b6a865a4fe94cea07fb7438448cb.tar.gz
draksnapshot-1037fcb44c16b6a865a4fe94cea07fb7438448cb.tar.bz2
draksnapshot-1037fcb44c16b6a865a4fe94cea07fb7438448cb.tar.xz
draksnapshot-1037fcb44c16b6a865a4fe94cea07fb7438448cb.zip
make advanced settings pop up like installer
git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@246748 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
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 *~);
}