]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl display message when bweb not found
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 17 Aug 2006 21:18:07 +0000 (21:18 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 17 Aug 2006 21:18:07 +0000 (21:18 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3301 91ce42f0-d328-0410-95d8-f526ca767f89

gui/brestore/brestore.pl

index ff107a4b32cadc21c870804a6c59736fde5761a7..fbe56b1e448452571888514d1a19a40fadc7669b 100755 (executable)
@@ -271,7 +271,16 @@ sub show_job
 {
     my ($self, $client, $jobid) = @_;
 
-    $self->{pref}->go_bweb("?action=dsp_cur_job;jobid=$jobid;client=$client", "view job status");
+    my $ret = $self->{pref}->go_bweb("?action=dsp_cur_job;jobid=$jobid;client=$client", "view job status");
+
+    if ($ret == -1) {
+       my $widget = Gtk2::MessageDialog->new(undef, 'modal', 'info', 'close', 
+"Your job have been submited to bacula.
+To follow it, you must use bconsole (or install/configure bweb)");
+       $widget->run;
+       $widget->destroy();
+    }
+
     $self->on_cancel_resto_clicked();
 }
 
@@ -567,13 +576,13 @@ sub go_bweb
 
     unless ($self->{mozilla} and $self->{bweb}) {
        new DlgWarn("You must install Bweb and set your mozilla bin to $msg");
-       return;
+       return -1;
     }
 
     system("$self->{mozilla} -remote 'Ping()'");
     if ($? != 0) {
        new DlgWarn("Warning, you must have a running $self->{mozilla} to $msg");
-       return;
+       return 0;
     }
 
     my $cmd = "$self->{mozilla} -remote 'OpenURL($self->{bweb}$url,new-tab)'" ;