summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-02-26 16:00:27 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-02-26 16:00:27 +0000
commit1cbe9a2cb9d28f0f7f5faa7dd07c089aee20d578 (patch)
treea794ba0455d805ce10b542aaf778c9e6ce4818b5 /perl-install/ugtk2.pm
parent52c21c55f388635a2195108dc6838fdac48b9c4f (diff)
downloaddrakx-1cbe9a2cb9d28f0f7f5faa7dd07c089aee20d578.tar
drakx-1cbe9a2cb9d28f0f7f5faa7dd07c089aee20d578.tar.gz
drakx-1cbe9a2cb9d28f0f7f5faa7dd07c089aee20d578.tar.bz2
drakx-1cbe9a2cb9d28f0f7f5faa7dd07c089aee20d578.tar.xz
drakx-1cbe9a2cb9d28f0f7f5faa7dd07c089aee20d578.zip
(set_back_pixmap) split it out of Gtk2::Banner::set_pixmap
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm21
1 files changed, 13 insertions, 8 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 3d12db346..890ed5b01 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -671,6 +671,18 @@ sub set_back_pixbuf {
$window->set_back_pixmap($pixmap, 0);
}
+sub set_back_pixmap {
+ my ($w) = @_;
+ return if !$w->realized;
+ my $window = $w->window;
+ my $pixmap = $w->{back_pixmap} ||= Gtk2::Gdk::Pixmap->new($window, 1, 2, $window->get_depth);
+
+ my $style = $w->get_style;
+ $pixmap->draw_points($style->bg_gc('normal'), 0, 0);
+ $pixmap->draw_points($style->base_gc('normal'), 0, 1);
+ $window->set_back_pixmap($pixmap);
+}
+
sub fill_tiled_coords {
my ($widget, $pixbuf, $x_back, $y_back, $width, $height) = @_;
my ($x2, $y2) = (0, 0);
@@ -1604,14 +1616,7 @@ use ugtk2 qw(:helpers :wrappers);
sub set_pixmap {
my ($darea) = @_;
return if !$darea->realized;
- my $window = $darea->window;
- my $pixmap = $darea->{back_pixmap} ||= Gtk2::Gdk::Pixmap->new($window, 1, 2, $window->get_depth);
-
- my $style = $darea->get_style;
- $pixmap->draw_points($style->bg_gc('normal'), 0, 0);
- $pixmap->draw_points($style->base_gc('normal'), 0, 1);
- $darea->window->set_back_pixmap($pixmap);
-
+ ugtk2::set_back_pixmap($darea);
$darea->{layout} = $darea->create_pango_layout($darea->{text});
}