From cd7ce13e2f90bf25cedfcec1a606948b7b9897df Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 18 Mar 2016 14:35:34 +0100 Subject: fix partitions not initially displayed (mga#17564) --- perl-install/diskdrake/hd_gtk.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 68295879d..47d47472a 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -114,10 +114,13 @@ sub main { $notebook_widget->signal_connect(realize => $update_all); $w->sync; $notebook_widget->set_current_page(0); + # there's always at least one child (at least a button for create a new part on empty discs): + my @children = $current_kind->{display_box} ? $current_kind->{display_box}->get_children : (); # workaround for $notebook_widget being realized too early: - if (!$done_button) { + if (!@children ||!$done_button) { $notebook_widget->set_current_page(-1); $notebook_widget->set_current_page(0); + undef $initializing; $update_all->(2); } $done_button->grab_focus; @@ -127,7 +130,6 @@ sub main { if $::isStandalone; } - undef $initializing; $w->main; } -- cgit v1.2.1