diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-02-10 10:00:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-02-10 10:00:38 +0000 |
commit | 78a47fc0423681cbc567b65f748fcc92dd4f77f4 (patch) | |
tree | 75303a7ce143d5d6318d49c5850b9562645d440d | |
parent | 37becb6c3c9538087e5251ca4015dd4ac38fb3f0 (diff) | |
download | control-center-78a47fc0423681cbc567b65f748fcc92dd4f77f4.tar control-center-78a47fc0423681cbc567b65f748fcc92dd4f77f4.tar.gz control-center-78a47fc0423681cbc567b65f748fcc92dd4f77f4.tar.bz2 control-center-78a47fc0423681cbc567b65f748fcc92dd4f77f4.tar.xz control-center-78a47fc0423681cbc567b65f748fcc92dd4f77f4.zip |
- remove translator warnings about the need for same translations for
both _Options and Options since we handle this automagically
- use new ln design for welcome page :-)
- rearrange code: regroup functions in functionnal units
- simplify spacing managment for left icons & text
- simplify ressource file quest
-rwxr-xr-x | control-center | 215 | ||||
-rw-r--r-- | control-center.rc | 456 | ||||
-rw-r--r-- | drakconf.spec | 6 |
3 files changed, 147 insertions, 530 deletions
diff --git a/control-center b/control-center index fdfa7425..d0ab46d3 100755 --- a/control-center +++ b/control-center @@ -59,12 +59,10 @@ 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 -my $rc = "$themes_dir/$theme/gtkrc"; -$rc = "$themes_dir/default/gtkrc" if ! -r $rc && $theme ne 'default'; +my $rc = find { -r $_ } ("$themes_dir/$theme/gtkrc", if_($theme ne 'default', "$themes_dir/default/gtkrc")); Gtk2::Rc->parse($rc) if -r $rc; #------------------------------------------------------------- @@ -91,6 +89,7 @@ gtkflush(); my $freeze_log = 1; my $still_in_splash_screen = 1; + #------------------------------------------------------------- # Data structures @@ -268,9 +267,10 @@ my @tree = my ($global_width, $global_height) = (720, 523); -my ($timeout, $show_log_check_box, $embedded_check_box, $expert_wizard_check_box); +my ($timeout, $show_log_check_box, $embedded_check_box, $expert_wizard_check_box, $exp_frame, $emb_socket); my $window_global = gtkset_size_request(Gtk2::Window->new('toplevel'), $global_width, $global_height); + my $pending_app = 0; my %options = ( @@ -282,7 +282,6 @@ my %options = ( my ($menu, $factory) = create_factory_menu($window_global, ({ path => N("/_File"), type => '<Branch>' }, { path => N("/_File") . N("/_Quit"), accelerator => N("<control>Q"), callback => \&quit_global }, -#-PO Don't remember to translate "_Options" the same way "Options" is (but for the underscore of course) { path => N("/_Options"), type => '<Branch>' }, { path => join('', @{$options{show_log}}), type => '<CheckItem>', callback => sub { @@ -325,7 +324,6 @@ my ($menu, $factory) = create_factory_menu($window_global, { path => N("/_Help").N("/_About..."), callback => \&about_mdk_cc } )); -#-PO Don't remember to translate "Options" the same way "_Options" is (but without the underscore of course) $show_log_check_box = $factory->get_widget("<main>" . strip_first_underscore(@{$options{show_log}})); $embedded_check_box = $factory->get_widget("<main>" . strip_first_underscore(@{$options{embedded_mode}})); $expert_wizard_check_box = $factory->get_widget("<main>" . strip_first_underscore(@{$options{wiz_expert}})) if $::isWiz; @@ -333,12 +331,19 @@ $expert_wizard_check_box = $factory->get_widget("<main>" . strip_first_underscor gtkadd($window_global, gtkpack_(Gtk2::VBox->new(0, 0), 0, $menu, + 0, gtkset_size_request(Gtk2::VBox->new(10, 10), -1, 2), 1, gtkpack_(Gtk2::HBox->new(0, 0), 0, gtkpack_(Gtk2::VBox->new(0, 0), - 1, my $fixed_left = Gtk2::Fixed->new, - 0, gtkcreate_img('mcc-left-back-bottom.png') + 0, my $fixed_left = gtkset_name(Gtk2::Fixed->new, 'mcc'), + # default left background + 1, gtksignal_connect(gtkset_size_request(Gtk2::DrawingArea->new(), -1, -1), + realize => sub { set_back_pixbuf($_[0], gtkcreate_pixbuf('mcc-left-back-middle')) }), + 0, gtkcreate_img('mcc-left-back-bottom') ), 1, gtkpack_(my $right_box = Gtk2::VBox->new(0, 0), + 0, gtksignal_connect(gtkset_size_request(Gtk2::DrawingArea->new(), -1, 46), + realize => sub { set_back_pixbuf($_[0], gtkcreate_pixbuf('mcc-right-top')) }), + 1, gtkpack_(my $emb_box = Gtk2::VBox->new(0, 0), 1, my $emb_wait = gtkpack_(Gtk2::VBox->new(0, 0), 1, Gtk2::HBox->new(0, 0), @@ -356,9 +361,14 @@ gtkadd($window_global, ) ) ), - 1, my $notebook_global = Gtk2::Notebook->new, + 1, my $notebook_global = gtkset_name(Gtk2::Notebook->new, 'mcc'), + 0, gtkadd(gtkset_shadow_type(gtkset_size_request(gtkset_border_width($exp_frame = Gtk2::Frame->new(N("Logs")), 5), 0, 120), 'etched_out')), + 0, gtksignal_connect(gtkset_size_request(Gtk2::DrawingArea->new(), -1, 1), + realize => sub { set_back_pixbuf($_[0], gtkcreate_pixbuf('mcc-right-bottom')) }), + ) - ) + ), + 0, gtkset_size_request(Gtk2::VBox->new(10, 10), -1, 2) ) ); @@ -376,15 +386,37 @@ my $pixbuf_icon = gtkcreate_pixbuf('mcc-title-icon'); # main page (summary) : -my $summary = Gtk2::Fixed->new; -$summary->set_has_window(1); -$notebook_global->append_page(gtksignal_connect($summary, realize => sub { set_back_pixbuf($summary, gtkcreate_pixbuf("mcc-splash")) })); +my $summary = create_scrolled_window( + gtkpack_(Gtk2::VBox->new(0, 0), + 1, gtkpack_(Gtk2::VBox->new(0, 0), + 1, gtkpack_(Gtk2::HBox->new(0, 0), + 1, Gtk2::VBox->new(0, 0), + 0, gtkmodify_font(Gtk2::Label->new(N("Welcome to the Mandrake Control Center")), + Gtk2::Pango::FontDescription->from_string('15')), + 1, Gtk2::VBox->new(0, 0), + ), + 1, Gtk2::HBox->new(0, 0), + ), + 0, gtkpack_(Gtk2::HBox->new(0, 0), + 1, Gtk2::VBox->new(0, 0), + 0, gtkcreate_img('mcc-welcome-logo') + ) + ), + , undef, 'none'); + + +my $str = "Mandrake Control Center is Mandrake Linux's main configuration +tool. It enables the system administrator to configure the hardware +and services used for all users. The tools accessed through the +Mandrake Control Center greatly simplify the use of the system, +notably by avoiding the use of the evil command line."; + +$notebook_global->append_page($summary); use POSIX qw(:sys_utsname_h :math_h sys_wait_h); my (undef, $nodename, $release, undef, $machine) = POSIX::uname(); -$summary->put(gtkmodify_font(Gtk2::Label->new(N("Welcome to the Mandrake Control Center")), Gtk2::Pango::FontDescription->from_string('15')), - 80, 115); # FIXME: better center it at realize time @(summary->width - (vbox->width/2), summary->height - (vbox->height/2) ) + # left icons : @@ -401,12 +433,11 @@ my ($index, $left_locked) = (0, 0); my $index_sav = -1; my (@curr_state, @old_state); -my ($d_width, $d_height) = (160, 45); +my ($d_width, $d_height) = (173, 46); +my $right_text_offset = $d_width - 155; my @colors = (gtkcolor(0, 0, 0), gtkcolor(0xAA, 0xAA, 0xFF), gtkcolor(0, 0, 0)); my $spacing = 25; -my $scale = 0; -my (@lspacing, $txt_offset); -my $top_lspacing = 4; +my ($lspacing, $left_txt_offset); # Create left icons foreach (@tree) { @@ -419,17 +450,15 @@ foreach (@tree) { my $icon_pixbuf = gtkcreate_pixbuf($icon); my ($icon_width, $icon_height) = ($icon_pixbuf->get_width, $icon_pixbuf->get_height); - unless (@lspacing) { + unless ($lspacing) { # $lspacing = round_up(($d_height-$icon_height)/2, 1); - my $lspacing = ($d_height-$icon_height)/2; - $txt_offset = $lspacing * 2 + $icon_width; + $lspacing = ($d_height-$icon_height)/2; + $left_txt_offset = $lspacing * 2 + $icon_width; $lspacing = round_up($lspacing, 1); - @lspacing = ($lspacing, $lspacing+$scale/2, $lspacing); } - my $left_back_pixbuf = $my_index ? $left_back_pixbuf : gtkcreate_pixbuf('mcc-left-back-top.png'); + my $left_back_pixbuf = $my_index ? $left_back_pixbuf : gtkcreate_pixbuf('mcc-left-back-top'); -# 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); my @fonts = map { Gtk2::Pango::FontDescription->from_string($_) } '', 'Bold', 'Bold'; @@ -445,26 +474,19 @@ foreach (@tree) { my ($x, $y, $width, $height) = $full_redraw ? (0, 0, $d_width, $d_height) : $event->area->values; # Redraw double buffer on first expose in that particular state (selected <=> not selected): render background, then icon, then text unless ($dbl_area_left[$curr_state]) { - my $extra = $curr_state == 1 ? $scale : 0; my $window = $darea_left->window; -# return unless $window; - 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->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); + $icon_pixbufs[$curr_state]->render_to_drawable($dbl_area_left[$curr_state], $gc, 0, 0, $lspacing, $lspacing, $icon_width, $icon_height, '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]); -# $darea_left->style->set_rgb_fg_color($colors[$curr_state]); $darea_left->modify_font($fonts[$curr_state]); - (undef, undef, $lines, $widths, $heights) = get_text_coord($text, $darea_left, $d_width-$txt_offset, $d_height, 0, 0, 0, 0); - my $offset = listlength(@$lines) > 1 ? $heights->[0]/2 : 0; # multi line texts are offsetted + (undef, undef, $lines, $widths, $heights) = get_text_coord($text, $darea_left, $d_width-$left_txt_offset-$right_text_offset, $d_height, 0, 0, 0, 0); + my $offset = (listlength(@$lines) > 1 ? $heights->[0]/2 : 0) + 3; # multi line texts are offsetted; but +3 is pure black magic mapn { -# $_ = "<markup><span foreground=\"blue\">$_</span></markup>" if $curr_state == 1; - # we need Gtk2::Pango::Layout->set_markup to render in blue in highlighted state - $dbl_area_left[$curr_state]->draw_layout($darea_left->style->black_gc, $_[1]+$txt_offset, $_[2]-$offset, $darea_left->create_pango_layout($_[0])); + $dbl_area_left[$curr_state]->draw_layout($darea_left->style->black_gc, $_[1]+$left_txt_offset, $_[2]-$offset, $darea_left->create_pango_layout($_[0])); } $lines, $widths, $heights; } $old_state[$my_index] = $curr_state; @@ -528,26 +550,41 @@ foreach (@tree) { ); } @$subtree)); +# my $w = gtkadd(Gtk2::Viewport->new, $tbl); +# my $vscrollbar = new Gtk2::VScrollbar(Gtk2::Adjustment->new); + $notebook_global->append_page(my $w_ret = create_scrolled_window($tbl, undef, 'none')); +# $notebook_global->append_page(create_scrolled_window($tbl)); +# $notebook_global->append_page($tbl); # $w_ret->vscrollbar->set_size_request(19, undef); } -$notebook_global->set_size_request(-1, $index * 60); -my ($exp_frame, $emb_socket); -sub update_exp { - return if $still_in_splash_screen || $pending_app; - if ($show_logs) { - if ($exp_frame) { - $exp_frame->show_all; - } else { - gtkpack__($right_box, - gtkadd($exp_frame = gtkset_shadow_type(gtkset_size_request(gtkset_border_width(Gtk2::Frame->new(N("Logs")), 5), 0, 120), 'etched_out'))); - } - } elsif ($exp_frame) { $exp_frame->hide } + +sub create_packtable { + print "PACKING...\n"; + my ($options, @l) = @_; + my $w = Gtk2::Table->new(0, 0, $options->{homogeneous} || 0); + each_index { + my ($i, $l) = ($_[0], $_); + each_index { + my ($j) = @_; + if ($_) { + $w->attach($_, $j, $j + 1, $i, $i + 1, ['expand', 'fill', 'shrink'], [], 0, 0); + $_->show; + } + } @$l; + } @l; + $w->set_col_spacings($options->{col_spacings} || 0); + $w->set_row_spacings($options->{row_spacings} || 0); + $w } + +$notebook_global->set_size_request(-1, $index * 60); + + $emb_box->set_size_request(-1, $index * 50); foreach ([ $show_log_check_box, $show_logs ], [ $embedded_check_box, $embedded ], if_($::isWiz, [ $expert_wizard_check_box, $expert_wizard ])) { @@ -561,10 +598,6 @@ foreach ([ $show_log_check_box, $show_logs ], [ $embedded_check_box, $embedded ] hide_socket_and_clean(); -# default left background -$fixed_left->set_has_window(1); -$fixed_left->signal_connect(realize => sub { set_back_pixbuf($fixed_left, gtkcreate_pixbuf('mcc-left-back-middle.png')) }); - # "wait while launching a program" area : my ($run_pixbuf, $run_counter, $run_counter_add); @@ -572,7 +605,6 @@ 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); $pixbuf->render_to_drawable($window, $gc, 0, 0, 0, 0, $width, $height, 'normal', 0, 0); $pixbuf->unref; $run_counter += $run_counter_add; @@ -588,6 +620,7 @@ $notebook_global->signal_connect(switch_page => sub { }); $window_global->show_all; +$exp_frame->hide; $emb_box->hide; $SIG{USR1} = \&sig_usr1; @@ -599,7 +632,45 @@ $SIG{CHLD} = \&sig_child; $window_splash->destroy; undef $window_splash; -eval { Gtk2->main } while 1; +Gtk2->main; + + + +#------------------------------------------------------------- +# socket/plug managment + +sub hide_socket_and_clean { + $emb_box->hide; + $pending_app = 0; + update_exp(); +} + +sub clean_socket { + hide_socket_and_clean(); +# map { kill 'TERM', $_ if defined $_ } @pid_launched; + &kill_children(); + $emb_socket and $emb_socket->destroy; # should not happen since our child should have cause the socket to be destroyes when it exited + undef $emb_socket; +} + +sub create_hidden_socket_if_needed { + hide_socket_and_clean(); # clean_socket(); + gtkpack($emb_box, $emb_socket = Gtk2::Socket->new) unless $emb_socket; + $emb_socket->hide; + $emb_wait->hide; +} + +sub update_exp { + return if $still_in_splash_screen || $pending_app; + if ($show_logs) { + $exp_frame->show_all; + } elsif ($exp_frame) { $exp_frame->hide } +} + + + +#------------------------------------------------------------- +# signals managment # got when child unexpectedly died and gone in zombie state sub sig_child { @@ -630,6 +701,10 @@ sub sig_usr2 { } + +#------------------------------------------------------------- +# processes managment + # embedded processes pid will be stocked there my @pid_launched; @@ -691,7 +766,7 @@ sub compute_exec_string { # (re)start logdrake if needed if ($show_logs && $freeze_log) { #FIXME && !$exp_socket my $exp_socket; - gtkadd($exp_frame, $exp_socket = Gtk2::Socket->new); + gtkadd($exp_frame, gtkset_name($exp_socket = Gtk2::Socket->new), 'mcc'); $exp_socket->realize; my $exec_log = "logdrake --explain=$log_exp --embedded " . $exp_socket->window->XWINDOW . " " . $$; $freeze_log = 0; @@ -712,27 +787,6 @@ sub launch_xapp { return $1; } -sub hide_socket_and_clean { - $emb_box->hide; - $pending_app = 0; - update_exp(); -} - -sub clean_socket { - hide_socket_and_clean(); -# map { kill 'TERM', $_ if defined $_ } @pid_launched; - &kill_children(); - $emb_socket and $emb_socket->destroy; # should not happen since our child should have cause the socket to be destroyes when it exited - undef $emb_socket; -} - -sub create_hidden_socket_if_needed { - hide_socket_and_clean(); # clean_socket(); - gtkpack($emb_box, $emb_socket = Gtk2::Socket->new) unless $emb_socket; - $emb_socket->hide; - $emb_wait->hide; -} - sub kill_children { map { if__($_, kill 'TERM', $_) } @pid_launched; @pid_launched = (); @@ -755,6 +809,11 @@ sub quit_global { Gtk2->exit(0); } + + +#------------------------------------------------------------- +# mcc dialog specific functions + sub splash_warning { my ($label, $cancel_button) = @_; my $ret; @@ -872,6 +931,10 @@ sub connect_to_site { } } + +#------------------------------------------------------------- +# mcc specific graphic functions: + sub set_page { my ($index) = @_; update_exp(); diff --git a/control-center.rc b/control-center.rc index 1b7d9b55..596f8710 100644 --- a/control-center.rc +++ b/control-center.rc @@ -21,459 +21,13 @@ # Authors: Thierry Vignaud <tvignaud@mandrakesoft.com> -pixmap_path "/usr/share/mcc/themes/default/" +# Default style for mcc specific widgets (mainly main_window and +# scrolled windows per mcc category -style "any" +style "mcc" { - fontset = "-adobe-helvetica-medium-r-normal--*-120-75-75-p-*-iso8859-*,*-r-*" bg[NORMAL] = { 1.0, 1.0, 1.0 } - bg[SELECTED] = { 0.0, 0.8, 0.3 } - bg[INSENSITIVE] = { 1.0, 1.0, 1.0 } - bg[ACTIVE] = { 1.0, 1.0, 1.0 } - bg[PRELIGHT] = { 1.0, 1.0, 1.0 } - - base[NORMAL] = { 1.0, 1.0, 1.0 } - base[SELECTED] = { 1.0, 1.0, 1.0 } - base[INSENSITIVE] = { 1.0, 1.0, 1.0 } - base[ACTIVE] = { 1.0, 1.0, 1.0 } - base[PRELIGHT] = { 1.0, 1.0, 1.0 } - - text[NORMAL] = { 0.0, 0.0, 0.0 } - text[SELECTED] = { 0.0, 0.0, 0.0 } - text[INSENSITIVE] = { 0.0, 0.0, 0.0 } - text[ACTIVE] = { 0.0, 0.0, 0.0 } - text[PRELIGHT] = { 0.0, 0.0, 0.0 } - - fg[NORMAL] = { 0.0, 0.0, 0.0 } - fg[SELECTED] = { 0.8, 0.8, 0.8 } - fg[INSENSITIVE] = { 1.0, 1.0, 0.0 } - fg[ACTIVE] = { 1.0, 1.0, 0.0 } - fg[PRELIGHT] = { 0.0, 0.3, 0.8 } - +# bg[PRELIGHT] = { 1.0, 1.0, 1.0 } } - -#widget_class "GtkWindow" style "window" -widget_class "*Area*" style "any" -#widget_class "*abel*" style "any" -#class "*" style "any" -#widget_class "*GtkSpin*" style "entry" -#widget_class "*GtkEntry*" style "entry" -#widget_class "*Gtk*List*" style "entry" -#widget_class "*GtkCTree*" style "entry" -#widget_class "*GtkNotebook*" style "notebook" -#widget "*GtkButton" style "button" -#widget "*background*" style "background" - -#class "GtkRadioButton" style "checkradiobutton" -#class "GtkCheckButton" style "checkradiobutton" - - - - - -# The syntax in the engine sections is a mess. Here are some hints: - -# gradient : '{' direction gradient-color-list '}' -# | '<' INT '>' -- palette ref - -# direction : /* nothing */ -# | VERTICAL -# | HORIZONTAL - -# gradient-color-list : color -# : color ',' gradient-color-list -# : color '[' weight ']' gradient-color-list - -# weight : FLOAT -# | INT - -# color : "#RRGGBB" -# | '{' FLOAT ',' FLOAT ',' FLOAT '}' -# | '<' color-ext '>' - -# color-ext : STRING -- file in $HOME to read color from -# | '<' INT '>' -- use indexed palette entry -# | '<' INT ',' FLOAT '>' -- multiply palette entry - -# Default style for all widgets to build from -style "default" -{ - GtkWidget::interior_focus = 0 - GtkWidget::focus_padding = 0 - GtkWidegt::focus_line_width = 3 - - GtkRange::slider_width = 11 - GtkRange::stepper_size = 11 - GtkRange::trough_border = 2 - - GtkScale::slider_length = 16 - GtkCheckButton::indicator_size = 10 - GtkCheckButton::indicator_spacing = 3 - - #GtkMenuBar::shadow_type = GTK_SHADOW_NONE - GtkToolBar::shadow_type = GTK_SHADOW_NONE - #GtkSpinButton::shadow_type = GTK_SHADOW_NONE - - GtkOptionMenu::indicator_size = { 11, 6 } - GtkOptionMenu::indicator_spacing = { 30, 5, 2, 2 } - - fg[NORMAL] = "#000000" - fg[ACTIVE] = "#000000" - fg[PRELIGHT] = "#000000" - fg[SELECTED] = "#ffffff" - fg[INSENSITIVE] = "#000000" - - bg[NORMAL] = "#dcdcdc" - bg[ACTIVE] = "#ababab" - bg[PRELIGHT] = "#f2f2f2" - bg[INSENSITIVE] = "#ffffff" - bg[SELECTED] = "#0A5F89" - - text[NORMAL] = "#000000" - text[ACTIVE] = "#ffffff" - text[PRELIGHT] = "#ffffff" - text[SELECTED] = "#ffffff" - text[INSENSITIVE] = "#ffffff" - - base[NORMAL] = "#ffffff" - base[PRELIGHT] = "#ffffff" - base[INSENSITIVE] = "#ffffff" - - engine "crux-engine" { - - # The focus/selection color - palette[0] = { "#21449c" } - - # The gradient used for recoloring images - palette[1] = { "#000000", <0>, "#ffffff" } - - # Used for recolouring inactive images - palette[2] = { "#000000", "#888888", "#ffffff" } - - # Set these colors here, so we can just reference the palette - bg[SELECTED] = <0> - base[SELECTED] = <0> - - focus_color = <0> - insensitive_colors = "#636563", "#cecfce" - - # Create the default (only) stock image table. This maps from - # identifiers used in the engine to reference image parts to - # the actual images, and sets attributes of the images - stock - { - "CHECK" { - image = "check-default.png" - } - "CHECK_FOCUS" { - image = "check-default-focus.png" - recolor = <1> - } - "CHECK_HI" { - image = "check-hilight.png" - } - "CHECK_HI_FOCUS" { - image = "check-hilight-focus.png" - recolor = <1> - } - "CHECK_PRESSED" { - image = "check-pressed.png" - } - "CHECK_PRESSED_FOCUS" { - image = "check-pressed-focus.png" - recolor = <1> - } - "CHECK_DISABLED" { - image = "check-insensitive.png" - } - "CHECK_ACTIVE" { - image = "check-active-default.png" - } - "CHECK_ACTIVE_FOCUS" { - image = "check-active-default-focus.png" - recolor = <1> - } - "CHECK_ACTIVE_HI" { - image = "check-active-hilight.png" - } - "CHECK_ACTIVE_HI_FOCUS" { - image = "check-active-hilight-focus.png" - recolor = <1> - } - "CHECK_ACTIVE_PRESSED" { - image = "check-active-pressed.png" - } - "CHECK_ACTIVE_PRESSED_FOCUS" { - image = "check-active-pressed-focus.png" - recolor = <1> - } - "CHECK_ACTIVE_DISABLED" { - image = "check-active-insensitive.png" - } - "OPTION" { - image = "radio-default.png" - } - "OPTION_FOCUS" { - image = "radio-default-focus.png" - recolor = <1> - } - "OPTION_HI" { - image = "radio-hilight.png" - } - "OPTION_HI_FOCUS" { - image = "radio-hilight-focus.png" - recolor = <1> - } - "OPTION_PRESSED" { - image = "radio-pressed.png" - } - "OPTION_PRESSED_FOCUS" { - image = "radio-pressed-focus.png" - recolor = <1> - } - "OPTION_DISABLED" { - image = "radio-insensitive.png" - } - "OPTION_ACTIVE" { - image = "radio-active-default.png" - } - "OPTION_ACTIVE_FOCUS" { - image = "radio-active-default-focus.png" - recolor = <1> - } - "OPTION_ACTIVE_HI" { - image = "radio-active-hilight.png" - } - "OPTION_ACTIVE_HI_FOCUS" { - image = "radio-active-hilight-focus.png" - recolor = <1> - } - "OPTION_ACTIVE_PRESSED" { - image = "radio-active-pressed.png" - } - "OPTION_ACTIVE_PRESSED_FOCUS" { - image = "radio-active-pressed-focus.png" - recolor = <1> - } - "OPTION_ACTIVE_DISABLED" { - image = "radio-active-insensitive.png" - } - "H_TROUGH" { - image = "scroller-h-trough.png" - border = { 28, 28, 2, 2 } - } - "V_TROUGH" { - image = "scroller-v-trough.png" - border = { 2, 2, 28, 28 } - } - "ARROW_UP" { - image = "scroller-arrow-up.png" - } - "ARROW_UP_HI" { - image = "scroller-arrow-up-hilight.png" - } - "ARROW_UP_ACTIVE" { - image = "scroller-arrow-up-pressed.png" - } - "ARROW_DOWN" { - image = "scroller-arrow-down.png" - } - "ARROW_DOWN_HI" { - image = "scroller-arrow-down-hilight.png" - } - "ARROW_DOWN_ACTIVE" { - image = "scroller-arrow-down-pressed.png" - } - "ARROW_RIGHT" { - image = "scroller-arrow-right.png" - } - "ARROW_RIGHT_HI" { - image = "scroller-arrow-right-hilight.png" - } - "ARROW_RIGHT_ACTIVE" { - image = "scroller-arrow-right-pressed.png" - } - "ARROW_LEFT" { - image = "scroller-arrow-left.png" - } - "ARROW_LEFT_HI" { - image = "scroller-arrow-left-hilight.png" - } - "ARROW_LEFT_ACTIVE" { - image = "scroller-arrow-left-pressed.png" - } - "H_SCROLLBAR" { - image = "scroller-h.png" - border = { 3, 3, 1, 1 } - recolor = <1> - } - "H_SCROLLBAR_HI" { - image = "scroller-h-hilight.png" - border = { 3, 3, 1, 1 } - recolor = <1> - } - "H_SCROLLBAR_INACTIVE" { - image = "scroller-h.png" - border = { 3, 3, 1, 1 } - recolor = <2> - } - "H_SCROLLBAR_THUMB" { - image = "scroller-h-thumb.png" - recolor = <1> - } - "H_SCROLLBAR_THUMB_HI" { - image = "scroller-h-thumb-hilight.png" - recolor = <1> - } - "H_SCROLLBAR_THUMB_INACTIVE" { - image = "scroller-h-thumb.png" - recolor = <2> - } - "V_SCROLLBAR" { - image = "scroller-v.png" - border = { 1, 1, 3, 3 } - recolor = <1> - } - "V_SCROLLBAR_HI" { - image = "scroller-v-hilight.png" - border = { 1, 1, 3, 3 } - recolor = <1> - } - "V_SCROLLBAR_INACTIVE" { - image = "scroller-v.png" - border = { 1, 1, 3, 3 } - recolor = <2> - } - "V_SCROLLBAR_THUMB" { - image = "scroller-v-thumb.png" - recolor = <1> - } - "V_SCROLLBAR_THUMB_HI" { - image = "scroller-v-thumb-hilight.png" - recolor = <1> - } - "V_SCROLLBAR_THUMB_INACTIVE" { - image = "scroller-v-thumb.png" - recolor = <2> - } - "PROGRESS_BAR" { - image = "progressbar.png" - border = { 4, 4, 1, 1 } - recolor = <1> - } - "PROGRESS_BAR_LEFT" { - image = "progressbar-left.png" - } - "PROGRESS_BAR_RIGHT" { - image = "progressbar-right.png" - border = { 0, 0, 2, 0 } - } - "PROGRESS_BAR_INACTIVE" { - image = "progressbar.png" - border = { 4, 4, 1, 1 } - recolor = <2> - } - "PROGRESS_TROUGH" { - image = "progressbar_trough.png" - border = { 6, 4, 6, 4 } - } - "H_SLIDER_THUMB" { - image = "slider_h_thumb.png" - border = { 4, 4, 1, 1 } - recolor = <1> - } - "H_SLIDER_THUMB_INACTIVE" { - image = "slider_h_thumb.png" - border = { 4, 4, 1, 1 } - recolor = <2> - } - "H_SLIDER_TROUGH" { - image = "slider_h_trough.png" - border = { 6, 6, 0, 0 } - } - "H_SLIDER_TROUGH_ACTIVE" { - image = "slider_h_trough_focus.png" - border = { 6, 6, 0, 0 } - recolor = <1> - } - "V_SLIDER_THUMB" { - image = "slider_v_thumb.png" - border = { 1, 1, 4, 4 } - recolor = <1> - } - "V_SLIDER_THUMB_INACTIVE" { - image = "slider_v_thumb.png" - border = { 1, 1, 4, 4 } - recolor = <2> - } - "V_SLIDER_TROUGH" { - image = "slider_v_trough.png" - border = { 0, 0, 6, 6 } - } - "V_SLIDER_TROUGH_ACTIVE" { - image = "slider_v_trough_focus.png" - border = { 0, 0, 6, 6 } - recolor = <1> - } - "TAB_TOP" { - image = "tab_usel.png" - border = { 4, 4, 10, 5 } - } - "TAB_TOP_LEFT" { - image = "tab_usel-left.png" - border = { 4, 4, 10, 5 } - } - "TAB_TOP_ACTIVE" { - image = "tab_sel.png" - border = { 4, 14, 10, 5 } - } - "TAB_BOTTOM" { - image = "tab_usel-bottom.png" - border = { 4, 4, 10, 5 } - } - "TAB_BOTTOM_LEFT" { - image = "tab_usel-bottom-left.png" - border = { 4, 4, 10, 5 } - } - "TAB_BOTTOM_ACTIVE" { - image = "tab_sel-bottom.png" - border = { 4, 4, 10, 5 } - } - "SPIN_ARROW_UP" { - image = "arrow_up-spinner.png" - } - "SPIN_ARROW_DOWN" { - image = "arrow_down-spinner.png" - } - } - } -} - -# common default -#class "GtkWidget" style "default" - - - -# MCC right icons: keep parent background on transparent parts -style "eventbox" -{ - # Causes the parent-relative feature of gdk_window_set_back_pixmap () - # to be used. - bg_pixmap[NORMAL] = "<parent>" - bg_pixmap[INSENSITIVE] = "<parent>" - bg_pixmap[PRELIGHT] = "<parent>" - bg_pixmap[SELECTED] = "<parent>" - bg_pixmap[ACTIVE] = "<parent>" - engine "crux-engine" {} -} - -# Ensure that there are no holes in tool bars, etc.. -class "GtkEventBox" style "eventbox" -class "GtkSocket" style "eventbox" -#class "GtkNotebook" style "eventbox" - - -# These don't work right with GTK2, ends up drawing black -#class "GtkPlug" style "eventbox" - +widget "*mcc*" style "mcc"
\ No newline at end of file diff --git a/drakconf.spec b/drakconf.spec index 9ccd90e0..fa49d7b8 100644 --- a/drakconf.spec +++ b/drakconf.spec @@ -20,7 +20,7 @@ BuildRequires: gettext Requires: mandrake-release, drakxtools >= 9.1-0.23mdk #gtk+mdk >= 0.1.6-10mdk Requires: harddrake-ui >= 9.1-0.23mdk, popt >= 1.6.4-24mdk, usermode -Requires: perl-GTK2 >= 0.0.cvs.2003.02.03.1-2mdk, gtk-engines2, XFree86-100dpi-fonts +Requires: perl-GTK2 >= 0.0.cvs.2003.02.03.1-2mdk, XFree86-100dpi-fonts Requires: gtk+2.0 >= 2.2.0-3mdk, perl-MDK-Common => 1.0.4-16mdk Requires: drakcronat >= 0.1.3-1mdk, menudrake >= 0.7.2-1mdk, rxvt, userdrake BuildRoot: %_tmppath/%name-%version-buildroot @@ -110,8 +110,8 @@ rm -rf $RPM_BUILD_ROOT %_datadir/mcc/themes/kde %changelog -* Thu Feb 6 2003 Damien Chaumette <dchaumette@mandrakesoft.com> 9.1-0.15mdk -- new default theme +* Mon Feb 10 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 9.1-0.15mdk +- new ln's icon set :-) * Wed Feb 5 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 9.1-0.14mdk - definitive fix for broken translation |