diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-01-20 11:37:21 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-01-20 11:37:21 +0000 |
commit | dfaa73c20850162476c34255bb0a67a75d0b3cc1 (patch) | |
tree | b69c7a1b02702fd30042ea48de8334db7a3b8d6c /perl-install/Xconfig/test.pm | |
parent | 758dd1e087493fc682230ffb7f88b4954a81d98a (diff) | |
download | drakx-backup-do-not-use-dfaa73c20850162476c34255bb0a67a75d0b3cc1.tar drakx-backup-do-not-use-dfaa73c20850162476c34255bb0a67a75d0b3cc1.tar.gz drakx-backup-do-not-use-dfaa73c20850162476c34255bb0a67a75d0b3cc1.tar.bz2 drakx-backup-do-not-use-dfaa73c20850162476c34255bb0a67a75d0b3cc1.tar.xz drakx-backup-do-not-use-dfaa73c20850162476c34255bb0a67a75d0b3cc1.zip |
use gtk rather than qiv to display the background tile in X test
Diffstat (limited to 'perl-install/Xconfig/test.pm')
-rw-r--r-- | perl-install/Xconfig/test.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index 1c5fade15..de68620fb 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -133,10 +133,17 @@ sub test { 1; }); - my $background = "/usr/share/mdk/xfdrake/xfdrake-test-card.jpg"; - my $qiv = "/usr/bin/qiv"; - run_program::rooted($::prefix, $qiv, "-y", $background) - if -r "$::prefix/$background" && -x "$::prefix/$qiv"; + 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("/usr/share/mdk/xfdrake/xfdrake-test-card.jpg"); + my ($w, $h) = ($pixbuf->get_width, $pixbuf->get_height); + my $pixmap = Gtk2::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; + $gc->unref; + }; my $in = interactive::gtk->new; $in->exit($in->ask_yesorno('', [ N("Is this the correct setting?"), $text ], 0) ? 0 : 222); |