# HG changeset patch # User Christophe Lincoln # Date 1302278307 -7200 # Node ID 7e0df4f72628cb16561fa96ce46acc6bb51aa6ce # Parent c441556c981efedf9e2e925e8be3d0261ce86300 Arf ust tagued and must push some some fix due to tazpkg change and new packages.up diff -r c441556c981e -r 7e0df4f72628 Makefile --- a/Makefile Fri Apr 08 17:15:41 2011 +0200 +++ b/Makefile Fri Apr 08 17:58:27 2011 +0200 @@ -25,6 +25,11 @@ @for l in $(LINGUAS); do \ echo -n "Updating $$l po file."; \ msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \ + echo -n "Updating $$l po file."; \ + if [ -f "po/tazpkg-notify/$$l.po" ]; then; \ + msgmerge -U po/tazpkg-notify/$$l.po \ + po/tazpkg-notify/tazpkg-notify.pot; \ + fi; \ done; msgfmt: diff -r c441556c981e -r 7e0df4f72628 tazpkg-notify --- a/tazpkg-notify Fri Apr 08 17:15:41 2011 +0200 +++ b/tazpkg-notify Fri Apr 08 17:58:27 2011 +0200 @@ -22,7 +22,7 @@ TEXTDOMAIN='tazpkg-notify' export TEXTDOMAIN -up=`cat $LOCALSTATE/upgradeable-packages.list | wc -l` +up=`cat $LOCALSTATE/packages.up | wc -l` rel=`cat /etc/slitaz-release` # Kill the notification icon after user pressed on it. @@ -33,16 +33,16 @@ done } -# Message for upgradeable -upgradeable_msg() { - eval_gettext "There is \$up upgradeable packages for your SliTaz \$ver +# Message for up +up_msg() { + eval_gettext "There is \$up upgradeable packages for your SliTaz \$rel You should upgrade your system to get all latest fixes and improvments from SliTaz contributors" } # Message for list older than 10 days old_list_msg() { - eval_gettext "Your SliTaz \$ver packages list is older than 10 days. + eval_gettext "Your SliTaz \$rel packages list is older than 10 days. You should recharge the list to check for updates" } @@ -54,9 +54,9 @@ } # -# Main GUI box for upgradeable packages +# Main GUI box for up packages # -upgradeable_main() { +up_main() { yad --text --width=400 \ --geometry="$NOTIFY_GEOM" \ --undecorated \ @@ -64,29 +64,29 @@ --image="tazpkg" \ --image-on-top \ --on-top \ - --text="`upgradeable_msg`" \ + --text="`up_msg`" \ --button="`gettext \"Upgrade:2\"`" \ --button="gtk-close:1" } -# Notification icon for upgradeable packages -upgradeable_notify() { +# Notification icon for up packages +up_notify() { yad --notification \ --image=tazpkg \ - --text="`upgradeable_msg`" \ + --text="`up_msg`" \ --command="tazpkg-notify upgrade" } -# Main upgradeable function -upgradeable() { +# Main up function +up() { # Store box results - main=`upgradeable_main` + main=`up_main` ret=$? kill_notification # Deal with --button values case $ret in 1) exit 0 ;; - #tazweb http://tazpanel:8090/pkgs.cgi?upgradeable & + #tazweb http://tazpanel:8090/pkgs.cgi?up & 2) subox tazpkgbox & ;; *) continue ;; esac @@ -177,7 +177,7 @@ case $1 in upgrade) - upgradeable ;; + up ;; old-list) old_list ;; no-list) @@ -186,8 +186,8 @@ # Sleep first to let tazpkg upgrade on boot finish. Check if # any upgrade, then for an old list and then if any list at all # (live or first boot) - #sleep 15 - [ "$up" -gt 0 ] && upgradeable_notify && exit 0 + sleep 10 + [ "$up" -gt 0 ] && up_notify && exit 0 mtime=`find /var/lib/tazpkg/packages.list -mtime +10;` [ "$mtime" ] && old_list_notify && exit 0 [ ! -f $LOCALSTATE/packages.list ] && no_list_notify \