summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/test.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-07 16:56:16 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-24 21:30:34 +0100
commit24d07aa63eb77616a38ff178726d0f4a0908b7dc (patch)
tree4515b672c368248a956259800d6507c23d816e26 /lib/Xconfig/test.pm
parentc3e929c47cfbc38aae282eacbf757b14c7172590 (diff)
downloaddrakx-kbd-mouse-x11-24d07aa63eb77616a38ff178726d0f4a0908b7dc.tar
drakx-kbd-mouse-x11-24d07aa63eb77616a38ff178726d0f4a0908b7dc.tar.gz
drakx-kbd-mouse-x11-24d07aa63eb77616a38ff178726d0f4a0908b7dc.tar.bz2
drakx-kbd-mouse-x11-24d07aa63eb77616a38ff178726d0f4a0908b7dc.tar.xz
drakx-kbd-mouse-x11-24d07aa63eb77616a38ff178726d0f4a0908b7dc.zip
switch from gtk2 to gtk3
Diffstat (limited to 'lib/Xconfig/test.pm')
-rw-r--r--lib/Xconfig/test.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Xconfig/test.pm b/lib/Xconfig/test.pm
index a1764b3..36b0e30 100644
--- a/lib/Xconfig/test.pm
+++ b/lib/Xconfig/test.pm
@@ -88,8 +88,8 @@ sub test {
BEGIN { $::no_ugtk_init = 1 }
BEGIN { unshift @::textdomains, 'drakx-kbd-mouse-x11' }
require lang;
- require ugtk2; #- help perl_checker
- ugtk2->import(qw(:wrappers :helpers)); #- help perl_checker
+ require ugtk3; #- help perl_checker
+ ugtk3->import(qw(:wrappers :helpers)); #- help perl_checker
use interactive::gtk;
use run_program;
use common;
@@ -99,23 +99,23 @@ sub test {
lang::bindtextdomain();
$ENV{DISPLAY} = ":9";
- Gtk2->init;
+ Gtk3->init;
gtkset_background(200 * 257, 210 * 257, 210 * 257);
- my $text = Gtk2::Label->new;
+ my $text = Gtk3::Label->new;
my $time = 12;
Glib::Timeout->add(1000, sub {
$text->set(sprintf(translate("%s"), $time));
- $time-- or Gtk2->main_quit;
+ $time-- or Gtk3->main_quit;
1;
});
eval { #- eval it so that missing pixmap will not break the test completely
my $root = gtkroot();
- my $gc = Gtk2::Gdk::GC->new($root);
- my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file("$::prefix/usr/share/mga/xfdrake/xfdrake-test-card.png");
+ my $gc = Gtk3::Gdk::GC->new($root);
+ my $pixbuf = Gtk3::Gdk::Pixbuf->new_from_file("$::prefix/usr/share/mga/xfdrake/xfdrake-test-card.png");
my ($w, $h) = ($pixbuf->get_width, $pixbuf->get_height);
- my $pixmap = Gtk2::Gdk::Pixmap->new($root, $w, $h, $root->get_depth);
+ my $pixmap = Gtk3::Gdk::Pixmap->new($root, $w, $h, $root->get_depth);
$pixbuf->render_to_drawable($pixmap, $gc, 0, 0, 0, 0, $w, $h, 'none', 0, 0);
$root->set_back_pixmap($pixmap, 0);
$root->clear;