diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-02-02 16:56:08 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-02-02 16:56:08 +0000 |
commit | 2451417cf2ceb88fdee1362677f7e1fa4e4fc999 (patch) | |
tree | a3462f778123c00d0227f7e9c306ccbb94de8c83 /mdkapplet-extended-maintenance-helper | |
parent | b3dbc9fed45193774b3de442649f0afedff971f7 (diff) | |
download | mgaonline-2451417cf2ceb88fdee1362677f7e1fa4e4fc999.tar mgaonline-2451417cf2ceb88fdee1362677f7e1fa4e4fc999.tar.gz mgaonline-2451417cf2ceb88fdee1362677f7e1fa4e4fc999.tar.bz2 mgaonline-2451417cf2ceb88fdee1362677f7e1fa4e4fc999.tar.xz mgaonline-2451417cf2ceb88fdee1362677f7e1fa4e4fc999.zip |
(get_extmaint_authentication) simplify password retrieval and make it
works with both older and current gtk+
Diffstat (limited to 'mdkapplet-extended-maintenance-helper')
-rwxr-xr-x | mdkapplet-extended-maintenance-helper | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mdkapplet-extended-maintenance-helper b/mdkapplet-extended-maintenance-helper index d2e638d0..933ce3fa 100755 --- a/mdkapplet-extended-maintenance-helper +++ b/mdkapplet-extended-maintenance-helper @@ -79,12 +79,6 @@ sub get_extmaint_authentication() { $password_w = gtknew('Entry'); $password_w->set_visibility(0); - # when not embedded: - my $password_restrieved; - $w->{real_window}->signal_connect(destroy => sub { - $password = $password_w->get_text; - $password_restrieved = 1; - }); my ($url, $extended_maintenance_end, $desktop_update_end, $basic_update_end) = eval { get_extended_maintenance_data() }; @@ -94,6 +88,11 @@ sub get_extmaint_authentication() { return; } + $w->{ok_clicked} = sub { + $password = $password_w->get_text; + Gtk2->main_quit; + }; + my @widgets = ( if_(!$::isEmbedded, get_banner(N("Extended Maintenance")), @@ -128,12 +127,13 @@ sub get_extmaint_authentication() { ]), create_okcancel($w, N("Next"), N("Cancel")), ); - my $res = fill_n_run_portable_dialog($w, \@widgets); + + fill_n_run_portable_dialog($w, \@widgets); $email = $email_w->get_text; - # when embedded: - $password = $password_w->get_text if !$password_restrieved; - if ($res) { + + # means OK handler got run: + if ($password) { if ($email && $password) { add_extmaint_medium($email, $password); } else { |