diff options
Diffstat (limited to 'perl-install/diskdrake/hd_gtk.pm')
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |