From: Eric B. <ri...@us...> - 2006-08-17 20:40:24
|
Update of /cvsroot/bacula/gui/brestore In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23590 Modified Files: Tag: Branch-1_38 brestore.pl Log Message: ebl fix error message Index: brestore.pl =================================================================== RCS file: /cvsroot/bacula/gui/brestore/brestore.pl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- brestore.pl 17 Aug 2006 20:08:36 -0000 1.1.2.1 +++ brestore.pl 17 Aug 2006 20:40:16 -0000 1.1.2.2 @@ -271,7 +271,16 @@ { 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(); } @@ -566,20 +575,14 @@ my ($self, $url, $msg) = @_; unless ($self->{mozilla} and $self->{bweb}) { - 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 bweb)"); - $widget->run; - $widget->destroy(); - - #new DlgWarn("You must install Bweb and set your mozilla bin to $msg"); - return; + new DlgWarn("You must install Bweb and set your mozilla bin to $msg"); + 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)'" ; |