summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-02-06 16:27:44 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-02-06 16:27:44 +0000
commit467979eb8b56f753769cfeae8de02440400a2eb4 (patch)
tree3494cf4fc9bbe349c080403e2d5cdedd31a99e64
parent379f606cf956b09773652dcab316cd3f23098257 (diff)
downloadcontrol-center-467979eb8b56f753769cfeae8de02440400a2eb4.tar
control-center-467979eb8b56f753769cfeae8de02440400a2eb4.tar.gz
control-center-467979eb8b56f753769cfeae8de02440400a2eb4.tar.bz2
control-center-467979eb8b56f753769cfeae8de02440400a2eb4.tar.xz
control-center-467979eb8b56f753769cfeae8de02440400a2eb4.zip
adapt the left part to new ln icons
-rwxr-xr-xcontrol-center23
1 files changed, 13 insertions, 10 deletions
diff --git a/control-center b/control-center
index d16ae6ff..fdfa7425 100755
--- a/control-center
+++ b/control-center
@@ -59,6 +59,7 @@ my ($embedded, $show_logs, $expert_wizard) = (text2bool($h{EMBEDDED}), text2bool
my $theme = $h{THEME};
if ("@ARGV" =~ /--theme (\w+)/) { $theme = $1 }
-d "$themes_dir/$theme" or $theme = 'default';
+add_icon_path("/home/tv/cvs/mdk/soft/control-center/pixmaps/default/");
add_icon_path("$themes_dir/$theme/");
add_icon_path("$themes_dir/default") if $theme ne 'default'; # fall back if theme miss some icons
@@ -330,10 +331,13 @@ $embedded_check_box = $factory->get_widget("<main>" . strip_first_underscore(@{$
$expert_wizard_check_box = $factory->get_widget("<main>" . strip_first_underscore(@{$options{wiz_expert}})) if $::isWiz;
gtkadd($window_global,
- gtkpack_(Gtk2::VBox->new(0, 3),
+ gtkpack_(Gtk2::VBox->new(0, 0),
0, $menu,
1, gtkpack_(Gtk2::HBox->new(0, 0),
- 0, my $fixed_left = Gtk2::Fixed->new,
+ 0, gtkpack_(Gtk2::VBox->new(0, 0),
+ 1, my $fixed_left = Gtk2::Fixed->new,
+ 0, gtkcreate_img('mcc-left-back-bottom.png')
+ ),
1, gtkpack_(my $right_box = Gtk2::VBox->new(0, 0),
1, gtkpack_(my $emb_box = Gtk2::VBox->new(0, 0),
1, my $emb_wait = gtkpack_(Gtk2::VBox->new(0, 0),
@@ -388,13 +392,10 @@ $summary->put(gtkmodify_font(Gtk2::Label->new(N("Welcome to the Mandrake Control
my @darea_left_list;
my ($cursor_hand, $cursor_normal) = (Gtk2::Gdk::Cursor->new('hand2'), Gtk2::Gdk::Cursor->new('left-ptr'));
-my $right_back_pixbuf = gtkcreate_pixbuf('mcc-core-back');
-my $left_back_pixbuf_unaltered = gtkcreate_pixbuf('mcc-left-back');
-my $left_back_pixbuf_unaltered_h = gtkcreate_pixbuf('mcc-left-back2');
-my ($back_width, $back_height) = ($left_back_pixbuf_unaltered->get_width, $left_back_pixbuf_unaltered->get_height);
+my $left_back_pixbuf = gtkcreate_pixbuf('mcc-left-back');
+my ($back_width, $back_height) = ($left_back_pixbuf->get_width, $left_back_pixbuf->get_height);
# 0 => unselected, 1 => highlited, 2 => selected
-my @left_back_pixbuf = ($left_back_pixbuf_unaltered, $left_back_pixbuf_unaltered, $left_back_pixbuf_unaltered_h);
my ($index, $left_locked) = (0, 0);
my $index_sav = -1;
@@ -426,6 +427,8 @@ foreach (@tree) {
@lspacing = ($lspacing, $lspacing+$scale/2, $lspacing);
}
+ my $left_back_pixbuf = $my_index ? $left_back_pixbuf : gtkcreate_pixbuf('mcc-left-back-top.png');
+
# my @icon_pixbufs = ($icon_pixbuf, scale(render_shiner($icon_pixbuf, 1.89), $scale), $icon_pixbuf);
my @icon_pixbufs = ($icon_pixbuf, render_shiner($icon_pixbuf, 1.89), $icon_pixbuf);
@@ -448,7 +451,7 @@ foreach (@tree) {
my $lspacing = $lspacing[$curr_state];
$dbl_area_left[$curr_state] = Gtk2::Gdk::Pixmap->new($window, $d_width, $d_height, $window->get_depth);
my $gc = $darea_left->style->fg_gc('normal');
- $left_back_pixbuf[$curr_state]->render_to_drawable($dbl_area_left[$curr_state], $gc, 0, 0, 0, 0, $back_width, $back_height, 'normal', 0, 0);
+ $left_back_pixbuf->render_to_drawable($dbl_area_left[$curr_state], $gc, 0, 0, 0, 0, $back_width, $back_height, 'normal', 0, 0);
$icon_pixbufs[$curr_state]->render_to_drawable($dbl_area_left[$curr_state], $gc, 0, 0, $lspacing-$extra, $top_lspacing-$extra/2, $icon_width+$extra, $icon_height+$extra, 'normal', 0, 0);
$darea_left->style->black_gc->set_rgb_fg_color($colors[$curr_state]);
# $darea_left->style->black_gc->set_fg_gc('normal', $colors[$curr_state]);
@@ -560,7 +563,7 @@ hide_socket_and_clean();
# default left background
$fixed_left->set_has_window(1);
-$fixed_left->signal_connect(realize => sub { set_back_pixbuf($fixed_left, $left_back_pixbuf[0]) });
+$fixed_left->signal_connect(realize => sub { set_back_pixbuf($fixed_left, gtkcreate_pixbuf('mcc-left-back-middle.png')) });
# "wait while launching a program" area :
@@ -569,7 +572,7 @@ my ($run_pixbuf, $run_counter, $run_counter_add);
$run_darea->signal_connect(expose_event => sub {
my $pixbuf = render_alpha($run_pixbuf, $run_counter);
my ($window, $gc, $width, $height) = ($run_darea->window, $run_darea->style->fg_gc('normal'), $pixbuf->get_width, $pixbuf->get_height);
- $right_back_pixbuf->render_to_drawable($window, $gc, 0, 0, 0, 0, $width, $height, 'normal', 0, 0);
+# $right_back_pixbuf->render_to_drawable($window, $gc, 0, 0, 0, 0, $width, $height, 'normal', 0, 0);
$pixbuf->render_to_drawable($window, $gc, 0, 0, 0, 0, $width, $height, 'normal', 0, 0);
$pixbuf->unref;
$run_counter += $run_counter_add;