aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-07-05 12:50:08 +0200
committerAngelo Naselli <anaselli@linux.it>2014-07-05 12:50:08 +0200
commit8bce3d19325a0108e0b801017d48957e0a93080d (patch)
treeb16f5b0491a8a090619514078913eff47a3f507d
parent4040b475c5b825c6ee549c96fab5fbf2b3229817 (diff)
parent50d5baf49c6f4907f8061ac05a43d0fb9d1e2030 (diff)
downloadmanatools-8bce3d19325a0108e0b801017d48957e0a93080d.tar
manatools-8bce3d19325a0108e0b801017d48957e0a93080d.tar.gz
manatools-8bce3d19325a0108e0b801017d48957e0a93080d.tar.bz2
manatools-8bce3d19325a0108e0b801017d48957e0a93080d.tar.xz
manatools-8bce3d19325a0108e0b801017d48957e0a93080d.zip
Merge branch 'master' of ssh://git.mageia.org/software/adminpanel
-rw-r--r--lib/AdminPanel/Module/Proxy.pm70
1 files changed, 70 insertions, 0 deletions
diff --git a/lib/AdminPanel/Module/Proxy.pm b/lib/AdminPanel/Module/Proxy.pm
index afe77361..3a7ea6cc 100644
--- a/lib/AdminPanel/Module/Proxy.pm
+++ b/lib/AdminPanel/Module/Proxy.pm
@@ -99,6 +99,35 @@ sub _SharedUGUIInitialize {
$self->sh_gui( AdminPanel::Shared::GUI->new() );
}
+#=============================================================
+
+=head2 init_proxy
+
+=head3 DESCRIPTION
+
+=over 4
+
+=item This method does initialize the proxy attribute provided by this class.
+
+=item $self->proxy is structured as follows:
+
+=over 6
+
+=item B<no_proxy> the string with the list of the excluded domains/addresses
+
+=item B<http_proxy> the url of the http proxy
+
+=item B<https_proxy> the url of the https proxy
+
+=item B<ftp_proxy> the url for the ftp proxy
+
+=back
+
+=back
+
+=cut
+
+#=============================================================
sub init_proxy {
my %p = (
@@ -140,12 +169,53 @@ sub start {
$self->_manageProxyDialog();
};
+#=============================================================
+
+=head2 ask_for_X_restart
+
+=head3 INPUT
+
+ $self: this object
+
+=head3 DESCRIPTION
+
+ This method shows a message box warning the user
+ that a X server restart is required
+
+=cut
+
+#=============================================================
+
sub ask_for_X_restart {
my $self = shift;
$self->sh_gui->warningMsgBox({title=>$self->loc->N("X Restart Required"),text=>$self->loc->N("You need to log out and back in again for changes to take effect"),richtext=>1});
}
+#=============================================================
+
+=head2 validate
+
+=head3 INPUT
+
+ $self: this object
+
+ $proxy: the hash containing what returns from getVarFromSh
+ eventually modified by the user
+
+=head3 DESCRIPTION
+
+ This method returns true if the each value match
+ certain conditions like the leading http:// for http proxy
+ or https:// for the https proxy, etc.
+
+ $proxy is passed by reference thus $proxy->{no_proxy} value
+ is sanitized (trimmed).
+
+=cut
+
+#=============================================================
+
sub validate {
my $self = shift;
my $proxy = shift;