summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakpxe
blob: 636965f0c19cc20077dfc3e14df37837cc51547f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111fix restore mode gi problems.
better box in all main menu.
Diffstat (limited to 'perl-install/standalone/drakbackup')
-rwxr-xr-xperl-install/standalone/drakbackup179
1 files changed, 131 insertions, 48 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index 57ee04105..1397d2865 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -115,6 +115,8 @@ my $cd_devive_entry;
my $custom_help;
my $button_box;
my $button_box_tmp;
+my $next_widget;
+my @system_state;
# config. FILES -> Default PATH & Global variables.
@@ -1048,27 +1050,54 @@ sub do_restore_backend {
print "End of restore\n";
}
+
+
+sub system_state {
+ @system_state = ();
+
+ read_conf_file();
+
+ $backup_sys or push @system_state, _("Do not include System Files");
+ if ($option_replace) { push @system_state, _("Replace backups (do not update)"); }
+ else { push @system_state, _("Update backups (do not replace)"); }
+ if ($comp_mode) { push @system_state, _("Backups use tar and bzip2 "); }
+ else { push @system_state, _("Backups use tar and gzip"); }
+ if ($cfg_file_exist) {
+ push @system_state, _("Backup Sources: \n-System Files: @sys_files \n-Users Files: @user_list\n-Other Files to backup: @list_other\nPath to save backups: $save_path\n");}
+ else {@system_state = _("No configuration please click Wizard or Advanced.")}
+}
+
sub do_restore {
my $do_restore;
+ my $button_restore;
+ my $text = new Gtk::Text(undef, undef);
+ system_state();
+ gtktext_insert($text, $_) foreach @system_state;
+ restore_button_box_main();
+ if ($cfg_file_exist) {
+ $button_restore = gtksignal_connect(new Gtk::Button(_(" Restore ")), clicked => sub {
+ do_restore_backend();
+ }),
+ } else {
+ $button_restore = gtksignal_connect(new Gtk::Button(_(" return to main menu ")), clicked => sub {
+ ${$central_widget}->destroy(); interactive_mode_box();
+ }),
+ }
gtkpack($advanced_box,
$do_restore = gtkpack_(new Gtk::VBox(0,10),
1, new Gtk::VBox(0,10),
+ 1, createScrolledWindow($text),
1, gtkpack(new Gtk::HBox(0,10),
- new Gtk::VBox(0,10),
- gtksignal_connect(new Gtk::Button(_(" Restore ")), clicked => sub {
- do_restore_backend(); }),
- new Gtk::VBox(0,10),
- ),
+ new Gtk::VBox(0,10),
+ $button_restore,
+ new Gtk::VBox(0,10),
+ ),
1, new Gtk::VBox(0,10),
- 0, gtkpack_(new Gtk::HBox(0,10),
- 0, gtksignal_connect(new Gtk::Button(_(" Previous ")), clicked => sub {
- ${$central_widget}->destroy();
- restore_step2();
- }),
- ),
),
);
+ $custom_help = "restore";
+ $current_widget = \&do_restore;
$central_widget = \$do_restore;
$up_box->show_all();
}
@@ -1106,7 +1135,8 @@ sub restore_step_other {
my $ref = $_->[1];
gtksignal_connect(gtkset_active($_->[0], ${$ref}), toggled => sub { ${$ref} = ${$ref} ? 0 : 1; })
}
-
+ $custom_help = "restore";
+ $current_widget = \&restore_step_other;
$central_widget = \$retore_step_other;
$up_box->show_all();
}
@@ -1155,6 +1185,8 @@ sub restore_step_user {
),
),
);
+ $custom_help = "restore";
+ $current_widget = \&restore_step_user;
$central_widget = \$retore_step_user;
$up_box->show_all();
}
@@ -1189,6 +1221,8 @@ sub restore_step_sys {
),
),
);
+ $custom_help = "restore";
+ $current_widget = \&restore_step_sys;
$central_widget = \$retore_step_sys;
$up_box->show_all();
}
@@ -1220,7 +1254,15 @@ sub restore_step2 {
my $ref = $_->[1];
gtksignal_connect(gtkset_active($_->[0], ${$ref}), toggled => sub { ${$ref} = ${$ref} ? 0 : 1; })
}
- restore_button_box();
+
+# if ($restore_sys && $backup_sys_cvs) { $next_widget = \&restore_step_sys; }
+# elsif ($restore_user) { $next_widget = \&restore_step_user;}
+# elsif ($restore_other){ $next_widget = \&restore_step_other;}
+# else{ $next_widget = \&do_restore;}
+ $next_widget = \&do_restore;
+ $custom_help = "restore";
+ $previous_widget =\&restore_box;
+ $current_widget = \&restore_step2;
$central_widget = \$retore_step2;
$up_box->show_all();
}
@@ -1237,19 +1279,23 @@ sub restore_box {
@user_list_to_restore = @user_backuped;
if ($other_backuped || $sys_backuped || @user_backuped) {
gtkpack($advanced_box,
- $retore_box = gtkpack_(new Gtk::VBox(0,1),
- 1, new Gtk::HBox(0,10),
+ $retore_box = gtkpack_(new Gtk::HBox(0,1),
+ 1, new Gtk::VBox(0,10),
1, gtkpack_(new Gtk::VBox(0,10),
+ 1, new Gtk::VBox(0,10),
1, gtksignal_connect(new Gtk::Button(_("Restore all backups (last)")),
- clicked => sub { $retore_box->destroy();
+ clicked => sub { $retore_box->destroy();
+ restore_button_box();
$restore_sys = 1;
$restore_other = 1;
$restore_user = 1;
do_restore(); }),
1, gtksignal_connect(new Gtk::Button(_("Custom Restore")),
- clicked => sub { $retore_box->destroy();
+ clicked => sub { $retore_box->destroy();
+ restore_button_box();
restore_step2();
}),
+ 1, new Gtk::VBox(0,10),
),
1, new Gtk::HBox(0,10),
),
@@ -1270,7 +1316,12 @@ sub restore_box {
)
);
}
- $custom_help = "retore";
+
+# if ($restore_sys && $backup_sys_cvs) { $next_widget = \&restore_step_sys; }
+# elsif ($restore_user) { $next_widget = \&restore_step_user();}
+# elsif ($restore_other){ $next_widget = \&restore_step_other();}
+# else{ $next_widget = \&do_restore();}
+ $custom_help = "restore";
$current_widget = \&restore_box;
$central_widget = \$retore_box;
$up_box->show_all();
@@ -1302,7 +1353,9 @@ sub restore_button_box_main {
gtksignal_connect(new Gtk::Button(_(" Cancel ")), clicked => sub {
${$central_widget}->destroy(); interactive_mode_box(); }),
gtksignal_connect(new Gtk::Button(_(" Help ")), clicked => sub {
- ${$central_widget}->destroy(); adv_help();}),
+ ${$central_widget}->destroy();
+ adv_help(\&$current_widget,$custom_help);
+ }),
),
),
);
@@ -1313,17 +1366,43 @@ sub restore_button_box {
$button_box_tmp->destroy();
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk::HButtonBox,
- 1, gtksignal_connect(new Gtk::Button(_(" Cancel ")), clicked => sub {
- ${$central_widget}->destroy(); interactive_mode_box(); }),
- 1, gtksignal_connect(new Gtk::Button(_(" Help ")), clicked => sub {
- ${$central_widget}->destroy(); adv_help();}),
- 1, new Gtk::HBox(0, 0),
- 1, gtksignal_connect(new Gtk::Button(_(" Next ")), clicked => sub {
- ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help);}),
- ),
+ 1, gtksignal_connect(new Gtk::Button(_(" Cancel ")), clicked => sub {
+ ${$central_widget}->destroy(); interactive_mode_box(); }),
+ 1, gtksignal_connect(new Gtk::Button(_(" Help ")), clicked => sub {
+ ${$central_widget}->destroy(); adv_help(\&$current_widget,$custom_help); }),
+ 1, new Gtk::HBox(0, 0),
+ 0, gtksignal_connect(new Gtk::Button(_(" Previous ")), clicked => sub {
+ ${$central_widget}->destroy(); $previous_widget->(); }),
+ 1, gtksignal_connect(new Gtk::Button(_(" Next ")), clicked => sub {
+ ${$central_widget}->destroy();
+ $next_widget->();
+# if ($restore_sys && $backup_sys_cvs) { restore_step_sys(); }
+# elsif ($restore_user) { restore_step_user();}
+# elsif ($restore_other){ restore_step_other();}
+# else{ do_restore();}
+ }),
+ ),