summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake/hd_gtk.pm
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-04-21 00:46:11 +0000
committerColin Guthrie <colin@mageia.org>2013-04-21 00:46:11 +0000
commit992c3f6099060aedacb95dc430beee73918d504a (patch)
tree9537566bb8a4d89876121f1bd53643767cf94f24 /perl-install/diskdrake/hd_gtk.pm
parent4974a4e759e2672b058d2c506b0f45d15ff762ee (diff)
downloaddrakx-992c3f6099060aedacb95dc430beee73918d504a.tar
drakx-992c3f6099060aedacb95dc430beee73918d504a.tar.gz
drakx-992c3f6099060aedacb95dc430beee73918d504a.tar.bz2
drakx-992c3f6099060aedacb95dc430beee73918d504a.tar.xz
drakx-992c3f6099060aedacb95dc430beee73918d504a.zip
fix UI redraw issue after unlocking dmcrypt partition (mga#5661)
Diffstat (limited to 'perl-install/diskdrake/hd_gtk.pm')
-rw-r--r--perl-install/diskdrake/hd_gtk.pm18
1 files changed, 14 insertions, 4 deletions
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');
}