From 610c347727e894a7fb0f8555bf5f6a44c3f70e97 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 31 Oct 2016 16:22:53 +0100 Subject: fix wrong methods we were crashing with: Can't locate object method "get_allocated_width" via package "Gtk3::Gdk::Pixbuf" at ./control-center line 1062. conversion done in commit 1981bc71c664e541c422c17c33dc449f0bf61d16 was wrong as PixBuf doesn't herit from Gtk3::Widget --- control-center | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/control-center b/control-center index 6247f5cd..f73aaeeb 100755 --- a/control-center +++ b/control-center @@ -1054,7 +1054,7 @@ $wait_darea->signal_connect(draw => sub { $wait_darea->{first_expose} = 1; my $size = $wait_darea->{size}; my ($d_width, $d_height) = ($size->{width}, $size->{height}); - ($w->{pix_width}, $w->{pix_height}) = ($pixbuf->get_allocated_width, $pixbuf->get_allocated_height); + ($w->{pix_width}, $w->{pix_height}) = ($pixbuf->get_width, $pixbuf->get_height); my ($txt_width, $txt_height) = $wait_darea->{layout}->get_pixel_size; $w->{pix_yy} = ($d_width - $w->{pix_width})/2; $w->{pix_xx} = ($d_height - $w->{pix_height} - $txt_height)/2; @@ -1522,7 +1522,7 @@ sub render_shiner { sub scale { my ($pixbuf, $gain) = @_; - my ($width, $height) = ($pixbuf->get_allocated_height, $pixbuf->get_allocated_width); + my ($width, $height) = ($pixbuf->get_height, $pixbuf->get_width); $pixbuf->scale_simple($height+$gain, $width+$gain, 'hyper'); } -- cgit v1.2.1