From a26e2b9d447bc46e1e99a313a313689e46cbcb8f Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 2 Oct 2008 11:41:05 +0000 Subject: [PATCH] ebl Don't load Gtk2 libraries in non batch mode git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7681 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/brestore/ReleaseNotes | 5 ++++- gui/brestore/brestore.pl | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gui/brestore/ReleaseNotes b/gui/brestore/ReleaseNotes index 163243ba01..9fe57c4e57 100644 --- a/gui/brestore/ReleaseNotes +++ b/gui/brestore/ReleaseNotes @@ -1,4 +1,7 @@ - Release Notes for brestore 2.2.0 + Release Notes for brestore 2.4 + +Version 2.4.2 + - Load Gtk only in non batch mode Version 2.2.5-2: - Use 2 transactions in brestore.pl -b diff --git a/gui/brestore/brestore.pl b/gui/brestore/brestore.pl index 52d36d56ea..5cefc7b839 100755 --- a/gui/brestore/brestore.pl +++ b/gui/brestore/brestore.pl @@ -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+)/); @@ -3308,6 +3304,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') { -- 2.39.5