---
p2v/client/lib/virt-p2v/gtk-queue.rb | 2 +-
p2v/client/lib/virt-p2v/ui/connect.rb | 2 +-
p2v/client/lib/virt-p2v/ui/convert.rb | 2 +-
p2v/client/lib/virt-p2v/ui/gtk.rb | 1 +
p2v/client/lib/virt-p2v/ui/network.rb | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/p2v/client/lib/virt-p2v/gtk-queue.rb b/p2v/client/lib/virt-p2v/gtk-queue.rb
index 0ce0a97..22a92b4 100644
--- a/p2v/client/lib/virt-p2v/gtk-queue.rb
+++ b/p2v/client/lib/virt-p2v/gtk-queue.rb
@@ -20,7 +20,7 @@
# The above page is distributed under the terms of the GNU FDL, although I
# consider this code to be too trivial to be copyrightable
-require 'gtk2'
+require 'virt-p2v/ui/gtk'
require 'thread'
module Gtk
diff --git a/p2v/client/lib/virt-p2v/ui/connect.rb
b/p2v/client/lib/virt-p2v/ui/connect.rb
index d2a2ce8..15c3d9c 100644
--- a/p2v/client/lib/virt-p2v/ui/connect.rb
+++ b/p2v/client/lib/virt-p2v/ui/connect.rb
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'gtk2'
+require 'virt-p2v/ui/gtk'
require 'virt-p2v/connection'
diff --git a/p2v/client/lib/virt-p2v/ui/convert.rb
b/p2v/client/lib/virt-p2v/ui/convert.rb
index 74d201f..405794f 100644
--- a/p2v/client/lib/virt-p2v/ui/convert.rb
+++ b/p2v/client/lib/virt-p2v/ui/convert.rb
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'gtk2'
+require 'virt-p2v/ui/gtk'
require 'virt-p2v/blockdevice'
require 'virt-p2v/netdevice'
diff --git a/p2v/client/lib/virt-p2v/ui/gtk.rb b/p2v/client/lib/virt-p2v/ui/gtk.rb
index e69de29..501c9ad 100644
--- a/p2v/client/lib/virt-p2v/ui/gtk.rb
+++ b/p2v/client/lib/virt-p2v/ui/gtk.rb
@@ -0,0 +1 @@
+require('gtk2') if !(Kernel.const_defined?(:NOGUI) && NOGUI == true)
diff --git a/p2v/client/lib/virt-p2v/ui/network.rb
b/p2v/client/lib/virt-p2v/ui/network.rb
index 5b2ec19..3ade7ed 100644
--- a/p2v/client/lib/virt-p2v/ui/network.rb
+++ b/p2v/client/lib/virt-p2v/ui/network.rb
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'gtk2'
+require 'virt-p2v/ui/gtk'
require 'ipaddr'
require 'virt-p2v/netdevice'
--
1.8.3.1