summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}));