diff options
author | damien <damien@mandriva.com> | 2002-03-18 17:20:13 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2002-03-18 17:20:13 +0000 |
commit | 3aa12f5c391d78893e12aaf6c90b66e2301509b5 (patch) | |
tree | 112ddf679f30fc8db51fba71144bda1e90903d98 | |
parent | 1ec1622e218845ab0a6e7892816196c4951d61cc (diff) | |
download | drakx-3aa12f5c391d78893e12aaf6c90b66e2301509b5.tar drakx-3aa12f5c391d78893e12aaf6c90b66e2301509b5.tar.gz drakx-3aa12f5c391d78893e12aaf6c90b66e2301509b5.tar.bz2 drakx-3aa12f5c391d78893e12aaf6c90b66e2301509b5.tar.xz drakx-3aa12f5c391d78893e12aaf6c90b66e2301509b5.zip |
corrected create_xpm API
-rw-r--r-- | perl-install/install_gtk.pm | 2 | ||||
-rw-r--r-- | perl-install/mouse.pm | 14 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 5 |
3 files changed, 11 insertions, 10 deletions
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index 0a9d22efa..a30298158 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -139,7 +139,7 @@ sub create_steps_window { my $darea = new Gtk::DrawingArea; my $in_button; my $draw_pix = sub { - my ($map, $mask) = gtkcreate_xpm($darea, $_[0]); + my ($map, $mask) = gtkcreate_xpm($_[0]); $darea->window->draw_pixmap ($darea->style->bg_gc('normal'), $map, 0, 0, ($darea->allocation->[2]-$PIX_W)/2 + 3, diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 1d47d1bb2..b7d56fb6b 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -477,13 +477,13 @@ sub test_mouse { $darea->realize(); my $wait = 0; - my ($m3_image, $m3_mask) = gtkcreate_xpm($darea, 'mouse_3b.xpm'); - my ($m3_imagep, $m3_maskp) = gtkcreate_xpm($darea, 'mouse_3b+.xpm'); - my ($m3_left, $m3_left_mask) = gtkcreate_xpm($darea, 'mouse_left.xpm'); - my ($m3_right, $m3_right_mask) = gtkcreate_xpm($darea, 'mouse_right.xpm'); - my ($m3_middle, $m3_middle_mask) = gtkcreate_xpm($darea, 'mouse_middle.xpm'); - my ($aru, $aru_mask) = gtkcreate_xpm($darea, 'arrow_up.xpm'); - my ($ard, $ard_mask) = gtkcreate_xpm($darea, 'arrow_down.xpm'); + my ($m3_image, $m3_mask) = gtkcreate_xpm('mouse_3b.xpm'); + my ($m3_imagep, $m3_maskp) = gtkcreate_xpm('mouse_3b+.xpm'); + my ($m3_left, $m3_left_mask) = gtkcreate_xpm('mouse_left.xpm'); + my ($m3_right, $m3_right_mask) = gtkcreate_xpm('mouse_right.xpm'); + my ($m3_middle, $m3_middle_mask) = gtkcreate_xpm('mouse_middle.xpm'); + my ($aru, $aru_mask) = gtkcreate_xpm('arrow_up.xpm'); + my ($ard, $ard_mask) = gtkcreate_xpm('arrow_down.xpm'); my $image = $m3_image; $mouse->{nbuttons} > 3 and $image = $m3_imagep; my $draw_text = sub { diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 8dcb1a432..0f43de49e 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -369,10 +369,11 @@ my @icon_paths = ($ENV{SHARE_PATH}, "$ENV{SHARE_PATH}/icons", "$ENV{SHARE_PATH}/ sub add_icon_path { @icon_paths = uniq(@icon_paths, @_) } sub gtkcreate_xpm { - my ($w, $f) = @_; + my ($f) = @_; + my $rw = gtkroot(); $f =~ m|.xpm$| or $f="$f.xpm"; if ( $f !~ /\//) { -e "$_/$f" and $f="$_/$f", last foreach @icon_paths } - my @l = Gtk::Gdk::Pixmap->create_from_xpm($w->window, $w->style->bg('normal'), $f) or die "gtkcreate_xpm: missing pixmap file $f"; + my @l = Gtk::Gdk::Pixmap->create_from_xpm($rw, new Gtk::Style->bg('normal'), $f) or die "gtkcreate_xpm: missing pixmap file $f"; @l; } |