summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Victor Duarte Martins <jvictor@mandriva.com>2010-05-11 18:36:23 +0000
committerJoão Victor Duarte Martins <jvictor@mandriva.com>2010-05-11 18:36:23 +0000
commitbdd92e35af079e6c815bda1f141bdb4ca7c85bd1 (patch)
treefafa316bca5efec0b78e0de014c120e357e61c32
parentc80165ca8e72479c8f1412012f1d7bfcc3c0c198 (diff)
downloadmgaonline-bdd92e35af079e6c815bda1f141bdb4ca7c85bd1.tar
mgaonline-bdd92e35af079e6c815bda1f141bdb4ca7c85bd1.tar.gz
mgaonline-bdd92e35af079e6c815bda1f141bdb4ca7c85bd1.tar.bz2
mgaonline-bdd92e35af079e6c815bda1f141bdb4ca7c85bd1.tar.xz
mgaonline-bdd92e35af079e6c815bda1f141bdb4ca7c85bd1.zip
Restructure of code identation and declarations for better readability.
-rwxr-xr-xmdkapplet-restricted-helper64
1 files changed, 41 insertions, 23 deletions
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper
index 3a1ab8b5..71085381 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -66,13 +66,14 @@ ugtk2::exit(0);
my $email;
sub get_restricted_authentication() {
- my $w = ugtk2->new(N("Adding an additional package medium"), width => $width + 20);
- my ($password_w, $email_w, $password);
+ my $w = ugtk2->new(N("Adding an additional package medium"),
+ width => $width + 20);
+ my $password_w = gtknew('Entry');
+ my $email_w = gtknew('Entry', text => $email);
+ my $password;
my $clicked;
- $password_w = gtknew('Entry');
$password_w->set_visibility(0);
- $email_w = gtknew('Entry', text => $email);
$w->{ok_clicked} = sub {
$password = $password_w->get_text;
@@ -82,23 +83,36 @@ sub get_restricted_authentication() {
};
my @widgets = (
- get_banner(N("Adding an additional package medium")),
- gtknew('Label_Left', text => N("Please fill in your account ID to add an additional package medium"),
- @common),
- gtknew('HButtonBox', layout => 'start', children_tight => [
- interactive::gtk::add_padding(
- new_link_button('https://my.mandriva.com/info', N("More information on your user account")))
- ]),
- gtknew('Table', col_spacings => 5, row_spacings => 5, children => [
- [ N("Your email"), $email_w ],
- [ N("Your password"), $password_w ],
- ]),
- gtknew('HButtonBox', layout => 'start', children_tight => [
- interactive::gtk::add_padding(
- new_link_button('https://my.mandriva.com/reset/password/', N("Forgotten password")))
- ]),
- create_okcancel($w, N("Next"), N("Cancel")),
- );
+ get_banner(N("Adding an additional package medium")),
+ gtknew('Label_Left',
+ text => N("Please fill in your account ID to add an " .
+ "additional package medium"),
+ @common),
+ gtknew('HButtonBox',
+ layout => 'start',
+ children_tight => [
+ interactive::gtk::add_padding(
+ new_link_button('https://my.mandriva.com/info',
+ N("More information on your user " .
+ "account"))
+ )
+ ]),
+ gtknew('Table',
+ col_spacings => 5,
+ row_spacings => 5,
+ children => [ [ N("Your email"), $email_w ],
+ [ N("Your password"), $password_w ] ]),
+ gtknew('HButtonBox',
+ layout => 'start',
+ children_tight => [
+ interactive::gtk::add_padding(
+ new_link_button('https://my.mandriva.com/reset' .
+ '/password/',
+ N("Forgotten password"))
+ )
+ ]),
+ create_okcancel($w, N("Next"), N("Cancel")),
+ );
fill_n_run_portable_dialog($w, \@widgets);
@@ -106,8 +120,12 @@ sub get_restricted_authentication() {
$clicked = 0;
if ($mail && $password) {
add_restricted_medium($email, $password);
- } else {
- interactive->vnew->ask_warn(N("Error"), N("Password and email cannot be empty."));
+ }
+ else {
+ interactive->vnew->ask_warn(
+ N("Error"),
+ N("Password and email cannot be empty.")
+ );
goto &get_restricted_authentication;
}
}