summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-04-01 10:21:50 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-04-01 10:30:51 +0200
commite44a107c6d3465a5f3afc9a5c243be86b341c099 (patch)
tree21ebd223c70f0b9c5dd18247462f37bb6ffa9ea3
parentbeb610d87e04f2a6e0dd10b43bd417480668ddc1 (diff)
downloaddrakx-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
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/diskdrake/hd_gtk.pm6
-rw-r--r--perl-install/install/NEWS2
3 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 44f0965b7..64ba4ae84 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,7 @@
- diskdrake:
o fix detecting nvme devices as block devices
+ o fix displaying partitions when there's only one disk
+ (and the resulting crash: mga#18076)
Version 17.24 - 23 March 2016
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"),
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index a7fe89715..cbd04bd69 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,7 @@
- partionning:
o fix detecting nvme devices as block devices
+ o fix displaying partitions when there's only one disk
+ (and the resulting crash: mga#18076)
Version 17.24 - 23 March 2016