summaryrefslogtreecommitdiffstats
path: root/perl-install/share
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-01 02:12:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-01 02:12:39 +0000
commit81383de4d1afc568825275d548bfe524278f1ee2 (patch)
tree0663762dea1d538507a6cc31101c7e42d01dbd01 /perl-install/share
parent6e7e1f7edf04617c2024a4eb912706c5c68ab2fc (diff)
downloaddrakx-81383de4d1afc568825275d548bfe524278f1ee2.tar
drakx-81383de4d1afc568825275d548bfe524278f1ee2.tar.gz
drakx-81383de4d1afc568825275d548bfe524278f1ee2.tar.bz2
drakx-81383de4d1afc568825275d548bfe524278f1ee2.tar.xz
drakx-81383de4d1afc568825275d548bfe524278f1ee2.zip
dynamically choose the compssUsers based on meta_class, so now we have only one compssUsers.pl
Diffstat (limited to 'perl-install/share')
-rw-r--r--perl-install/share/compssUsers-discovery.pl51
-rw-r--r--perl-install/share/compssUsers-powerpack.pl133
-rw-r--r--perl-install/share/compssUsers-powerpackplus.pl153
-rw-r--r--perl-install/share/compssUsers.pl124
4 files changed, 119 insertions, 342 deletions
diff --git a/perl-install/share/compssUsers-discovery.pl b/perl-install/share/compssUsers-discovery.pl
deleted file mode 100644
index c234f93a9..000000000
--- a/perl-install/share/compssUsers-discovery.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-package tmp::compssUsers;
-
-use common;
-use ugtk2 qw(:helpers :wrappers :create);
-
-my $h = {
-
-("Discovery") =>
-[
- { label => ("Discovery"),
- descr => (""),
- flags => [ qw(OFFICE SPELLCHECK PUBLISHING PIM ARCHIVING PRINTER AUDIO VIDEO GRAPHICS NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS CONFIG TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS KDE X BOOKS) ],
- 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) = @_;
-
- my $entries_in_path = sub {
- my ($path) = @_;
- translate($path), map { $entry->($_) } @{$h->{$path}};
- };
-
- gtkpack_(Gtk2::VBox->new(0, 0),
- 1, gtkpack_(Gtk2::HBox->new(0, 0),
- 1, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Workstation'),
- '',
- $entries_in_path->('Development'),
- ),
- 0, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Server'),
- '',
- $entries_in_path->('Graphical Environment'),
- ),
- ),
- );
-};
-
-$compssUsers, $gtk_display_compssUsers;
diff --git a/perl-install/share/compssUsers-powerpack.pl b/perl-install/share/compssUsers-powerpack.pl
deleted file mode 100644
index c5afe3cb8..000000000
--- a/perl-install/share/compssUsers-powerpack.pl
+++ /dev/null
@@ -1,133 +0,0 @@
-package tmp::compssUsers;
-
-use common;
-use ugtk2 qw(:helpers :wrappers :create);
-
-my $h = {
-
-N_("Workstation") =>
-[
- { label => N_("Office Workstation"),
- descr => N_("Office programs: wordprocessors (kword, abiword), spreadsheets (kspread, gnumeric), pdf viewers, etc"),
- flags => [ qw(OFFICE SPELLCHECK PUBLISHING PIM ARCHIVING PRINTER) ],
- default_selected => 1,
- },
- { 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) ],
- 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,
- },
- { label => N_("Network Computer (client)"),
- descr => N_("Clients for different protocols including ssh"),
- flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ],
- default_selected => 1,
- },
- { 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) ],
- default_selected => 1,
- },
- { label => N_("Documentation"),
- descr => N_("Books and Howto's on Linux and Free Software"),
- flags => [ qw(BOOKS) ],
- default_selected => 1,
- },
- { label => N_("LSB"),
- descr => N_("Linux Standard Base. Third party applications support"),
- flags => [ qw(LSB) ],
- },
-],
-
-N_("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) ],
- default_selected => 1,
- },
- { label => N_("GNOME Workstation"),
- descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),
- flags => [ qw(GNOME X ACCESSIBILITY) ],
- },
- { label => N_("Other Graphical Desktops"),
- descr => N_("Icewm, Window Maker, Enlightenment, Fvwm, etc"),
- flags => [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY) ],
- },
-],
-};
-
-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) = @_;
-
- my $entries_in_path = sub {
- my ($path) = @_;
- translate($path), map { $entry->($_) } @{$h->{$path}};
- };
-
- gtkpack_(Gtk2::VBox->new(0, 0),
- 1, gtkpack_(Gtk2::HBox->new(0, 0),
- 1, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Workstation'),
- ),
- 0, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Server'),
- '',
- $entries_in_path->('Graphical Environment'),
- ),
- ),
- );
-};
-
-$compssUsers, $gtk_display_compssUsers;
diff --git a/perl-install/share/compssUsers-powerpackplus.pl b/perl-install/share/compssUsers-powerpackplus.pl
deleted file mode 100644
index b168cca26..000000000
--- a/perl-install/share/compssUsers-powerpackplus.pl
+++ /dev/null
@@ -1,153 +0,0 @@
-package tmp::compssUsers;
-
-use common;
-use ugtk2 qw(:helpers :wrappers :create);
-
-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 PUBLISHING PIM ARCHIVING PRINTER) ],
- 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,
- },
-],
-
-N_("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) ],
- },
-],
-
-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) ],
- default_selected => 1,
- },
- { label => N_("GNOME Workstation"),
- descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),
- flags => [ qw(GNOME X ACCESSIBILITY) ],
- },
- { label => N_("Other Graphical Desktops"),
- descr => N_("Icewm, Window Maker, Enlightenment, Fvwm, etc"),
- flags => [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY) ],
- },
-],
-
-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_("MandrakeSoft 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) = @_;
-
- my $entries_in_path = sub {
- my ($path) = @_;
- translate($path), map { $entry->($_) } @{$h->{$path}};
- };
-
- gtkpack_(Gtk2::VBox->new(0, 0),
- 1, gtkpack_(Gtk2::HBox->new(0, 0),
- 1, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Workstation'),
- $entries_in_path->('Server'),
- ),
- 0, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Graphical Environment'),
- $entries_in_path->('Development'),
- $entries_in_path->('Utilities'),
- ),
- ),
- );
-};
-
-$compssUsers, $gtk_display_compssUsers;
diff --git a/perl-install/share/compssUsers.pl b/perl-install/share/compssUsers.pl
index f8dce9680..1e1b84b94 100644
--- a/perl-install/share/compssUsers.pl
+++ b/perl-install/share/compssUsers.pl
@@ -3,15 +3,33 @@ package tmp::compssUsers;
use common;
use ugtk2 qw(:helpers :wrappers :create);
+my $meta_class = $::o->{meta_class};
+my $desktop = $meta_class eq 'desktop';
+my $powerpack = $meta_class eq 'powerpack';
+my $server = $meta_class eq 'server';
+
my $h = {
+$desktop ? (
+("Discovery") =>
+[
+ { label => ("Discovery"),
+ descr => (""),
+ flags => [ qw(OFFICE SPELLCHECK PUBLISHING PIM ARCHIVING PRINTER AUDIO VIDEO GRAPHICS NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS CONFIG TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS KDE X BOOKS) ],
+ default_selected => 1,
+ },
+],
+) : (
N_("Workstation") =>
[
{ label => N_("Office Workstation"),
- descr => N_("Office programs: wordprocessors (kword, abiword), spreadsheets (kspread, gnumeric), pdf viewers, etc"),
+ descr => $server
+ ? N_("Office programs: wordprocessors (OpenOffice.org Writer, Kword), spreadsheets (OpenOffice.org Calc, Kspread), PDF viewers, etc")
+ : N_("Office programs: wordprocessors (kword, abiword), spreadsheets (kspread, gnumeric), pdf viewers, etc"),
flags => [ qw(OFFICE SPELLCHECK PUBLISHING PIM ARCHIVING PRINTER) ],
default_selected => 1,
},
+ if_(!$server,
{ label => N_("Game station"),
descr => N_("Amusement programs: arcade, boards, strategy, etc"),
flags => [ qw(GAMES) ],
@@ -21,14 +39,17 @@ N_("Workstation") =>
flags => [ qw(AUDIO VIDEO GRAPHICS) ],
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"),
@@ -43,19 +64,60 @@ N_("Workstation") =>
{ label => N_("Development"),
descr => N_("C and C++ development libraries, programs and include files"),
flags => [ qw(DEVELOPMENT EDITORS) ],
+ default_selected => $powerpack,
},
{ label => N_("Documentation"),
descr => N_("Books and Howto's on Linux and Free Software"),
flags => [ qw(BOOKS) ],
+ default_selected => $powerpack,
},
{ 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) ],
@@ -76,6 +138,7 @@ N_("Server") =>
descr => N_("NFS server, SMB server, Proxy server, ssh server"),
flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ],
},
+ ),
],
N_("Graphical Environment") =>
@@ -94,6 +157,50 @@ N_("Graphical Environment") =>
flags => [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY) ],
},
],
+
+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_("MandrakeSoft Wizards"),
+ descr => N_("Wizards to configure server"),
+ flags => [ qw(WIZARDS) ],
+ default_selected => 1,
+ },
+],
+),
+),
};
foreach my $path (keys %$h) {
@@ -117,11 +224,18 @@ my $gtk_display_compssUsers = sub {
1, gtkpack_(Gtk2::HBox->new(0, 0),
1, gtkpack(Gtk2::VBox->new(0, 0),
$entries_in_path->('Workstation'),
+ $server ? $entries_in_path->('Server') : (),
),
- 0, gtkpack(Gtk2::VBox->new(0, 0),
- $entries_in_path->('Server'),
- '',
- $entries_in_path->('Graphical Environment'),
+ 0, gtkpack(Gtk2::VBox->new(0, 0),
+ $server ? (
+ $entries_in_path->('Graphical Environment'),
+ $entries_in_path->('Development'),
+ $entries_in_path->('Utilities'),
+ ) : (
+ $entries_in_path->('Server'),
+ '',
+ $entries_in_path->('Graphical Environment'),
+ ),
),
),
);