]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/brestore/brestore.pl
bacula-web: Improved smarty code in header for catalog selection
[bacula/bacula] / gui / brestore / brestore.pl
index 52d36d56ea77c6c31e2177fa56bda4aa1fe01c4a..eac4a0fff5e25eb05997e7b806c82692835a341b 100755 (executable)
@@ -65,10 +65,6 @@ my $glade_file = 'brestore.glade' ;
 
 =cut
 
-use Gtk2;              # auto-initialize Gtk2
-use Gtk2::GladeXML;
-use Gtk2::SimpleList;          # easy wrapper for list views
-use Gtk2::Gdk::Keysyms;                # keyboard code constants
 use Data::Dumper qw/Dumper/;
 my $debug=0;                   # can be on brestore.conf
 our ($VERSION) = ('$Revision$' =~ /(\d+)/);
@@ -87,7 +83,7 @@ sub new
        bconsole => 'bconsole', # path and arg to bconsole
        bsr_dest => '',         # destination url for bsr files
        debug    => 0,          # debug level 0|1
-       use_ok_bkp_only => 1,   # dont use bad backup
+       use_ok_bkp_only => 1,   # don't use bad backup
        bweb     => 'http://localhost/cgi-bin/bweb/bweb.pl', # bweb url
        see_all_versions => 0,  # display all file versions in FileInfo
        mozilla  => 'mozilla',  # mozilla bin
@@ -2743,6 +2739,7 @@ sub get_all_file_versions
    AND File.FileIndex >= JobMedia.FirstIndex
    AND File.FileIndex <= JobMedia.LastIndex
    AND JobMedia.MediaId = Media.MediaId
+   AND Job.Type = 'B'
    AND Client.Name = '$client'";
        
     $self->debug($query);
@@ -3308,6 +3305,14 @@ if ($batch_mod) {
     exit (0);
 }
 
+# load Gtk libraries only in non batch mode
+eval "
+ use Gtk2;
+ use Gtk2::GladeXML;
+ use Gtk2::SimpleList;
+ use Gtk2::Gdk::Keysyms;
+";
+
 $glade_file = $p->{glade_file} || $glade_file;
 
 foreach my $path ('','.','/usr/share/brestore','/usr/local/share/brestore') {