From 6b45a0f7bf02658ffbdc5398225ba86982bed6be Mon Sep 17 00:00:00 2001
From: Thierry Vignaud <thierry.vignaud@gmail.com>
Date: Wed, 6 Nov 2013 18:31:01 +0100
Subject: factorize a value

---
 perl-install/mygtk3.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm
index d844a0e41..c41320b15 100644
--- a/perl-install/mygtk3.pm
+++ b/perl-install/mygtk3.pm
@@ -758,7 +758,8 @@ sub _gtk__MDV_Notebook {
                 gtknew('Image', file => "right-white-background_left_part-$_", flip => $is_flip_needed);
             } 1, 2, 2, 3;
         my $width1 = $left_background->get_allocated_width;
-        my $total_width = $width1 + $right_background[0]->get_pixbuf->get_width;
+        my $right_bg_width = $right_background[0]->get_pixbuf->get_width;
+        my $total_width = $width1 + $right_bg_width;
         my $arrow_x = text_direction_rtl() ? $offset/2 - 4 : $width1 - $offset - 3;
         $w = gtknew('HBox', spacing => 0, children => [
             0, $layout = gtknew('Layout', width => $total_width - $offset, children => [ #Layout Fixed
@@ -788,7 +789,7 @@ sub _gtk__MDV_Notebook {
 
         $w->signal_connect('size-allocate' => sub {
                                my (undef, $requisition) = @_;
-                               state $width ||= $right_background[0]->get_pixbuf->get_width;
+                               state $width ||= $right_bg_width;
                                $box->set_size_request($width, $requisition->height);
                            });
         $_->set_property('no-show-all', 1) foreach $selection_bar, $selection_arrow;
-- 
cgit v1.2.1