summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2001-04-06 00:09:10 +0000
committerDaouda Lo <daouda@mandriva.com>2001-04-06 00:09:10 +0000
commite9f208ef93e5549ebba26213ab240a90a6ace851 (patch)
tree1c81d38dffb6224eac1b2e6c74e8dd920f100796
parentde2e51eb6c8c3bd7bb1045bbe5922746ae4d9075 (diff)
downloadcontrol-center-e9f208ef93e5549ebba26213ab240a90a6ace851.tar
control-center-e9f208ef93e5549ebba26213ab240a90a6ace851.tar.gz
control-center-e9f208ef93e5549ebba26213ab240a90a6ace851.tar.bz2
control-center-e9f208ef93e5549ebba26213ab240a90a6ace851.tar.xz
control-center-e9f208ef93e5549ebba26213ab240a90a6ace851.zip
add MandrakeCampus and MandrakeExpert entry to DrakConf .
-rwxr-xr-xcontrol-center36
1 files changed, 25 insertions, 11 deletions
diff --git a/control-center b/control-center
index 4451ff9c..a231f7ee 100755
--- a/control-center
+++ b/control-center
@@ -81,6 +81,9 @@ my @item_factory_entries = (
[_("/Help/_Mandrake Control Center"), undef, 2],
[_("/Help/_Report Bug"), undef, 3 ],
[_("/Help/_About..."), undef, 4 ],
+ [_("/_MandrakePlus"), undef , 0, "<Branch>"],
+ [_("/MandrakePlus/_MandrakeCampus"), undef, 5],
+ [_("/MandrakePlus/_MandrakeExpert"), undef, 6],
);
my $accel_group = new Gtk::AccelGroup;
@@ -153,7 +156,7 @@ map {
my %tree_exec = (_("Boot Disk") => "$_xbindir/drakfloppy", _("Boot Config") => "$_sbindir/drakboot",
_("Display") => "$_sbindir/XFdrake" ,
_("Hardware") => "$_bindir/harddrake-auth" , _("Mouse") => "$_sbindir/mousedrake" ,
- _("Printer") => "$_sbindir/printerdrake" , _("Keyboard") => "$_sbindir/keyboarddrake" ,
+ _("Printer") => "$_bindir/kups" , _("Keyboard") => "$_sbindir/keyboarddrake" ,
# _("Users Config") => "$_bindir/userdrake" ,
_("Connection") => "$_sbindir/draknet" ,
_("Connection Sharing") => "$_sbindir/drakgw" ,
@@ -291,12 +294,22 @@ sub splash_warning {
sub connect_to_site {
my ($link,$help)=@_;
- if($help) {
- my $browser=$ENV{'BROWSER'};
+ my $browser=$ENV{'BROWSER'};
+ my $initial_user=$ENV{'INITIAL_USER'};
+ my $user_current=$ENV{'USER'};
+ if ($help)
+ {
system("$browser -geometry 600x800+10+10 $link&");
- } else
+ }
+ else
{
- splash_warning(_("\nIf you want to report bug please connect as normal user to \n \nhttps://qa.mandrakesoft.com and fill a bug report\n\n"));
+ if($initial_user ne "root")
+ {
+ system("su -m -l $initial_user -c \"$browser $link&\"");
+ }
+ else {
+ splash_warning(_("Security Warning: I'm not allowed to connect to the internet as root user"));
+ }
}
}
@@ -319,14 +332,14 @@ sub connect_to_site {
# $n;
# } else {
# return if ref $c->parent ne 'Gtk::Tree';
-# &$down($c->parent);
+# &$down($c->parent);
# }
-# };
+# };
# my $up = sub {
# my ($c) = @_;
# if (my $n = &$next_child($c, -1)) {
# $n = ($n->subtree->children)[-1] while ref $n eq "Gtk::TreeItem" && $n->subtree && $n->expanded;
-# $n;
+# $n;
# } else {
# return if ref $c->parent ne 'Gtk::Tree';
# &$left($c);
@@ -336,7 +349,7 @@ sub connect_to_site {
my $treeitem_old;
sub create_tree_item {
my ($parent_tree, $label, $pixmap, $tree_depth_max) =@_;
-
+
my $expanded=0;
my ($treeitem, $treebox, $new_subtree);
$treeitem = new Gtk::TreeItem();
@@ -495,12 +508,13 @@ print "$pid_launched[$nb_pages]\n";
sub item_factory_cb {
my ($widget, $action, @data) = @_;
- print "ItemFactory: activated ", $widget->item_factory_path(), " -> ", $action, "\n";
+# print "ItemFactory: activated ", $widget->item_factory_path(), " -> ", $action, "\n";
$action == 1 and quit_global();
$action == 4 and about_mdk_cc();
$action == 2 and connect_to_site("$_docdir/DrakConf/DrakeConf.html",1);
$action == 3 and connect_to_site("https://qa.mandrakesoft.com",0);
-
+ $action == 5 and connect_to_site("http://www.mandrakecampus.com",0);
+ $action == 6 and connect_to_site("http://www.mandrakeexpert.com",0);
}
sub create_item_factory {