diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-08-22 10:30:05 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-08-22 10:30:05 +0000 |
commit | 882124af495e159068baa5b8af35f9cb23d46edc (patch) | |
tree | 989cd9e3b30130f07f607aef804bb820f7952f44 /perl-install | |
parent | 07905ca96a681b8e161c0acc098fe51cb107cee6 (diff) | |
download | drakx-882124af495e159068baa5b8af35f9cb23d46edc.tar drakx-882124af495e159068baa5b8af35f9cb23d46edc.tar.gz drakx-882124af495e159068baa5b8af35f9cb23d46edc.tar.bz2 drakx-882124af495e159068baa5b8af35f9cb23d46edc.tar.xz drakx-882124af495e159068baa5b8af35f9cb23d46edc.zip |
CJK fixes: use newly introduced Gtk2::WrappedLabel package
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/draksec | 18 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 4 |
2 files changed, 7 insertions, 15 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec index 7432430e4..eac6ea205 100755 --- a/perl-install/standalone/draksec +++ b/perl-install/standalone/draksec @@ -42,7 +42,7 @@ my ($w, %fields); # factorize this with rpmdrake and harddrake2 sub wait_msg { my $mainw = ugtk2->new('wait', (modal => 1, if_(!$::isEmbedded, transient => $w->{rwindow}))); - $mainw->{window}->add(new Gtk2::Label($_[0])); + $mainw->{window}->add(new Gtk2::WrappedLabel($_[0])); $mainw->{rwindow}->show_all; gtkset_mousecursor_wait($mainw->{rwindow}->window); gtkflush(); @@ -52,7 +52,7 @@ sub wait_msg { sub remove_wait_msg { $_[0]->destroy } sub basic_seclevel_explanations() { - my $text = gtkset_markup(Gtk2::Label->new, + my $text = gtkset_markup(Gtk2::WrappedLabel->new, #-PO Do not alter the <span ..> and </span> tags #-PO Translate the security levels (Poor, Standard, High, Higher and Paranoid) in the same way, you translated these individuals words formatAlaTeX(N("Here, you can setup the security level and administrator of your machine. @@ -89,7 +89,6 @@ your machine is only a client on the Internet, you should choose a lower level. <span foreground=\"royalblue3\">Paranoid</span>: This is similar to the previous level, but the system is entirely closed and security features are at their maximum"))); - $text->set_line_wrap(1); create_scrolled_window($text, [ 'never', 'automatic' ]); } @@ -101,13 +100,6 @@ sub new_nonedit_combo { $w; } -sub new_wrapped_label { - my ($label) = @_; - my $w = gtkset_justify(Gtk2::Label->new($label), 'left'); - $w->set_line_wrap(1); - $w; -} - sub set_help_tip { my ($entry, $default, $opt) = @_; my $help = $security::help::help{$opt}; @@ -207,12 +199,12 @@ foreach ([ 'network', N("Network Options") ], [ 'system', N("System Options") ]) } $entry->set_text(to_i18n($msec->get_function_value($opt))); set_help_tip($entry, $default, $opt); - [ new_wrapped_label($i), resize($values{$i}) ]; + [ Gtk2::WrappedLabel->new($i), resize($values{$i}) ]; } sort map { $fields{$_} || $_ } $msec->list_functions($domain))), [ 'never', 'automatic' ], ) ), - new_wrapped_label($label)); + Gtk2::WrappedLabel->new($label)); $options_values{$domain} = \%values; } @@ -228,7 +220,7 @@ $notebook->append_page(gtkshow(create_scrolled_window(gtkpack_(new Gtk2::VBox(0, $security_checks_value{$i} = new_nonedit_combo([ 'yes', 'no', 'default' ], $msec->get_check_value($opt)); my $entry = $security_checks_value{$i}->entry; set_help_tip($entry, $msec->get_check_default($opt), $opt); - [ gtkshow(new_wrapped_label($i)), resize($security_checks_value{$i}) ]; + [ gtkshow(Gtk2::WrappedLabel->new($i)), resize($security_checks_value{$i}) ]; } sort map { $fields{$_} || $_ } $msec->list_checks)))), new Gtk2::Label(N("Periodic Checks"))); diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 5abda4fa8..df201986f 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -323,7 +323,7 @@ sub create_box_with_title { undef $::no_separator; my $new_label = sub { my ($txt) = @_; - my $w = ref($txt) ? $txt : gtkset_line_wrap(Gtk2::Label->new($txt), 1); + my $w = ref($txt) ? $txt : Gtk2::WrappedLabel->new($txt); gtkset_name($w, "Title"); }; if ($o->{icon} && (!$::isWizard || $::isInstall)) { @@ -377,7 +377,7 @@ sub create_dialog { my $ret = 0; my $dialog = _create_dialog($title, $o_options); $dialog->set_border_width(10); - my $text = $o_options->{use_markup} ? gtkset_markup(Gtk2::Label->new, $label) : Gtk2::Label->new($label); + my $text = $o_options->{use_markup} ? gtkset_markup(Gtk2::WrappedLabel->new, $label) : Gtk2::WrappedLabel->new($label); gtkpack($dialog->vbox, gtkpack_(Gtk2::HBox->new, if_($o_options->{stock}, 0, Gtk2::Image->new_from_stock($o_options->{stock}, 'dialog')), |