summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-03-17 18:46:17 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-03-17 18:46:17 +0000
commit22dc4e278c16da2aec68e922366a8f80504f0e3d (patch)
tree640f33e1c617c0b068e53390dfa8b70b99e2af68
parent5223e1bfd3c30a8fcfdb30adbbcecd0106902cd4 (diff)
downloadmgaonline-22dc4e278c16da2aec68e922366a8f80504f0e3d.tar
mgaonline-22dc4e278c16da2aec68e922366a8f80504f0e3d.tar.gz
mgaonline-22dc4e278c16da2aec68e922366a8f80504f0e3d.tar.bz2
mgaonline-22dc4e278c16da2aec68e922366a8f80504f0e3d.tar.xz
mgaonline-22dc4e278c16da2aec68e922366a8f80504f0e3d.zip
common::sprintf_fixutf8 is not needed with recent perl (#21589)
-rwxr-xr-xmdkapplet8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index ebc986a1..517b3f96 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -53,6 +53,10 @@ my $localfile = "$localdir/mdkonline";
my $release = mdkonline::get_release();
+sub my_sprintf_fixutf8 {
+ mdkonline::get_release < 2006.0 ? common::sprintf_fixutf8(@_) : @_;
+}
+
#compatibility
mkdir_p($localdir) if !-d $localdir;
-e "$ENV{HOME}/.mdkonline" and system("mv", "$ENV{HOME}/.mdkonline", $localfile);
@@ -244,7 +248,7 @@ sub refresh_contents {
my $contents = [ [ N("Network Connection: "), $color->{second} ], [ isNetwork() ? N("Up") . "\n" : N("Down") . "\n", isNetwork() ? $color->{third} : $color->{first} ],
[ N("Last check: "), $color->{second} ], [ "$last\n", $fixed_tag ],
[ N("Machine name:"), $color->{second} ], [ $h{MACHINE} . "\n", $fixed_tag ],
- [ N("Updates: "), $color->{second} ], [ common::sprintf_fixutf8($state{$status}{tt}[0]), $status eq 'okay' ? $color->{third} : $color->{first} ],
+ [ N("Updates: "), $color->{second} ], [ my_sprintf_fixutf8($state{$status}{tt}[0]), $status eq 'okay' ? $color->{third} : $color->{first} ],
];
$contents;
}
@@ -439,7 +443,7 @@ sub setState {
my $tmp = gtkcreate_pixbuf($state{$state_type}{colour}[0]);
$img->set_from_pixbuf($tmp);
#my $tooltip = Gtk2::Tooltips->new;
- gtkset_tip(new Gtk2::Tooltips, $eventbox, formatAlaTeX(common::sprintf_fixutf8(translate($state{$state_type}{tt}[0]))));
+ gtkset_tip(new Gtk2::Tooltips, $eventbox, formatAlaTeX(my_sprintf_fixutf8(translate($state{$state_type}{tt}[0]))));
my $menu = Gtk2::Menu->new;
foreach (@$arr) {
$menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label($actions{$_}{name})), activate => $actions{$_}{launch}));