summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
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
commita5c6b418f71daa1bdeea9bbf424ddecc0a5a8755 (patch)
tree9537566bb8a4d89876121f1bd53643767cf94f24 /perl-install/diskdrake
parentb7acd3ade7d6d0dbde3d53372e86bcb6123bfc89 (diff)
downloaddrakx-backup-do-not-use-a5c6b418f71daa1bdeea9bbf424ddecc0a5a8755.tar
drakx-backup-do-not-use-a5c6b418f71daa1bdeea9bbf424ddecc0a5a8755.tar.gz
drakx-backup-do-not-use-a5c6b418f71daa1bdeea9bbf424ddecc0a5a8755.tar.bz2
drakx-backup-do-not-use-a5c6b418f71daa1bdeea9bbf424ddecc0a5a8755.tar.xz
drakx-backup-do-not-use-a5c6b418f71daa1bdeea9bbf424ddecc0a5a8755.zip
fix UI redraw issue after unlocking dmcrypt partition (mga#5661)
Diffstat (limited to 'perl-install/diskdrake')
-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');
}