diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-04-01 10:21:50 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-04-01 10:30:51 +0200 |
commit | e44a107c6d3465a5f3afc9a5c243be86b341c099 (patch) | |
tree | 21ebd223c70f0b9c5dd18247462f37bb6ffa9ea3 /perl-install/diskdrake/hd_gtk.pm | |
parent | beb610d87e04f2a6e0dd10b43bd417480668ddc1 (diff) | |
download | drakx-e44a107c6d3465a5f3afc9a5c243be86b341c099.tar drakx-e44a107c6d3465a5f3afc9a5c243be86b341c099.tar.gz drakx-e44a107c6d3465a5f3afc9a5c243be86b341c099.tar.bz2 drakx-e44a107c6d3465a5f3afc9a5c243be86b341c099.tar.xz drakx-e44a107c6d3465a5f3afc9a5c243be86b341c099.zip |
fix displaying partitions (mga#18076)
when there's only one disk, just add a dummy disk tab, then remove it.
this fixes the reported crash
Diffstat (limited to 'perl-install/diskdrake/hd_gtk.pm')
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index c08a0928d..a8f4894f3 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -113,6 +113,8 @@ sub main { # ensure partitions bar is properly sized on first display: $notebook_widget->signal_connect(realize => $update_all); $w->sync; + # add a bogus tab so that gtk+ displayed everything when there's only one disk: + $notebook_widget->prepend_page(Gtk3::Label->new, Gtk3::Label->new); $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 : (); @@ -123,6 +125,10 @@ sub main { $update_all->(2); } undef $initializing; + # remove bogus tab we added just to be sure gtk+ displayed everything: + $notebook_widget->remove_page(0); + # restore position when there's several disks: + $notebook_widget->set_current_page(0); $done_button->grab_focus; if (!$::testing) { $in->ask_from_list_(N("Read carefully"), N("Please make a backup of your data first"), |