summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-01-27 08:28:02 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-01-27 08:28:02 +0000
commitcb59a78687b5744b32f6bf02a0a7c7c2dfc99281 (patch)
tree5429767b788e18e5b532a57ce4f3109971f8c478
parentb052bf2a5ed7d60f9d956cb36a3dda602c218015 (diff)
downloadcontrol-center-cb59a78687b5744b32f6bf02a0a7c7c2dfc99281.tar
control-center-cb59a78687b5744b32f6bf02a0a7c7c2dfc99281.tar.gz
control-center-cb59a78687b5744b32f6bf02a0a7c7c2dfc99281.tar.bz2
control-center-cb59a78687b5744b32f6bf02a0a7c7c2dfc99281.tar.xz
control-center-cb59a78687b5744b32f6bf02a0a7c7c2dfc99281.zip
better fix for inexistant widgets because of i18n bugs
(this will only result in no entry menu to switch that or that option) also, it has the nice side effet to keep current options setting on exit even for eg: wizard option wich can only be set when wizards are installed. thus if one remove wizards, his wizard options are kept and will be there as before when he'll install them back. btw, we should really write a tool to check po so that menu entrys are always translated the same way, whether they have the _ (menu declaration for key shortcuts) or not (widget access by path), else it badly broke widget access. and we should enforce its execution on commit to prevent having broken translations in cvs.
-rwxr-xr-xcontrol-center14
1 files changed, 7 insertions, 7 deletions
diff --git a/control-center b/control-center
index a5d0eb9d..6d6af974 100755
--- a/control-center
+++ b/control-center
@@ -537,14 +537,14 @@ sub update_exp {
$emb_box->set_size_request(-1, $index * 50);
-eval {
- if (defined $show_log_check_box) {
- $show_log_check_box->set_active($show_logs);
- $embedded_check_box->set_active($embedded);
- $expert_wizard_check_box->set_active($expert_wizard) if $::isWiz;
- };
+foreach([ $show_log_check_box, $show_logs ], [ $embedded_check_box, $embedded ], if_($::isWiz, [ $expert_wizard_check_box, $expert_wizard ])) {
+ my ($widget, $value) = @$_;
+ if (defined $widget) {
+ $widget->set_active($value);
+ } else {
+ print STDERR "BUG with LANGUAGE $ENV{LANGUAGE}\n";
+ }
};
-print STDERR "BUG with LANGUAGE $ENV{LANGUAGE}\n" if $@;
hide_socket_and_clean();