summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2002-01-21 18:29:13 +0000
committerdamien <damien@mandriva.com>2002-01-21 18:29:13 +0000
commit9b7af8ed5173f7e089aea133a69a8fd309854ad5 (patch)
tree0f2f5dda715ebd61f4864c74cd2e9203a41b579b
parentb6d037b857806a396233d2a1e2a9dbf78e5765a3 (diff)
downloadcontrol-center-9b7af8ed5173f7e089aea133a69a8fd309854ad5.tar
control-center-9b7af8ed5173f7e089aea133a69a8fd309854ad5.tar.gz
control-center-9b7af8ed5173f7e089aea133a69a8fd309854ad5.tar.bz2
control-center-9b7af8ed5173f7e089aea133a69a8fd309854ad5.tar.xz
control-center-9b7af8ed5173f7e089aea133a69a8fd309854ad5.zip
icons updated
-rwxr-xr-xcontrol-center211
1 files changed, 92 insertions, 119 deletions
diff --git a/control-center b/control-center
index 3134d19f..65a945c3 100755
--- a/control-center
+++ b/control-center
@@ -83,9 +83,21 @@ my @tree =
[_("Printer"),'printer-mdk.png', "$_sbindir/print.pm"],
[_("Keyboard"), 'keyboard-mdk.png', "$_sbindir/keyboarddrake"],
[_("Mount Points"),'partition-mdk.png', "$_sbindir/diskdrake"],
+ [_("Display"),'XFdrake-mdk.png', "$_sbindir/XFdrake"],
+ [_("Hardware"),'harddrake-mdk.png', "$_sbindir/harddrake"],
+ [_("Mouse"), 'mousedrake-mdk.png', "$_sbindir/mousedrake"],
+ [_("Printer"),'printer-mdk.png', "$_sbindir/print.pm"],
+ [_("Keyboard"), 'keyboard-mdk.png', "$_sbindir/keyboarddrake"],
+ [_("Mount Points"),'partition-mdk.png', "$_sbindir/diskdrake"],
+ [_("Display"),'XFdrake-mdk.png', "$_sbindir/XFdrake"],
+ [_("Hardware"),'harddrake-mdk.png', "$_sbindir/harddrake"],
+ [_("Mouse"), 'mousedrake-mdk.png', "$_sbindir/mousedrake"],
+ [_("Printer"),'printer-mdk.png', "$_sbindir/print.pm"],
+ [_("Keyboard"), 'keyboard-mdk.png', "$_sbindir/keyboarddrake"],
+ [_("Mount Points"),'partition-mdk.png', "$_sbindir/diskdrake"],
]
],
- [_("Network bla bla & Internet"),'net-mdk',
+ [_("Network & Internet"),'net-mdk',
[
[_("Connection"), 'draknet-mdk.png', "$_sbindir/draknet"],
[_("Connection Sharing"),'drakgw-mdk.png', "$_sbindir/drakgw"],
@@ -154,7 +166,6 @@ foreach (@tree) {
$darea_left->set_events(['exposure_mask', 'enter_notify_mask', 'leave_notify_mask', 'button_press_mask', 'button_release_mask' ]);
$darea_left->signal_connect( size_allocate => sub { $dbl_area_left = undef });
$darea_left->signal_connect( expose_event => sub {
- my $plop = defined($dbl_area_left) ? $dbl_area_left->{state} : "not defined";
my ($dx, $dy) = ($darea_left->allocation->[2], $darea_left->allocation->[3]);
if (!defined($dbl_area_left) || $darea_left->{state} != $dbl_area_left->{state} ) {
my $state = $darea_left->{state};
@@ -205,10 +216,18 @@ foreach (@tree) {
push @darea_left_list, [ ($index-1)*45, $darea_left ];
}
+#my $fix;
+#$window_global->add($fix = new Gtk::Fixed);
+#$fix->put(gtkpng("XFdrake-mdk.png"), 75, 65);
+#$window_global->show_all;
+#Gtk->main;
+
+
$window_global->add(
gtkpack_(new Gtk::VBox(0, 0),
- 0, get_main_menu($window_global),
- 0, my $darea_title = gtkset_usize(new Gtk::DrawingArea, 450, 55),
+ 0, my $title_w = get_main_menu($window_global),
+ 0, my $fixed_title = gtkset_usize(new Gtk::Fixed, 450, 55),
+# 0, my $darea_title = gtkset_usize(new Gtk::DrawingArea, 450, 55),
0, new Gtk::HSeparator,
1, gtkpack_(new Gtk::HBox(0, 0),
0, my $fixed_left = new Gtk::Fixed,
@@ -245,17 +264,18 @@ my $dbl_area;
my ($pixmap_back, undef) = gtkcreate_png('mcc-title-back');
my ($pixmap_icon, undef) = gtkcreate_png('mcc-title-icon');
+$fixed_title->put(my $darea_title = gtkset_usize(new Gtk::DrawingArea, 450, 55), 0, 0);
#FIXME
-#$darea_title->window->set_back_pixmap($pixmap_back, 0);
-$darea_title->signal_connect( size_allocate => sub { $dbl_area = undef });
+$fixed_title->signal_connect( realize => sub { $fixed_title->window->set_back_pixmap($pixmap_back, 0) });
+$darea_title->signal_connect( configure_event => sub { $dbl_area = undef });
$darea_title->signal_connect( expose_event => sub {
+ my @dim = @{$_[1]->{area}};
my ($dx, $dy) = ($darea_title->allocation->[2], $darea_title->allocation->[3]);
if (!defined($dbl_area)) {
my ($pix, $width, $height) = create_pix_text($darea_title, "welcome", "#255#255#255",
- _("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1"),
-#_("-urw-times-bold-r-normal-*-*-200-*-*-p-*-iso8859-1"),
- max($dx-336, 0), $dy, 0, 1, $pixmap_back, 110, 55, 0, 0); #"#0#0#0" $pixmap_back,
+ _("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1"),
+ max($dx-336, 0), $dy, 0, 1, $pixmap_back, 110, 55, 0, 0);
$dbl_area = new Gtk::Gdk::Pixmap($darea_title->window, $dx, $dy);
fill_tiled($darea_title, $dbl_area, $pixmap_back, 110, 55, $dx, $dy);
$dbl_area->draw_pixmap($darea_title->style->bg_gc('normal'),
@@ -265,116 +285,67 @@ $darea_title->signal_connect( expose_event => sub {
$pix, 0, 0, 336, $y_pos, $width, $height);
}
$darea_title->window->draw_pixmap($darea_title->style->bg_gc('normal'),
- $dbl_area, 0, 0, 0, 0, ($dx, $dy));
+ $dbl_area, $dim[0], $dim[1], $dim[0], $dim[1], $dim[2], $dim[3]);
});
my ($pixmap_back_right, undef) = gtkcreate_png('mcc-core-back');
-
-# $hpane_global->pack1(gtkpack(new Gtk::VBox(0,0),
-# gtkappenditems(my $list = new Gtk::List,
-# map_index {
-# my $k = $::i+1;
-# gtkadd(
-# gtksignal_connect(new Gtk::ListItem,
-# select => sub { $notebook_global->set_page($k) }),
-# icon_label_box($_->[0], "$png_path/$_->[1]")) } @tree )
-# ),
-#my $scrolled_global = new Gtk::Widget ('Gtk::ScrolledWindow', name => 'icons_back'),
-# 0, 1);
-#$scrolled_global->set_policy('automatic','automatic');
-#$scrolled_global->set_usize(180, 0);
-
-# $hpane_global->pack1(gtkpack(new Gtk::VBox(0,0),
-# gtkappenditems(my $list = new Gtk::List,
-# map_index {
-# my $k = $::i+1;
-# gtkadd(
-# gtksignal_connect(new Gtk::ListItem,
-# select => sub { $notebook_global->set_page($k) }),
-# icon_label_box($_->[0], "$png_path/$_->[1]")) } @tree )
-# ),
-#my $scrolled_global = new Gtk::Widget ('Gtk::ScrolledWindow', name => 'icons_back'),
-# 0, 1);
-
my ($pix_splash_map, undef) = gtkcreate_png('mcc-splash');
my $pix_dbl;
-$notebook_global->append_page(gtkset_usize(my $darea1 = new Gtk::DrawingArea, 540, 460), undef);
-$darea1->signal_connect( size_allocate => sub { $pix_dbl = undef });
-$darea1->signal_connect( expose_event => sub {
- my ($dx, $dy) = ($darea1->allocation->[2], $darea1->allocation->[3]);
- if (!defined($pix_dbl)) {
- $pix_dbl = new Gtk::Gdk::Pixmap($darea1->window, $dx, $dy);
-
-# fill_tiled($darea1, $pix_dbl, $pixmap_back_right, 540, 460, $dx, $dy);
- $pix_dbl->draw_pixmap($darea1->style->white_gc, $pix_splash_map,
- 0, 0, ($dx-540)/2, ($dy-460)/2, 540, 460);
- my $style = new Gtk::Style;
- my $style_dflt = new Gtk::Style;
- $style->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1")));
- #_("-adobe-times-bold-r-normal--17-*-100-100-p-*-iso8859-*,*-r-*")));
- $pix_dbl->draw_string($style->font, $darea1->style->black_gc, 80, 165, _("Welcome to the Mandrake Control Center") );
- my @revtree;
- open VERS, "/etc/mandrake-release" or die _("cannot open this file for read: %s", $!);
- while (<VERS>) { push (@revtree,$_) }
- my @info_tree = split / /, $revtree[0];
- my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
- my $style1 = new Gtk::Style;
- $style1->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-90-*-*-p-*-iso8859-1")));
- #_("-adobe-times-bold-r-normal--14-*-100-100-p-*-iso8859-*,*-r-*")));
- my $i=0;
- foreach(
- [_("System:"), "$info_tree[0] $info_tree[1] $info_tree[3] $info_tree[4]"],
- [_("Hostname:"), $nodename],
- [_("Kernel Version:"), "$release $version"],
- [_("Machine:"), $machine] ) {
- $pix_dbl->draw_string($style_dflt->font, $darea1->style->black_gc, 80, 200+$i, $_->[0]);
- $pix_dbl->draw_string($style_dflt->font, $darea1->style->black_gc, 81, 200+$i, $_->[0]);
- $pix_dbl->draw_string($style_dflt->font, $darea1->style->black_gc, 200, 200+$i, $_->[1]);
- $i+=20;
- }
- }
- $darea1->window->draw_pixmap ($darea1->style->white_gc,
- $pix_dbl, 0, 0,
- ($darea1->allocation->[2]-540)/2, ($darea1->allocation->[3]-460)/2,
- 540, 460);
- 0;
- });
+#$notebook_global->append_page(gtkset_usize(my $fixed_about = new Gtk::Fixed, 540, 460), undef);
+#$fixed_about->put(gtkset_usize(my $darea1 = new Gtk::DrawingArea, 540, 460), 0, 0);
+#$darea1->signal_connect( size_allocate => sub { $pix_dbl = undef });
+#$darea1->signal_connect( expose_event => sub {
+# my ($dx, $dy) = ($darea1->allocation->[2], $darea1->allocation->[3]);
+# if (!defined($pix_dbl)) {
+# $pix_dbl = new Gtk::Gdk::Pixmap($darea1->window, $dx, $dy);
+
+# # fill_tiled($darea1, $pix_dbl, $pixmap_back_right, 540, 460, $dx, $dy);
+# $pix_dbl->draw_pixmap($darea1->style->white_gc, $pix_splash_map,
+# 0, 0, ($dx-540)/2, ($dy-460)/2, 540, 460);
+# my $style = new Gtk::Style;
+# my $style_dflt = new Gtk::Style;
+# $style->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1")));
+# #_("-adobe-times-bold-r-normal--17-*-100-100-p-*-iso8859-*,*-r-*")));
+# $pix_dbl->draw_string($style->font, $darea1->style->black_gc, 80, 165, _("Welcome to the Mandrake Control Center") );
+# my @revtree;
+# open VERS, "/etc/mandrake-release" or die _("cannot open this file for read: %s", $!);
+# while (<VERS>) { push (@revtree,$_) }
+# my @info_tree = split / /, $revtree[0];
+# my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
+# my $style1 = new Gtk::Style;
+# $style1->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-90-*-*-p-*-iso8859-1")));
+# #_("-adobe-times-bold-r-normal--14-*-100-100-p-*-iso8859-*,*-r-*")));
+# my $i=0;
+# foreach(
+# [_("System:"), "$info_tree[0] $info_tree[1] $info_tree[3] $info_tree[4]"],
+# [_("Hostname:"), $nodename],
+# [_("Kernel Version:"), "$release $version"],
+# [_("Machine:"), $machine] ) {
+# $pix_dbl->draw_string($style_dflt->font, $darea1->style->black_gc, 80, 200+$i, $_->[0]);
+# $pix_dbl->draw_string($style_dflt->font, $darea1->style->black_gc, 81, 200+$i, $_->[0]);
+# $pix_dbl->draw_string($style_dflt->font, $darea1->style->black_gc, 200, 200+$i, $_->[1]);
+# $i+=20;
+# }
+# }
+# $darea1->window->draw_pixmap ($darea1->style->white_gc,
+# $pix_dbl, 0, 0,
+# ($darea1->allocation->[2]-540)/2, ($darea1->allocation->[3]-460)/2,
+# 540, 460);
+# 0;
+# });
+
+$window_global->realize;
+
+my $cursor = new Gtk::Gdk::Cursor 15;
+$notebook_global->append_page(gtkicons_labels_widget($_->[2], $window_global, "#0#0#0", $style_dflt->font,
+ #"-urw-times-bold-r-normal-*-*-100-*-*-p-*-iso8859-1"),
+ $pixmap_back_right, 540, 460, 55, 50, 50, 50, 50, 50)
+ ) foreach @tree;
+$window_global->show_all;
my @pid_launched;
my %tree_launched;
-# my $tree= new Gtk::Tree;
-# $tree->set_selection_mode('browse');
-# $tree->set_view_lines(0);
-# $tree->set_view_mode('item');
-# map { create_tree_item($tree, $_->[0] , "$xpm_path_l/$_->[1]",1); }
-# @tree_parent;
-# map { create_tree_item($treeitem_sub[st(int($_->[2]))],$_->[0], "$xpm_path_l/$_->[1]",0);}
-# @tree_app;
-
-# $scrolled_global->add_with_viewport(gtkpack(new Gtk::VBox(0,0),
-# gtkappenditems(my $list = new Gtk::List,
-# map_index {
-# my $k = $::i+1;
-# gtkadd(
-# gtksignal_connect(new Gtk::ListItem,
-# select => sub { $notebook_global->set_page($k) }),
-# icon_label_box($_->[0], "$png_path/$_->[1]")) } @tree )
-# )
-# );
-#$list->set_selection_mode('browse');
-
-my $cursor = new Gtk::Gdk::Cursor 15;
-foreach (@tree) {
- $notebook_global->append_page(
-# gtkicons_labels_widget($_->[2], $window_global, "#0#0#0", _("-urw-times-bold-r-normal-*-*-100-*-*-p-*-iso8859-1"),
-# 2, $pixmap_back_right, 540, 460, 44, 40, 5, 5, 32, 32)
- gtkicons_labels_widget($_->[2], $window_global, "#0#0#0", $style_dflt->font,
- #"-urw-times-bold-r-normal-*-*-100-*-*-p-*-iso8859-1"),
- $pixmap_back_right, 540, 460, 55, 55, 50, 50, 50, 50)
- );
-}
-
# my $cursor = new Gtk::Gdk::Cursor 10;
# foreach (@tree) {
# $notebook_global->append_page(
@@ -406,8 +377,6 @@ foreach (@tree) {
# )
# }
-#$window_global->realize;
-$window_global->show_all;
$notebook_global->set_page(0);
my @anim;
($anim[$_]->[0], $anim[$_]->[1]) = gtkcreate_png("$png_path/anim_" . ($_ + 1) . ".png") foreach (0..9);
@@ -473,14 +442,18 @@ sub icon_label_box {
# (This version is now UTF8 compliant - Sg 2001-08-18)
#-------------------------------------------------------------
-sub _ {
- my $s = shift @_; my $t = translate($s);
- sprintf $t, @_;
-}
+{
+ no warnings;
+ sub _ {
+ my $s = shift @_; my $t = translate($s);
+ sprintf $t, @_;
+ }
-sub translate {
- my ($s) = @_;
- $s ? c::dgettext('drakconf', $s) : '';
+ no warnings;
+ sub translate {
+ my ($s) = @_;
+ $s ? c::dgettext('drakconf', $s) : '';
+ }
}
#-------------------------------------------------------------