summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2002-01-07 13:58:44 +0000
committerdamien <damien@mandriva.com>2002-01-07 13:58:44 +0000
commit548a2785a5d0a76be4ea883d98ef131ccbf97ea9 (patch)
tree6d0aaf7a3aff3b6e9b8c9d1177e57f0c09c81de2
parent937d3eea61022bde8608c31a4b916f523e125173 (diff)
downloadcontrol-center-548a2785a5d0a76be4ea883d98ef131ccbf97ea9.tar
control-center-548a2785a5d0a76be4ea883d98ef131ccbf97ea9.tar.gz
control-center-548a2785a5d0a76be4ea883d98ef131ccbf97ea9.tar.bz2
control-center-548a2785a5d0a76be4ea883d98ef131ccbf97ea9.tar.xz
control-center-548a2785a5d0a76be4ea883d98ef131ccbf97ea9.zip
some improvment
-rwxr-xr-xcontrol-center58
1 files changed, 32 insertions, 26 deletions
diff --git a/control-center b/control-center
index 25140f8b..3a039308 100755
--- a/control-center
+++ b/control-center
@@ -85,7 +85,7 @@ my @tree =
[_("Mount Points"),'partition-mdk.png', "$_sbindir/diskdrake"],
]
],
- [_("Network & Internet"),'net-mdk',
+ [_("Network bla bla & Internet"),'net-mdk',
[
[_("Connection"), 'draknet-mdk.png', "$_sbindir/draknet"],
[_("Connection Sharing"),'drakgw-mdk.png', "$_sbindir/drakgw"],
@@ -158,7 +158,7 @@ foreach (@tree) {
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};
- my ($pix, $width, $height, $asc, $desc) = create_pix_text($darea_left, $text, "#0#0#0",
+ my ($pix, $width, $height) = create_pix_text($darea_left, $text, "#0#0#0",
$style_dflt->font,
max($dx-40, 0), $dy, 0, 0, $back[$state], 160, 45, 0, 1); #"#0#0#0",
$dbl_area_left = new Gtk::Gdk::Pixmap($darea_left->window, $dx, $dy);
@@ -188,12 +188,12 @@ foreach (@tree) {
}
});
$darea_left->signal_connect( button_release_event => sub {
- $darea_left->{state} == 2 and return;
- for (my $i = 1; $i < @darea_left_list; $i+=2) {
- $darea_left_list[$i]->window->set_cursor($cursor_hand);
- if($darea_left_list[$i]->{state} != 0) {
- $darea_left_list[$i]->{state} = 0;
- $darea_left_list[$i]->draw(undef);
+ $darea_left->{state} == 2 and $notebook_global->set_page($index), return;
+ foreach (@darea_left_list) {
+ $_->[1]->window->set_cursor($cursor_hand);
+ if($_->[1]->{state} != 0) {
+ $_->[1]->{state} = 0;
+ $_->[1]->draw(undef);
}
}
$darea_left->window->set_cursor($cursor_normal);
@@ -202,7 +202,7 @@ foreach (@tree) {
$notebook_global->set_page($index);
});
- push @darea_left_list, (0, $darea_left);
+ push @darea_left_list, [ ($index-1)*45, $darea_left ];
}
$window_global->add(
@@ -211,28 +211,34 @@ $window_global->add(
0, my $darea_title = gtkset_usize(new Gtk::DrawingArea, 450, 55),
0, new Gtk::HSeparator,
1, gtkpack_(new Gtk::HBox(0, 0),
- 0, gtkpack2_(new Gtk::VBox(0, 0),
- @darea_left_list,
- 1, my $last_darea = new Gtk::DrawingArea,
- ),
+ 0, my $fixed_left = new Gtk::Fixed,
+# gtkpack2_(new Gtk::VBox(0, 0),
+# @darea_left_list,
+# 1, my $last_darea = new Gtk::DrawingArea,
+# ),
1, $notebook_global = new Gtk::Widget ('Gtk::Notebook',
show_border => 0,
show_tabs => 0),
)
)
);
-my $dbl_arealast;
-$last_darea->signal_connect( size_allocate => sub { $dbl_arealast = undef });
-$last_darea->signal_connect( expose_event => sub {
- my ($dx, $dy) = ($last_darea->allocation->[2], $last_darea->allocation->[3]);
- if (!defined($dbl_arealast)) {
- $dbl_arealast = new Gtk::Gdk::Pixmap($last_darea->window, $dx, $dy);
- #FIXME
- fill_tiled($last_darea, $dbl_arealast, $back[0], $dx, $dy, 160, 45);
- }
- $last_darea->window->draw_pixmap($last_darea->style->bg_gc('normal'),
- $dbl_arealast, 0, 0, 0, 0, ($dx, $dy));
- });
+foreach (@darea_left_list) {
+ $fixed_left->put($_->[1], 0, $_->[0]);
+}
+$fixed_left->signal_connect(realize => sub { $fixed_left->window->set_back_pixmap($back[0], 0) });
+
+# my $dbl_arealast;
+# $last_darea->signal_connect( size_allocate => sub { $dbl_arealast = undef });
+# $last_darea->signal_connect( expose_event => sub {
+# my ($dx, $dy) = ($last_darea->allocation->[2], $last_darea->allocation->[3]);
+# if (!defined($dbl_arealast)) {
+# $dbl_arealast = new Gtk::Gdk::Pixmap($last_darea->window, $dx, $dy);
+# #FIXME
+# fill_tiled($last_darea, $dbl_arealast, $back[0], $dx, $dy, 160, 45);
+# }
+# $last_darea->window->draw_pixmap($last_darea->style->bg_gc('normal'),
+# $dbl_arealast, 0, 0, 0, 0, ($dx, $dy));
+# });
my $dbl_area;
@@ -246,7 +252,7 @@ $darea_title->signal_connect( size_allocate => sub { $dbl_area = undef });
$darea_title->signal_connect( expose_event => sub {
my ($dx, $dy) = ($darea_title->allocation->[2], $darea_title->allocation->[3]);
if (!defined($dbl_area)) {
- my ($pix, $width, $height, $asc, $desc) = create_pix_text($darea_title, "welcome", "#255#255#255",
+ 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,