From a5c6b418f71daa1bdeea9bbf424ddecc0a5a8755 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 21 Apr 2013 00:46:11 +0000 Subject: fix UI redraw issue after unlocking dmcrypt partition (mga#5661) --- perl-install/NEWS | 1 + perl-install/diskdrake/hd_gtk.pm | 18 ++++++++++++++---- perl-install/install/NEWS | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index e375b4d08..6740e7e60 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,5 +1,6 @@ - partionning (mga#5661): o ensure LVMs on top of dmcrypt are activated after unlocking + o fix UI redraw issue after unlocking dmcrypt partition Version 15.41 - 21 April 2013 diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 0dbcbe8a3..80536b24f 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -97,8 +97,9 @@ sub main { current_entry_changed($current_kind, $current_entry); $lock = 0; if ($o_refresh_gui) { + my $new_page = $o_refresh_gui > 1 ? $notebook_widget->get_current_page() : 0; $notebook_widget->set_current_page(-1); - $notebook_widget->set_current_page(0); + $notebook_widget->set_current_page($new_page); } }; create_automatic_notebooks($notebook_widget); @@ -128,17 +129,26 @@ sub try { sub try_ { my ($name, $f, @args) = @_; + my $dm_active_before = ($current_entry && $current_entry->{dm_active} && $current_entry->{dm_name}); my $v = eval { $f->($in, @args, $all_hds) }; if (my $err = $@) { $in->ask_warn(N("Error"), formatError($err)); } + my $refresh = 0; if ($v eq 'force_reload') { $all_hds = $do_force_reload->(); - $update_all->(1); + $refresh = 1; } - $current_entry = '' if !diskdrake::interactive::is_part_existing($current_entry, $all_hds); - $update_all->(); + if (!diskdrake::interactive::is_part_existing($current_entry, $all_hds)) { + $current_entry = '' ; + } elsif (!$dm_active_before && $current_entry->{dm_active} && $current_entry->{dm_name}) { + if (my $mapped_part = fs::get::device2part("mapper/$current_entry->{dm_name}", $all_hds->{dmcrypts})) { + $current_entry = $mapped_part; + $refresh = 2; + } + } + $update_all->($refresh); Gtk2->main_quit if $v && member($name, 'Done'); } diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 13572e65d..904d38002 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,6 @@ - partionning (mga#5661): o ensure LVMs on top of dmcrypt are activated after unlocking + o fix UI redraw issue after unlocking dmcrypt partition Version 15.41 - 21 April 2013 -- cgit v1.2.1