summaryrefslogtreecommitdiffstats
path: root/perl-install/install/share/meta-task/compssUsers.pl
diff options
context:
space:
mode:
authorMageia SVN-Git Migration <svn-git-migration@mageia.org>2011-02-06 22:37:08 +0000
committerMageia SVN-Git Migration <svn-git-migration@mageia.org>2011-02-06 22:37:08 +0000
commitfd8bbba2f02b8bccd69e67c326fd320c0827941d (patch)
treeade69986b2f99e113c95009736399966d4a3d511 /perl-install/install/share/meta-task/compssUsers.pl
parent368f416649ed34557702a946ec8c0cec2fd45294 (diff)
downloaddrakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.gz
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.bz2
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.xz
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.zip
Synthesized commit during git-svn import combining previous Mandriva history with Mageia.
This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r431 | dmorgan | 2011-02-06 01:58:02 +0000 (Sun, 06 Feb 2011) | 1 line Add drakx structure on the SVN ------------------------------------------------------------------------ r432 | dmorgan | 2011-02-06 01:59:38 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned advertising ------------------------------------------------------------------------ r446 | dmorgan | 2011-02-06 22:37:08 +0000 (Sun, 06 Feb 2011) | 1 line Import Clean perl-install ------------------------------------------------------------------------ r448 | dmorgan | 2011-02-06 23:02:36 +0000 (Sun, 06 Feb 2011) | 1 line Add cleaned files ------------------------------------------------------------------------ r449 | dmorgan | 2011-02-06 23:03:52 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned kernel ------------------------------------------------------------------------ r450 | dmorgan | 2011-02-06 23:23:30 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned tools ------------------------------------------------------------------------ r451 | dmorgan | 2011-02-07 00:01:56 +0000 (Mon, 07 Feb 2011) | 1 line Import stage1 ------------------------------------------------------------------------ r473 | dmorgan | 2011-02-07 11:20:50 +0000 (Mon, 07 Feb 2011) | 1 line Import images ------------------------------------------------------------------------ r497 | ennael | 2011-02-09 21:02:06 +0000 (Wed, 09 Feb 2011) | 2 lines readd missing file ------------------------------------------------------------------------ r502 | pterjan | 2011-02-09 23:30:32 +0000 (Wed, 09 Feb 2011) | 1 line Import rescue ------------------------------------------------------------------------ r603 | ennael | 2011-02-24 13:32:54 +0000 (Thu, 24 Feb 2011) | 2 lines import cleaned rescue for Mageia ------------------------------------------------------------------------ r2061 | tv | 2011-10-20 20:32:19 +0100 (Thu, 20 Oct 2011) | 1 line import (cleaned) doc ------------------------------------------------------------------------
Diffstat (limited to 'perl-install/install/share/meta-task/compssUsers.pl')
-rwxr-xr-xperl-install/install/share/meta-task/compssUsers.pl247
1 files changed, 247 insertions, 0 deletions
diff --git a/perl-install/install/share/meta-task/compssUsers.pl b/perl-install/install/share/meta-task/compssUsers.pl
new file mode 100755
index 000000000..f60d37de8
--- /dev/null
+++ b/perl-install/install/share/meta-task/compssUsers.pl
@@ -0,0 +1,247 @@
+package tmp::compssUsers;
+
+use common;
+
+my $low_resources = detect_devices::has_low_resources();
+my $netbook_desktop = detect_devices::is_netbook_nettop();
+my $light_desktop = detect_devices::need_light_desktop();
+my $meta_class = $::o->{meta_class};
+my $powerpack = $meta_class eq 'powerpack';
+my $server = $meta_class eq 'server';
+
+my $h = {
+N_("Workstation") =>
+[
+ { label => N_("Office Workstation"),
+ descr =>
+ N_("Office programs: wordprocessors (OpenOffice.org Writer, Kword), spreadsheets (OpenOffice.org Calc, Kspread), PDF viewers, etc"),
+ flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ],
+ default_selected => 1,
+ },
+ if_(!$server,
+ { label => N_("Game station"),
+ descr => N_("Amusement programs: arcade, boards, strategy, etc"),
+ flags => [ qw(GAMES) ],
+ },
+ { label => N_("Multimedia station"),
+ descr => N_("Sound and video playing/editing programs"),
+ flags => [ qw(AUDIO VIDEO GRAPHICS VIDEO_EDITING) ],
+ default_selected => 1,
+ },
+ ),
+ { label => N_("Internet station"),
+ descr => N_("Set of tools to read and send mail and news (mutt, tin..) and to browse the Web"),
+ flags => [ qw(NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS) ],
+ default_selected => 1,
+ },
+ if_(!$server,
+ { label => N_("Network Computer (client)"),
+ descr => N_("Clients for different protocols including ssh"),
+ flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ],
+ default_selected => $powerpack,
+ },
+ { label => N_("Configuration"),
+ descr => N_("Tools to ease the configuration of your computer"),
+ flags => [ qw(CONFIG) ],
+ default_selected => 1,
+ },
+ { label => N_("Console Tools"),
+ descr => N_("Editors, shells, file tools, terminals"),
+ flags => [ qw(EDITORS TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS) ],
+ default_selected => 1,
+ },
+ { label => N_("Development"),
+ descr => N_("C and C++ development libraries, programs and include files"),
+ flags => [ qw(DEVELOPMENT EDITORS) ],
+ },
+ { label => N_("Documentation"),
+ descr => N_("Books and Howto's on Linux and Free Software"),
+ flags => [ qw(BOOKS) ],
+ default_selected => !$light_desktop,
+ },
+ { label => N_("LSB"),
+ descr => N_("Linux Standard Base. Third party applications support"),
+ flags => [ qw(LSB) ],
+ },
+ ),
+],
+
+N_("Server") =>
+[
+ $server ? (
+ { label => N_("Web Server"),
+ descr => N_("Apache"),
+ flags => [ qw(NETWORKING_WWW_SERVER) ],
+ },
+ { label => N_("Groupware"),
+ descr => N_("Kolab Server"),
+ flags => [ qw(NETWORKING_GROUPWARE_SERVER) ],
+ },
+ { label => N_("Firewall/Router"),
+ descr => N_("Internet gateway"),
+ flags => [ qw(NETWORKING_FIREWALLING_SERVER) ],
+ },
+ { label => N_("Mail/News"),
+ descr => N_("Postfix mail server, Inn news server"),
+ flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ],
+ },
+ { label => N_("Directory Server"),
+ descr => N_("LDAP Server"),
+ flags => [ qw(NETWORKING_LDAP_SERVER) ],
+ },
+ { label => N_("FTP Server"),
+ descr => N_("ProFTPd"),
+ flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ],
+ },
+ { label => N_("DNS/NIS"),
+ descr => N_("Domain Name and Network Information Server"),
+ flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ],
+ },
+ { label => N_("File and Printer Sharing Server"),
+ descr => N_("NFS Server, Samba server"),
+ flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ],
+ },
+ { label => N_("Database"),
+ descr => N_("PostgreSQL and MySQL Database Server"),
+ flags => [ qw(DATABASES DATABASES_SERVER) ],
+ },
+ ) : (
+ { label => N_("Web/FTP"),
+ descr => N_("Apache, Pro-ftpd"),
+ flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ],
+ },
+ { label => N_("Mail"),
+ descr => N_("Postfix mail server"),
+ flags => [ qw(NETWORKING_MAIL_SERVER) ],
+ },
+ { label => N_("Database"),
+ descr => N_("PostgreSQL or MySQL database server"),
+ flags => [ qw(DATABASES DATABASES_SERVER) ],
+ },
+ { label => N_("Firewall/Router"),
+ descr => N_("Internet gateway"),
+ flags => [ qw(NETWORKING_FIREWALLING_SERVER) ],
+ },
+ { label => N_("Network Computer server"),
+ descr => N_("NFS server, SMB server, Proxy server, ssh server"),
+ flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ],
+ },
+ ),
+],
+
+N_("Graphical Environment") =>
+[
+ { label => N_("KDE Workstation"),
+ descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"),
+ flags => [ qw(KDE X ACCESSIBILITY THEMES) ],
+ default_selected => !$light_desktop,
+ },
+ { label => N_("GNOME Workstation"),
+ descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),
+ flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ],
+ default_selected => $netbook_desktop,
+ },
+ { label => N_("LXDE Desktop"),
+ flags => [ qw(LXDE X ACCESSIBILITY) ],
+ descr => N_("A lightweight & fast graphical environment with user-friendly set of applications and desktop tools"),
+ default_selected => $low_resources,
+ },
+ { label => N_("Other Graphical Desktops"),
+ descr => N_("Window Maker, Enlightenment, Fvwm, etc"),
+ flags => [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY E17) ],
+ },
+],
+
+if_($server,
+N_("Development") =>
+[
+ { label => N_("Development"),
+ descr => N_("C and C++ development libraries, programs and include files"),
+ flags => [ qw(DEVELOPMENT EDITORS) ],
+ default_selected => 1,
+ },
+ { label => N_("Documentation"),
+ descr => N_("Books and Howto's on Linux and Free Software"),
+ flags => [ qw(BOOKS) ],
+ },
+ { label => N_("LSB"),
+ descr => N_("Linux Standard Base. Third party applications support"),
+ flags => [ qw(LSB) ],
+ },
+],
+
+N_("Utilities") =>
+[
+ { label => N_("SSH Server"),
+ descr => N_("SSH Server"),
+ flags => [ qw(NETWORKING_REMOTE_ACCESS_SERVER) ],
+ default_selected => 1,
+ },
+ { label => N_("Webmin"),
+ descr => N_("Webmin Remote Configuration Server"),
+ flags => [ qw(WEBMIN) ],
+ default_selected => 1,
+ },
+ { label => N_("Network Utilities/Monitoring"),
+ descr => N_("Monitoring tools, processes accounting, tcpdump, nmap, ..."),
+ flags => [ qw(MONITORING NETWORKING_FILE) ],
+ default_selected => 1,
+ },
+ { label => N_("Mageia Wizards"),
+ descr => N_("Wizards to configure server"),
+ flags => [ qw(WIZARDS) ],
+ default_selected => 1,
+ },
+],
+),
+};
+
+foreach my $path (keys %$h) {
+ foreach (@{$h->{$path}}) {
+ $_->{path} = $path;
+ $_->{uid} = join('|', $path, $_->{label});
+ }
+}
+
+my $compssUsers = [ map { @$_ } values %$h ];
+
+my $gtk_display_compssUsers = sub {
+ my ($entry) = @_;
+
+ require ugtk2;
+ ugtk2->import(qw(:helpers :wrappers :create));
+ require mygtk2;
+ mygtk2->import(qw(gtknew));
+
+ my $entries_in_path = sub {
+ my ($path) = @_;
+ my @items = map { $entry->($_) } @{$h->{$path}};
+
+ # ensure we have an even number of items:
+ if (@items % 2) {
+ my @last_items = (pop @items, gtknew('Label'));
+ # RTL support:
+ @last_items = reverse @last_items if lang::text_direction_rtl();
+ push @items, @last_items;
+ }
+
+ gtknew('Title2', label => mygtk2::asteriskize(translate($path))),
+ gtknew('Table', children => [ group_by2(@items) ], homogeneous => 1),
+ Gtk2::HSeparator->new;
+ };
+
+ gtkpack__(Gtk2::VBox->new,
+ $entries_in_path->('Workstation'),
+ $server ? $entries_in_path->('Server') : (),
+ $server ? (
+ $entries_in_path->('Graphical Environment'),
+ $entries_in_path->('Development'),
+ $entries_in_path->('Utilities'),
+ ) : (
+ $entries_in_path->('Server'),
+ $entries_in_path->('Graphical Environment'),
+ ),
+ );
+};
+
+$compssUsers, $gtk_display_compssUsers;