summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center270
1 files changed, 39 insertions, 31 deletions
diff --git a/control-center2 b/control-center2
index a50f64ac..39b8cad6 100755
--- a/control-center2
+++ b/control-center2
@@ -1,8 +1,10 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
# Control-center
-# Copyright (C) 1999 MandrakeSoft (damien@mandrakesoft.com)
+# Copyright (C) 1999 MandrakeSoft
+# Damien Krotkine (damien@mandrakesoft.com)
+# Daouda Lo (daouda@mandrakesoft.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,6 +22,8 @@
use Gtk;
+use Config;
+
init Gtk;
use Data::Dumper;
@@ -30,7 +34,7 @@ my $window_global = new Gtk::Window -toplevel;
$window_global->set_usize(640, 480);
$window_global->signal_connect ( delete_event => sub { Gtk->exit(0); });
$window_global->set_position(1);
-$window_global->set_title("Control Center");
+$window_global->set_title("Mandrake Control Center");
$window_global->border_width(0);
$vbox_global = new Gtk::VBox(0, 0);
@@ -40,32 +44,18 @@ $window_global->add($vbox_global);
my @item_factory_entries = (
["/_File", undef, 0, "<Branch>"],
["/File/tearoff1", undef, 0, "<Tearoff>"],
- ["/File/_New", "<control>N", 1],
- ["/File/_Open", "<control>O", 2],
- ["/File/_Save", "<control>S", 3],
- ["/File/Save _As...", undef, 4],
- ["/File/sep1", undef, 0, "<Separator>"],
#["/File/_Quit", "<control>Q", 5],
{
'path' => "/File/_Quit",
'accelerator' => "<control>Q",
- 'action' => 5,
+ 'action' => 1,
'type' => '<Item>'
},
-
- ["/_Preferences", undef, 0, "<Branch>"],
- ["/_Preferences/_Color", undef, 0, "<Branch>"],
- ["/_Preferences/Color/_Red", undef, 10, "<RadioItem>"],
- ["/_Preferences/Color/_Green", undef, 11, "<RadioItem>"],
- ["/_Preferences/Color/_Blue", undef, 12, "<RadioItem>"],
- ["/_Preferences/_Shape", undef, 0, "<Branch>"],
- ["/_Preferences/Shape/_Square", undef, 20, "<RadioItem>"],
- ["/_Preferences/Shape/_Rectangle", undef, 21, "<RadioItem>"],
- ["/_Preferences/Shape/_Oval", undef, 22, "<RadioItem>"],
-
- ["/_Help", undef, 0, "<LastBranch>"],
+ ["/_Help", undef, 0, "<Branch>"],
+ ["/Help/_Mandrake Control Center", undef, 30],
+ ["/Help/_Report Bug", undef, 30],
["/Help/_About", undef, 30]
- );
+ );
my ($accel_group, $item_factory, $box1, $label, $box2);
my ($separator, $button, $dummy);
@@ -101,16 +91,34 @@ $notebook_global->set_show_border(0);
$notebook_global->set_show_tabs(0);
$hbox_global->pack_start($notebook_global,1,1,0);
-my ($pix_about_map, $pix_about_mask) = Gtk::Gdk::Pixmap->create_from_xpm(NULL, Gtk::Widget->get_default_style->bg('normal'), "$xpm_path/logo1.xpm");
+#-------------------------------- bal -----------------------------------------------------------
+
+my $hbox1= new Gtk::HBox(0,0);
+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 = new Gtk::Pixmap ($pix_about_map, $pix_about_mask);
+$pix_about->set_alignment(0,0);
+$hbox1->pack_start($pix_about, 0, 1, 0);
+my $style = new Gtk::Style;
+$style->font(Gtk::Gdk::Font->load('-*-helvetica-bold-r-normal-*-*-130-*-*-p-*-iso8859-1'));
+my $label_about2 = new Gtk::Label ("Mandrake Control Center");
+$label_about2->set_alignment(0,0);
+$label_about2->set_style($style);
+$hbox1->pack_start($label_about2, 0, 1, 0);
my $vbox_about = new Gtk::VBox(1,0);
-$vbox_about->pack_start($pix_about, 1, 1, 0);
-my $text_about = new Gtk::Text ();
-$text_about->set_editable(0);
-$text_about->insert ( undef, undef, undef, "About, help, click on that button...");
-$vbox_about->pack_start($text_about, 1, 1, 0);
-my $label_about2 = new Gtk::Label ("");
-$vbox_about->pack_start($label_about2, 1, 1, 0);
+$vbox_about->pack_start($hbox1, 0, 1, 0);
+my $label_about3 = new Gtk::Label ("This is the Mandrake Control Center where you can configure your Mandrake Box");
+$vbox_about->pack_start($label_about3, 0, 0, 0);
+
+my $table_info1 = new Gtk::Table(6,2,1);
+#@info_tree = split / / $test;
+my $label_os = new Gtk::Label("User:myarchname");
+$table_info1->attach($label_os, 0, 1, 0, 1, 0, 0, 0, 0);
+$vbox_about->pack_start($table_info1, 0, 0, 0);
+
+#my $text_about = new Gtk::Text ();
+#$text_about->set_editable(0);
+#$text_about->insert ( undef, undef, undef, "About, help, click on that button...");
+#$vbox_about->pack_start($text_about, 1, 1, 0);
$notebook_global->append_page($vbox_about, "$arg");
my $vbox_global_left = new Gtk::VBox(0,0);
@@ -283,7 +291,7 @@ sub item_factory_cb {
my ($widget, $action, @data) = @_;
print "ItemFactory: activated ", $widget->item_factory_path(), " -> ", $action, "\n";
- $action == 5 and Gtk->exit(0);
+ $action == 1 and Gtk->exit(0);
}