summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/interactive/gtk.pm2
-rw-r--r--perl-install/ugtk2.pm10
2 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index c4967e4f6..c5ab6c96d 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -500,7 +500,7 @@ sub create_widget {
if ($e->{not_edit}) {
$real_w = $w = Gtk2::ComboBox->new_text;
# FIXME: the following causes Gtk-CRITICAL but not solvable at realize time:
- ($w->child->get_cell_renderers)[0]->set_property('ellipsize', 'end') if !$e->{do_not_ellipsize};
+ first($w->child->get_cell_renderers)->set_property('ellipsize', 'end') if !$e->{do_not_ellipsize};
$w->set_wrap_width($e->{gtk}{wrap_width}) if exists $e->{gtk}{wrap_width};
} else {
$w = Gtk2::ComboBoxEntry->new_text;
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 200e7a188..279a8ea88 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -350,8 +350,8 @@ sub create_box_with_title {
$scroll->signal_connect(realize => sub {
my $layout = $wtext->create_pango_layout($text);
$layout->set_width(($width - 10) * Gtk2::Pango->scale);
- $wtext->set_size_request($width, min(200, ($layout->get_pixel_size)[1] + 10));
- $scroll->set_size_request($width, min(200, ($layout->get_pixel_size)[1] + 10));
+ $wtext->set_size_request($width, min(200, second($layout->get_pixel_size) + 10));
+ $scroll->set_size_request($width, min(200, second($layout->get_pixel_size) + 10));
$o->{rwindow}->queue_resize;
});
gtkpack_($box, $o->{box_allow_grow} || 0, $scroll);
@@ -1432,7 +1432,7 @@ sub set_pixmap {
sub update_text {
my ($darea) = @_;
$darea->{layout} = $darea->create_pango_layout($darea->{text});
- $darea->{txt_width} = ($darea->{layout}->get_pixel_size)[0];
+ $darea->{txt_width} = first($darea->{layout}->get_pixel_size);
$darea->queue_draw;
}
@@ -1467,7 +1467,7 @@ sub new {
my $x_icon = $is_rtl ? $d_width - 12 - $width : 12;
# here: 48 is the amount of white background in the blue background we wish to ignore:
my $x_text = $is_rtl ? $d_width - $blue_width + 48 - $darea->{txt_width} : $blue_width - 48;
- $darea->{layout_height} ||= ($darea->{layout}->get_pixel_size)[1];
+ $darea->{layout_height} ||= second($darea->{layout}->get_pixel_size);
$blue_part->render_to_drawable($darea->window, $style->bg_gc('normal'),
0, 0, $x_blue, 0, -1, -1, 'none', 0, 0);
$darea->{icon}->render_to_drawable($darea->window, $style->bg_gc('normal'),
@@ -1543,7 +1543,7 @@ sub RENDER { # not that efficient...
$layout->set_text($cell->get('label'));
my $is_rtl = lang::text_direction_rtl();
- my $txt_width = ($layout->get_pixel_size)[0];
+ my $txt_width = first($layout->get_pixel_size);
my ($x_offset, $y_offset, $_width, $_height) = calc_size($cell, $layout);
my $pixbuf = $cell->get('pixbuf');