diff options
-rwxr-xr-x | control-center | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/control-center b/control-center index 8ebb258a..a53a2db8 100755 --- a/control-center +++ b/control-center @@ -60,7 +60,6 @@ require_root_capability() if !$::testing; # just to get root capabilities # read configuration, set themes, ... my %h = getVarsFromSh($conffile); my %class = getVarsFromSh($class_install); -$h{THEME} ||= 'default'; $h{LOGS} ||= bool2text($class{CLASS} eq 'expert' ? 1 : 0); $h{EXPERT_WIZARD} ||= 0; $h{HEIGTH} ||= $default_height; @@ -68,12 +67,10 @@ $h{WIDTH} ||= $default_width; my %option_values; $option_values{show_log} = text2bool($h{LOGS}); -my $theme = $h{THEME}; my $program; my ($i, $geometry, $save_html); foreach (@ARGV) { $i++; - $theme = $1 if /--theme (\w+)/; $program = $1 if /--start-with=(.*)/; if (/^--geometry$/) { $geometry = splice @ARGV, $i, 1; @@ -82,12 +79,10 @@ foreach (@ARGV) { $save_html = 1 if /--save-html-pages/; } --d "$themes_dir/$theme" or $theme = 'default'; -add_icon_path("$themes_dir/$theme/"); -add_icon_path("$themes_dir/default") if $theme ne 'default'; # fall back if theme miss some icons +add_icon_path("$themes_dir/default"); mygtk3::import_style_ressources(); -my $css = find { -r $_ } ("$themes_dir/$theme/mcc.css", if_($theme ne 'default', "$themes_dir/default/mcc.css")); +my $css = "$themes_dir/default/mcc.css"; my $pl = Gtk3::CssProvider->new; $pl->load_from_path($css); Gtk3::StyleContext::add_provider_for_screen(Gtk3::Gdk::Screen::get_default(), $pl, Gtk3::STYLE_PROVIDER_PRIORITY_APPLICATION); @@ -611,8 +606,6 @@ my $pending_app = 0; my $help_on_context = 'drakconf-intro'; -my @themes = grep { -d "$themes_dir/$_" } all($themes_dir); - #-PO Translators, please keep all "/" charaters !!! my %options = ( 'show_log' => [ N("/_Options"), N("/Display _Logs") ], @@ -651,25 +644,6 @@ my @menu_items = ( undef, '<CheckItem>', ], ), - if_(@themes > 1, - [ N("/_Themes"), undef, undef, undef, '<Branch>' ], - (map { - my $name = $_; - [ N("/_Themes") . "/" . ($name eq $theme ? " O " : " ") . "_$_", undef, - sub { - return if $theme eq $name; - !$pending_app || splash_warning(N("This action will restart the control center.\nAny change not applied will be lost."), 1) and do { - # embedded app must be killed - kill_children(); - kill_logdrake(); - child_just_exited(); - exec "$0 --theme $name"; - }; - }, undef, '<CheckItem>' - ]; - } @themes), - [ N("/_Themes") . N("/_More themes"), undef, \&more_themes, undef, '<Item>' ] - ), [ N("/_Help"), undef, undef, undef, '<Branch>' ], [ N("/_Help") . N("/_Help"), undef, \&run_help, undef, '<Item>', N("Help") ], [ N("/_Help") . N("/_Release notes"), undef, sub { run_browser('Release_Notes') }, undef, '<Item>', N("Help") ], @@ -1347,7 +1321,6 @@ sub quit_global() { EXPERT_WIZARD => bool2text($option_values{expert_wizard}), HEIGTH => $y, WIDTH => $x, - THEME => $theme, }); gtkset_mousecursor_normal(); standalone::exit(0); @@ -1411,19 +1384,6 @@ sub new_dialog { gtkset_modal($dialog, 1); } -sub more_themes() { - my $window_about = new_dialog(N("More themes")); - gtkpack_($window_about->vbox, - 0, Gtk3::Label->new(N("Getting new themes")), - 0, gtkadd(gtkset_shadow_type(gtkset_border_width(Gtk3::Frame->new(N("Additional themes")), 10), 'etched_out'), - gtkpack(Gtk3::HBox->new(0, 5), - N("Get additional themes on www.damz.net"), - ) - ) - ); - $window_about->show_all; -} - sub about_mga_cc() { my $window_about = new_dialog(N("About - %s Control Center", $branding)); my $tree_model = Gtk3::TreeStore->new("Glib::String", "Glib::String", "Glib::String"); |