Discussion:
[2825] (_gtk__Image) kill old gtk+ warnings that confuse people
root-odJJhXpcy38dnm+
2012-01-26 18:58:17 UTC
Permalink
Revision: 2825
Author: tv
Date: 2012-01-26 19:58:17 +0100 (Thu, 26 Jan 2012)
Log Message:
-----------
(_gtk__Image) kill old gtk+ warnings that confuse people

Modified Paths:
--------------
drakx/trunk/perl-install/install/NEWS
drakx/trunk/perl-install/mygtk2.pm

Modified: drakx/trunk/perl-install/install/NEWS
===================================================================
--- drakx/trunk/perl-install/install/NEWS 2012-01-26 18:58:14 UTC (rev 2824)
+++ drakx/trunk/perl-install/install/NEWS 2012-01-26 18:58:17 UTC (rev 2825)
@@ -1,3 +1,4 @@
+- kill old gtk+ warnings that confuse people
- include back urpmi translations

Version 13.78 - 24 January 2012

Modified: drakx/trunk/perl-install/mygtk2.pm
===================================================================
--- drakx/trunk/perl-install/mygtk2.pm 2012-01-26 18:58:14 UTC (rev 2824)
+++ drakx/trunk/perl-install/mygtk2.pm 2012-01-26 18:58:17 UTC (rev 2825)
@@ -345,7 +345,6 @@
my ($width, $height) = ($pixbuf->get_width, $pixbuf->get_height);
$w->set_size_request($width, $height);
$w->{pixbuf} = $pixbuf;
- my $not_my_first_event;
$w->signal_connect(expose_event => sub {
my (undef, $event) = @_;
if (!$w->{x}) {
@@ -353,17 +352,17 @@
$w->{x} = $alloc->x;
$w->{y} = $alloc->y;
}
+ # workaround Gtk+ bug: in installer, first event is not complete and rectables are bogus:
+ if ($::isInstall) {
+ $pixbuf->render_to_drawable($w->window, $w->style->fg_gc('normal'),
+ 0, 0, $w->{x}, $w->{y}, $width, $height, 'max', 0, 0);
+ return;
+ }
foreach my $rect($event->region->get_rectangles) {
my @values = $rect->values;
$pixbuf->render_to_drawable($w->window, $w->style->fg_gc('normal'),
@values[0..1], $w->{x}+$values[0], $w->{y}+$values[1], @values[2..3], 'max', 0, 0);
}
- # workaround Gtk+ bug: in installer, first event is not complete:
- if ($::isInstall && !$not_my_first_event) {
- $not_my_first_event = 1;
- $pixbuf->render_to_drawable($w->window, $w->style->fg_gc('normal'),
- 0, 0, $w->{x}, $w->{y}, $width, $height, 'max', 0, 0);
- }
});
} : sub {
my ($w, $file, $o_size) = @_;

Loading...