Le mardi 6 novembre 2012 13:16:20 Guillaume Rousse a écrit : > Le 06/11/2012 12:09, r...@mageia.org a écrit : > > Revision > > > > 6416 > > > > Author > > > > tuxta > > > > Date > > > > 2012-11-06 12:09:51 +0100 (Tue, 06 Nov 2012) > > > > Log Message > > > > Initial commit of Admin Panel. > > Has basic functionality that you might expect from the core program, > > escalates priviledges, loads categories and modules dynamically from > > configuration file, launches modules and returns to the panel once the > > module has completed. Works within ncurses, gtk and qt environments using > > the native widget set.> > > Added Paths > > > > * AdminPanel/trunk/ > > * AdminPanel/trunk/Auth.pm <#AdminPaneltrunkAuthpm> > > * AdminPanel/trunk/Category.pm <#AdminPaneltrunkCategorypm> > > * AdminPanel/trunk/ConfigReader.pm <#AdminPaneltrunkConfigReaderpm> > > * AdminPanel/trunk/MainDisplay.pm <#AdminPaneltrunkMainDisplaypm> > > * AdminPanel/trunk/Module.pm <#AdminPaneltrunkModulepm> > > * AdminPanel/trunk/SettingsReader.pm <#AdminPaneltrunkSettingsReaderpm> > > * AdminPanel/trunk/apanel.pl <#AdminPaneltrunkapanelpl> > > * AdminPanel/trunk/categories.conf <#AdminPaneltrunkcategoriesconf> > > * AdminPanel/trunk/extras/ > > * AdminPanel/trunk/extras/README <#AdminPaneltrunkextrasREADME> > > * AdminPanel/trunk/extras/org.freedesktop.policykit.pkexec.policy > > > > <#AdminPaneltrunkextrasorgfreedesktoppolicykitpkexecpolicy> > > > > * AdminPanel/trunk/images/ > > * AdminPanel/trunk/images/logo_mageia.png > > > > <#AdminPaneltrunkimageslogo_mageiapng> > > > > * AdminPanel/trunk/images/mageia.png <#AdminPaneltrunkimagesmageiapng> > > * AdminPanel/trunk/images/quit.png <#AdminPaneltrunkimagesquitpng> > > * AdminPanel/trunk/modules/ > > * AdminPanel/trunk/modules/test.cpp <#AdminPaneltrunkmodulestestcpp> > > * AdminPanel/trunk/settings.conf <#AdminPaneltrunksettingsconf> > > > > Added: AdminPanel/trunk/Auth.pm > > =================================================================== > > --- AdminPanel/trunk/Auth.pm (rev 0) > > +++ AdminPanel/trunk/Auth.pm 2012-11-06 11:09:51 UTC (rev 6416) > > @@ -0,0 +1,50 @@ > > +# Copyright 2012 Matteo Pasotti > > +# > > +# This file is part of mcc2 > > +# > > +# mcc2 is free software: you can redistribute it and/or modify > > +# it under the terms of the GNU General Public License as published by > > +# the Free Software Foundation, either version 2 of the License, or > > +# (at your option) any later version. > > +# > > +# mcc2 is distributed in the hope that it will be useful, > > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > +# GNU General Public License for more details. > > +# > > +# You should have received a copy of the GNU General Public License > > +# along with mcc2. If not, see <http://www.gnu.org/licenses/>. > > I'm not convinced of the interest of repeating license and copyright > information in every single file, whereas a single top-level README file > would be enough.
Because in normal code we had header in top of code files :) > > +sub require_root_capability { > > + return 0 if(!$>); > > + return 1; > > +} > > Perl best practice: use english name for magic variables, for readability: why rewrite this function ? this exist in common.pm already