diff options
-rw-r--r-- | lib/AdminPanel/Module/DisplayManager.pm | 11 | ||||
-rw-r--r-- | lib/AdminPanel/Shared.pm | 21 |
2 files changed, 14 insertions, 18 deletions
diff --git a/lib/AdminPanel/Module/DisplayManager.pm b/lib/AdminPanel/Module/DisplayManager.pm index 3c9a21b4..b877e307 100644 --- a/lib/AdminPanel/Module/DisplayManager.pm +++ b/lib/AdminPanel/Module/DisplayManager.pm @@ -94,6 +94,7 @@ sub _build_desc_for_i18n { my $self = shift(); my @_DESCRIPTIONS_for_i18n = ( + $self->loc->N("LightDM (The Light Display Manager)"), $self->loc->N("GDM (GNOME Display Manager)"), $self->loc->N("KDM (KDE Display Manager)"), $self->loc->N("XDM (X Display Manager)"), @@ -221,6 +222,8 @@ sub _manageProxyDialog { $hbox_content = $factory->createHBox($layout); + my $vbox_spacer = $factory->createVBox($hbox_content); + $factory->createHSpacing($vbox_spacer,2); my $vbox_labels_flags = $factory->createVBox($hbox_content); my $vbox_inputfields = $factory->createVBox($hbox_content); @@ -229,8 +232,12 @@ sub _manageProxyDialog { my $rbbox = $factory->createVBox($rb_group); foreach my $d (@{$self->dmlist()}) { - my $rb = $factory->createRadioButton($factory->createHBox($factory->createLeft($rbbox)), $d->{NAME}); - if($d->{NAME} eq uc($dm_NAME)) + my $rowentry = $factory->createHBox($factory->createLeft($rbbox)); + my $rb = $factory->createRadioButton($rowentry, $d->{NAME}); + $rb->setWeight($yui::YD_HORIZ, 1); + my $desc = $factory->createLabel($rowentry, $self->loc->N($d->{DESCRIPTION})); + $desc->setWeight($yui::YD_HORIZ, 2); + if($d->{PACKAGE} eq lc($dm_NAME)) { $rb->setValue(1); } diff --git a/lib/AdminPanel/Shared.pm b/lib/AdminPanel/Shared.pm index 3165bf04..b6c8fe15 100644 --- a/lib/AdminPanel/Shared.pm +++ b/lib/AdminPanel/Shared.pm @@ -112,7 +112,8 @@ $filename the name of the file to read =head3 OUTPUT -$content the content of the selected text file inside +depending from the context it returns the content +of the file as an array or a string =head3 DESCRIPTION @@ -123,28 +124,16 @@ if it fails #============================================================= -#sub apcat { -# my $fn = shift(); -# my $fh = undef; -# my @content = (); -# open($fh, "<", $fn) || return 0; -# while(<$fh>) -# { -# push(@content,$_); -# } -# return \@content; -#} - sub apcat { my $fn = shift(); my $fh = undef; - my $content = undef; + my @content = (); open($fh, "<", $fn) || return 0; while(<$fh>) { - $content .= $_; + push(@content, $_); } - return $content; + return (wantarray() ? @content : join('',@content)); } |