<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">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-&gt;{meta_class};
my $powerpack = $meta_class eq 'powerpack';
my $server = $meta_class eq 'server';

my $h = {
N_("Workstation") =&gt; 
[
  { label =&gt; N_("Office Workstation"),
    descr =&gt; 
      N_("Office programs: wordprocessors (OpenOffice.org Writer, Kword), spreadsheets (OpenOffice.org Calc, Kspread), PDF viewers, etc"),
    flags =&gt; [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ],
    default_selected =&gt; 1,
  },
  if_(!$server,
  { label =&gt; N_("Game station"),
    descr =&gt; N_("Amusement programs: arcade, boards, strategy, etc"),
    flags =&gt; [ qw(GAMES) ], 
  },
  { label =&gt; N_("Multimedia station"),
    descr =&gt; N_("Sound and video playing/editing programs"),
    flags =&gt; [ qw(AUDIO VIDEO GRAPHICS VIDEO_EDITING) ],
    default_selected =&gt; 1,
  },
  ),
  { label =&gt; N_("Internet station"),
    descr =&gt; N_("Set of tools to read and send mail and news (mutt, tin..) and to browse the Web"),
    flags =&gt; [ qw(NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS) ],
    default_selected =&gt; 1,
  },
  if_(!$server,
  { label =&gt; N_("Network Computer (client)"),
    descr =&gt; N_("Clients for different protocols including ssh"),
    flags =&gt; [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ], 
    default_selected =&gt; $powerpack,
  },
  { label =&gt; N_("Configuration"),
    descr =&gt; N_("Tools to ease the configuration of your computer"),
    flags =&gt; [ qw(CONFIG) ],
    default_selected =&gt; 1,
  },
  { label =&gt; N_("Console Tools"),
    descr =&gt; N_("Editors, shells, file tools, terminals"),
    flags =&gt; [ qw(EDITORS TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS) ],
    default_selected =&gt; 1,
  },
  { label =&gt; N_("Development"),
    descr =&gt; N_("C and C++ development libraries, programs and include files"),
    flags =&gt; [ qw(DEVELOPMENT EDITORS) ],
  },
  { label =&gt; N_("Documentation"),
    descr =&gt; N_("Books and Howto's on Linux and Free Software"),
    flags =&gt; [ qw(BOOKS) ],
    default_selected =&gt; !$light_desktop,
  },
  { label =&gt; N_("LSB"),
    descr =&gt; N_("Linux Standard Base. Third party applications support"),
    flags =&gt; [ qw(LSB) ],
  },
  ),
],

N_("Server") =&gt;
[
  $server ? (
  { label =&gt; N_("Web Server"),
    descr =&gt; N_("Apache"),
    flags =&gt; [ qw(NETWORKING_WWW_SERVER) ],
  },
  { label =&gt; N_("Groupware"),
    descr =&gt; N_("Kolab Server"),
    flags =&gt; [ qw(NETWORKING_GROUPWARE_SERVER) ],
  },
  { label =&gt; N_("Firewall/Router"),
    descr =&gt; N_("Internet gateway"),
    flags =&gt; [ qw(NETWORKING_FIREWALLING_SERVER) ],
  },
  { label =&gt; N_("Mail/News"),
    descr =&gt; N_("Postfix mail server, Inn news server"),
    flags =&gt; [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ],
  },
  { label =&gt; N_("Directory Server"),
    descr =&gt; N_("LDAP Server"),
    flags =&gt; [ qw(NETWORKING_LDAP_SERVER) ],
  },
  { label =&gt; N_("FTP Server"),
    descr =&gt; N_("ProFTPd"),
    flags =&gt; [ qw(NETWORKING_FILE_TRANSFER_SERVER) ],
  },
  { label =&gt; N_("DNS/NIS"),
    descr =&gt; N_("Domain Name and Network Information Server"),
    flags =&gt; [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ],
  },
  { label =&gt; N_("File and Printer Sharing Server"),
    descr =&gt; N_("NFS Server, Samba server"),
    flags =&gt; [ qw(NETWORKING_FILE_SERVER PRINTER) ],
  },
  { label =&gt; N_("Database"),
    descr =&gt; N_("PostgreSQL and MySQL Database Server"),
    flags =&gt; [ qw(DATABASES DATABASES_SERVER) ],
  },
  ) : (
  { label =&gt; N_("Web/FTP"),
    descr =&gt; N_("Apache, Pro-ftpd"),
    flags =&gt; [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ],
  },
  { label =&gt; N_("Mail"),
    descr =&gt; N_("Postfix mail server"),
    flags =&gt; [ qw(NETWORKING_MAIL_SERVER) ],
  },
  { label =&gt; N_("Database"),
    descr =&gt; N_("PostgreSQL or MySQL database server"),
    flags =&gt; [ qw(DATABASES DATABASES_SERVER) ],
  },
  { label =&gt; N_("Firewall/Router"),
    descr =&gt; N_("Internet gateway"),
    flags =&gt; [ qw(NETWORKING_FIREWALLING_SERVER) ],
  },
  { label =&gt; N_("Network Computer server"),
    descr =&gt; N_("NFS server, SMB server, Proxy server, ssh server"),
    flags =&gt; [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ],
  },
  ),
],

N_("Graphical Environment") =&gt; 
[
  { label =&gt; N_("KDE Workstation"),
    descr =&gt; N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"),
    flags =&gt; [ qw(KDE X ACCESSIBILITY THEMES) ],
    default_selected =&gt; !$light_desktop,
  },
  { label =&gt; N_("GNOME Workstation"),
    descr =&gt; N_("A graphical environment with user-friendly set of applications and desktop tools"),
    flags =&gt; [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ],
    default_selected =&gt; $netbook_desktop,
  },
  { label =&gt; N_("LXDE Desktop"),
    flags =&gt; [ qw(LXDE X ACCESSIBILITY) ], 
    descr =&gt; N_("A lightweight &amp; fast graphical environment with user-friendly set of applications and desktop tools"),
    default_selected =&gt; $low_resources,
  },
  { label =&gt; N_("Other Graphical Desktops"),
    descr =&gt; N_("Window Maker, Enlightenment, Fvwm, etc"),
    flags =&gt; [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY E17) ], 
  },
],

if_($server,
N_("Development") =&gt;
[ 
  { label =&gt; N_("Development"),
    descr =&gt; N_("C and C++ development libraries, programs and include files"),
    flags =&gt; [ qw(DEVELOPMENT EDITORS) ],
    default_selected =&gt; 1,
  },
  { label =&gt; N_("Documentation"),
    descr =&gt; N_("Books and Howto's on Linux and Free Software"),
    flags =&gt; [ qw(BOOKS) ],
  },
  { label =&gt; N_("LSB"),
    descr =&gt; N_("Linux Standard Base. Third party applications support"),
    flags =&gt; [ qw(LSB) ],
  },
],

N_("Utilities") =&gt;
[
  { label =&gt; N_("SSH Server"),
    descr =&gt; N_("SSH Server"),
    flags =&gt; [ qw(NETWORKING_REMOTE_ACCESS_SERVER) ],
    default_selected =&gt; 1,
  },
  { label =&gt; N_("Webmin"),
    descr =&gt; N_("Webmin Remote Configuration Server"),
    flags =&gt; [ qw(WEBMIN) ],
    default_selected =&gt; 1,
  },
  { label =&gt; N_("Network Utilities/Monitoring"),
    descr =&gt; N_("Monitoring tools, processes accounting, tcpdump, nmap, ..."),
    flags =&gt; [ qw(MONITORING NETWORKING_FILE) ],
    default_selected =&gt; 1,
  },
  { label =&gt; N_("Mandriva Wizards"),
    descr =&gt; N_("Wizards to configure server"),
    flags =&gt; [ qw(WIZARDS) ],
    default_selected =&gt; 1,
  },
],
),
};

foreach my $path (keys %$h) {
    foreach (@{$h-&gt;{$path}}) {
	$_-&gt;{path} = $path;
	$_-&gt;{uid} = join('|', $path, $_-&gt;{label});
    }
}

my $compssUsers = [ map { @$_ } values %$h ];

my $gtk_display_compssUsers = sub {
    my ($entry) = @_;

    require ugtk2;
    ugtk2-&gt;import(qw(:helpers :wrappers :create));
    require mygtk2;
    mygtk2-&gt;import(qw(gtknew));

    my $entries_in_path = sub {
	my ($path) = @_;
        my @items = map { $entry-&gt;($_) } @{$h-&gt;{$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 =&gt; mygtk2::asteriskize(translate($path))),
          gtknew('Table', children =&gt; [ group_by2(@items) ], homogeneous =&gt; 1),
            Gtk2::HSeparator-&gt;new;
    };

    gtkpack__(Gtk2::VBox-&gt;new,
				    $entries_in_path-&gt;('Workstation'),
				    $server ? $entries_in_path-&gt;('Server') : (),
				    $server ? (
				      $entries_in_path-&gt;('Graphical Environment'),
				      $entries_in_path-&gt;('Development'),
				      $entries_in_path-&gt;('Utilities'),
				    ) : (
				      $entries_in_path-&gt;('Server'),
				      $entries_in_path-&gt;('Graphical Environment'),
                                    ),
	    );
};

$compssUsers, $gtk_display_compssUsers;
</pre></body></html>