diff options
author | Stew Benedict <stewb@mandriva.org> | 2003-07-09 23:40:10 +0000 |
---|---|---|
committer | Stew Benedict <stewb@mandriva.org> | 2003-07-09 23:40:10 +0000 |
commit | 25bf44df79d73922da3ca4bc613a275c83084aa0 (patch) | |
tree | ab8fca1812f778b117368641a12ea18d17c97ff8 /perl-install | |
parent | 3a7fc69dc40b51d034274653c6dd8e7d675ab9f4 (diff) | |
download | drakx-backup-do-not-use-25bf44df79d73922da3ca4bc613a275c83084aa0.tar drakx-backup-do-not-use-25bf44df79d73922da3ca4bc613a275c83084aa0.tar.gz drakx-backup-do-not-use-25bf44df79d73922da3ca4bc613a275c83084aa0.tar.bz2 drakx-backup-do-not-use-25bf44df79d73922da3ca4bc613a275c83084aa0.tar.xz drakx-backup-do-not-use-25bf44df79d73922da3ca4bc613a275c83084aa0.zip |
Beginnings of "search for file to restore". Not functional yet.
Just want it in before everything get's changed on me.
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/drakbackup | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 8242a1c72..0c60db5b9 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -3414,6 +3414,39 @@ sub restore_step2() { $up_box->show_all; } +sub find_files_to_restore() { + local $_; + my $file_restore; + my $start_restore; + + #- file info in tree view + my $model = Gtk2::TreeStore->new(Gtk2::GType->STRING); + my $file_list = Gtk2::TreeView->new_with_model($model); + my $file_wildcard_entry = new Gtk2::Entry(); + + gtkpack($advanced_box, + $file_restore = gtkpack_(new Gtk2::VBox(0,10), + 0, new Gtk2::Label(N("Filename to search for (wildcards allowed):")), + 0, gtkpack_(new Gtk2::HBox(0,10), + 1, $file_wildcard_entry, + 0, gtksignal_connect(new Gtk2::Button(N("Search Backups")), clicked => sub { + # FIXME - search the file listings and offer a list of possible matches + my $wildcard = $file_wildcard_entry->get_text; + show_warning("w", N("Search For...\n%s", $wildcard)); + gtkset_sensitive($start_restore, 1); + }), + ), + 1, create_scrolled_window($file_list), + 0, gtkset_sensitive(gtksignal_connect($start_restore = new Gtk2::Button(N("Restore Selected")), clicked => sub { + # FIXME - search the file listings and offer a list of possible matches + show_warning("w", N("Start Search...")); + }), 0), + ), + ); + + $central_widget = \$file_restore; +} + sub catalog_restore() { my $catalog_box; my $cat_entry; @@ -3902,6 +3935,11 @@ sub restore_box() { 1, gtkpack_(new Gtk2::VBox(0,10), 1, new Gtk2::VBox(0,10), 1, new Gtk2::VBox(0,10), + 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Search for files to restore")), clicked => sub { + $retore_box->destroy; + button_box_file_restore(); + find_files_to_restore() + }), 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Restore all backups")), clicked => sub { $retore_box->destroy; button_box_restore(); @@ -4062,6 +4100,24 @@ sub button_box_restore_main() { ); } +sub button_box_file_restore() { + $button_box_tmp->destroy; + + gtkpack($button_box, + $button_box_tmp = gtkpack_(gtkpack_(new Gtk2::HButtonBox, + 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub { + destroy_widget(); + restore_box(); + }), + 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub { + adv_help(\&$current_widget, $custom_help); + }), + 1, new Gtk2::HBox(0, 1), + ), + ), + ); +} + sub button_box_log_main() { $button_box_tmp->destroy; |