summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-02 16:56:08 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-02 16:56:08 +0000
commit2451417cf2ceb88fdee1362677f7e1fa4e4fc999 (patch)
treea3462f778123c00d0227f7e9c306ccbb94de8c83
parentb3dbc9fed45193774b3de442649f0afedff971f7 (diff)
downloadmgaonline-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+
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet-extended-maintenance-helper20
2 files changed, 11 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index bc544b7b..1d679c51 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- mdkapplet-extended-maintenance-helper
+ o fix retrieving password with older gtk+
o remember the email when an error occured
Version 2.77.15.7 - 2 February 2010, Thierry Vignaud
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 {