summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2001-02-12 00:23:47 +0000
committerDaouda Lo <daouda@mandriva.com>2001-02-12 00:23:47 +0000
commit6597b96fa860eabe73457c1cc21846806fb0939d (patch)
treea65837038afc998a116a040316a8363fb8fff9aa
parentf2a47a29ed5567851d67dd90875c57c7bdfd7f80 (diff)
downloadcontrol-center-6597b96fa860eabe73457c1cc21846806fb0939d.tar
control-center-6597b96fa860eabe73457c1cc21846806fb0939d.tar.gz
control-center-6597b96fa860eabe73457c1cc21846806fb0939d.tar.bz2
control-center-6597b96fa860eabe73457c1cc21846806fb0939d.tar.xz
control-center-6597b96fa860eabe73457c1cc21846806fb0939d.zip
*** empty log message ***
-rwxr-xr-xcontrol-center219
-rwxr-xr-xcontrol-center341
2 files changed, 45 insertions, 15 deletions
diff --git a/control-center2 b/control-center2
index 2470ec92..9e55e108 100755
--- a/control-center2
+++ b/control-center2
@@ -23,6 +23,7 @@
use Gtk;
use Config;
+use POSIX;
init Gtk;
use Data::Dumper;
@@ -121,15 +122,26 @@ while (<VERS>) {
}
@info_tree = split / /, $revtree[0];
+my ($sysname, $nodename, $release, $version, $machine ) = POSIX::uname();
+my $username= POSIX::cuserid();
my $style1 = new Gtk::Style;
$style1->font(Gtk::Gdk::Font->load('-adobe-times-bold-r-normal--14-100-100-100-p-76-iso8859-1'));
+
+my $ld = new Gtk::Label("$username");
+$table_info1->attach($ld, 1, 2, 0, 1, 0, 0, 0, 0);
my $label_user = new Gtk::Label("User: ");
$label_user->set_style($style1);
$label_user->set_justify('right');
$table_info1->attach($label_user, 0, 1, 0, 1, 0, 0, 0, 0);
-my $ld = new Gtk::Label("$info_tree[0] $info_tree[1] $info_tree[3] $info_tree[4] ");
-$table_info1->attach($ld, 1, 2, 1, 2, 0, 0, 0, 0);
+my $ld1 = new Gtk::Label("$info_tree[0] $info_tree[1] $info_tree[3] $info_tree[4] ");
+$table_info1->attach($ld1, 1, 2, 1, 2, 0, 0, 0, 0);
+my $ld2 = new Gtk::Label("$nodename");
+$table_info1->attach($ld2, 1, 2, 2, 3, 0, 0, 0, 0);
+my $ld3 = new Gtk::Label("$release $version");
+$table_info1->attach($ld3, 1, 2, 3, 4, 0, 0, 0, 0);
+my $ld3 = new Gtk::Label("$machine");
+$table_info1->attach($ld3, 1, 2, 4, 5, 0, 0, 0, 0);
my $label_os = new Gtk::Label("System: ");
$label_os->set_style($style1);
$label_os->set_justify('right');
@@ -148,6 +160,7 @@ $vbox_about->set_spacing(30);
$vbox_about->pack_start($table_info1, 0, 0, 0);
$vbox_about->reorder_child($table_info1,150);
+
$notebook_global->append_page($vbox_about, "$arg");
my $vbox_global_left = new Gtk::VBox(0,0);
@@ -209,8 +222,6 @@ $SIG{USR1} = sub { $notebook_global->set_page(0); }; # embedded applications wil
Gtk->main;
-
-
sub draw_icon {
my ($width, $height, $icon_name, $decalage, $exec_string, $name, $number ) = @_;
my %hash;
diff --git a/control-center3 b/control-center3
index cc335a97..846c07c1 100755
--- a/control-center3
+++ b/control-center3
@@ -30,6 +30,7 @@ use Data::Dumper;
my %pixmaps_global;
my $xpm_path="/usr/share/icons/";
+my $xpm_path_l="./pixmaps";
my $tree_depth_max = 1;
my @treeitem_sub;
@@ -48,7 +49,6 @@ $window_global->add($vbox_global);
my @item_factory_entries = (
["/_File", undef, 0, "<Branch>"],
["/File/tearoff1", undef, 0, "<Tearoff>"],
- #["/File/_Quit", "<control>Q", 5],
{
'path' => "/File/_Quit",
'accelerator' => "<control>Q",
@@ -57,7 +57,7 @@ my @item_factory_entries = (
},
["/_Help", undef, 0, "<Branch>"],
["/Help/_Mandrake Control Center", undef, 2],
- ["/Help/_Report Bug", undef, 3 ],
+ ["/Help/_Report Bug", undef, 3 ],
["/Help/_About", undef, 4 ]
);
@@ -98,7 +98,7 @@ $hpane_global->pack2($notebook_global,0,1);
#-------------------------------- splash screeen --------------------------------------------------------
my $hbox1= new Gtk::HBox(0,20);
-my ($pix_about_map, $pix_about_mask) = Gtk::Gdk::Pixmap->create_from_xpm(NULL, Gtk::Widget->get_default_style->bg('normal'), "$xpm_path/logo.xpm");
+my ($pix_about_map, $pix_about_mask) = Gtk::Gdk::Pixmap->create_from_xpm(NULL, Gtk::Widget->get_default_style->bg('normal'), "$xpm_path_l/logo.xpm");
my $pix_about = new Gtk::Pixmap ($pix_about_map, $pix_about_mask);
$pix_about->set_alignment(10,0);
$hbox1->pack_start($pix_about, 0, 1, 0);
@@ -106,7 +106,7 @@ my $style = new Gtk::Style;
$style->font(Gtk::Gdk::Font->load('-adobe-times-bold-r-normal--25-180-100-100-p-132-iso8859-1'));
my $label_about2 = new Gtk::Label ("Mandrake Control Center");
$label_about2->set_alignment(0,0);
-$label_about2->set_style($style);
+ $label_about2->set_style($style);
$hbox1->pack_start($label_about2, 0, 1, 0);
my $vbox_about = new Gtk::VBox(0,10);
$vbox_about->pack_start($hbox1, 0, 1, 0);
@@ -114,8 +114,8 @@ my $label_about3 = new Gtk::Label ("The place where you can configure your Mandr
$vbox_about->pack_start($label_about3, 0, 0, 0);
$table_info1 = new Gtk::Table(6,2,1);
-$table_info1->set_row_spacings(15);
-$table_info1->set_col_spacings(10);
+$table_info1->set_row_spacings(18);
+$table_info1->set_col_spacings(12);
my @revtree;
my @infotree;
@@ -172,7 +172,7 @@ $window_global->realize;
my $tree= new Gtk::Tree;
$vbox_global_left->pack_start($tree,1,1,0);
map {
- create_tree_item($tree,$_->[0], "$xpm_path/$_->[1]",1);
+ create_tree_item($tree, $_->[0] , "$xpm_path_l/$_->[1]",1);
} (['Boot', 'logo.xpm'] , ['Hardware', 'logo.xpm'] , ['User and Groups','logo.xpm'],
['Network & Internet','logo.xpm'] , ['Menu Customization','logo.xpm'] , ['Font Management','logo.xpm']);
@@ -187,8 +187,8 @@ map {
%tree_exec = ("Drakboot" => "drakeboot", "Drakfloppy" => "drakfloppy",
"Drakelogo" => "DrakeLogo" , "xfdrake" => "XFDrake" ,
- "Hardrake" => "harddrake-auth" , "Mousedrake" => "mousedrake" ,
- "Printdrake" => "printerdrake" , "Kbddrake" => "keyboarddrake" ,
+ "Harddrake" => "harddrake-auth" , "Mousedrake" => "mousedrake" ,
+ "Printerdrake" => "printerdrake" , "Kbddrake" => "keyboarddrake" ,
"Userdrake" => "userdrake" , "Draknet" => "draknet" ,
"Drakgw" => "drakgw" , "Menudrake" => "menudrake" , "Drakfont" => "drakfont"
);
@@ -196,7 +196,7 @@ my @pid_launched;
%tree_launched = ("Drakboot" => -1, "Drakfloppy" => -1,
"Drakelogo" => -1 , "xfdrake" => -1 ,
"Hardrake" => -1 , "Mousedrake" => -1 ,
- "Printdrake" => -1 , "Kbddrake" => -1 ,
+ "Printerdrake" => -1 , "Kbddrake" => -1 ,
"Userdrake" => -1 , "Draknet" => -1 ,
"Drakgw" => -1 , "Menudrake" => -1 , "Drakfont" => -1
);
@@ -242,6 +242,23 @@ sub about_mdk_cc()
$window_about->set_modal(1);
}
+sub help_mandrake_cc ()
+{
+ my $docdir="/usr/share/doc";
+ my $browser="netscape";
+
+ system("$browser $_docdir/Drakconf/help.html &");
+
+}
+
+sub bug_report()
+{
+ my $bug_url="https://qa.mandrakesoft.com/dimension";
+ my $browser="netscape";
+ system("$browser $bug_url &");
+
+}
+
sub create_tree_item()
{
my ($parent_tree, $label, $pixmap, $tree_depth_max) =@_;
@@ -289,7 +306,7 @@ sub xpm_label_box
$style = $parent->get_style()->bg( 'normal' );
# Now on to the xpm stuff
- ( $pixmap, $mask ) = Gtk::Gdk::Pixmap->create_from_xpm($parent->window, $style, $xpm_filename );
+ ($pixmap, $mask ) = Gtk::Gdk::Pixmap->create_from_xpm($parent->window, $style, $xpm_filename );
$pixmapwid = new Gtk::Pixmap( $pixmap, $mask );
# Create a label for the button
@@ -341,6 +358,8 @@ sub item_factory_cb {
print "ItemFactory: activated ", $widget->item_factory_path(), " -> ", $action, "\n";
$action == 1 and quit_global();
$action == 4 and about_mdk_cc();
+ $action == 2 and help_mandrake_cc();
+ $action == 3 and bug_report();
}