tazpkg rev 243
tazpkgbox: add icons in undigest tree
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 06 09:20:17 2009 +0000 (2009-03-06) |
parents | 034f41f75b96 |
children | 174934be85f9 |
files | lib/tazpkgbox/list tazpkgbox |
line diff
1.1 --- a/lib/tazpkgbox/list Thu Mar 05 19:49:43 2009 +0100 1.2 +++ b/lib/tazpkgbox/list Fri Mar 06 09:20:17 2009 +0000 1.3 @@ -12,7 +12,12 @@ 1.4 else 1.5 cat /var/lib/tazpkg/undigest/*/packages.desc 1.6 fi 2> /dev/null | sort | while read PACKAGE VERSION SHORT_DESC; do 1.7 - echo "$PACKAGE|$VERSION|$SHORT_DESC" 1.8 + ICON=tazpkg 1.9 + if [ -d /var/lib/tazpkg/installed/${PACKAGE%% *} ]; then 1.10 + . /var/lib/tazpkg/installed/${PACKAGE%% *}/receipt 1.11 + ICON=tazpkg-installed 1.12 + fi 1.13 + echo "$ICON|$PACKAGE|$VERSION|$SHORT_DESC" 1.14 done 1.15 unset IFS 1.16 } 1.17 @@ -53,12 +58,12 @@ 1.18 # Check first for category for more speed. 1.19 CATEGORY=${CATEGORY%| *} 1.20 if [ "$CAT" == "all" ] || [ "$CATEGORY" == " $CAT " ]; then 1.21 + ICON=tazpkg 1.22 if [ -d /var/lib/tazpkg/installed/${PACKAGE%% *} ]; then 1.23 . /var/lib/tazpkg/installed/${PACKAGE%% *}/receipt 1.24 - echo "tazpkg-installed|$PACKAGE|$VERSION|$SHORT_DESC" 1.25 - else 1.26 - echo "tazpkg|$PACKAGE|$VERSION|$SHORT_DESC" 1.27 + ICON=tazpkg-installed 1.28 fi 1.29 + echo "$ICON|$PACKAGE|$VERSION|$SHORT_DESC" 1.30 fi 1.31 done 1.32 unset IFS
2.1 --- a/tazpkgbox Thu Mar 05 19:49:43 2009 +0100 2.2 +++ b/tazpkgbox Fri Mar 06 09:20:17 2009 +0000 2.3 @@ -265,8 +265,8 @@ 2.4 <tree> 2.5 <width>620</width><height>240</height> 2.6 <variable>DEV</variable> 2.7 - <label>Package name|Version|Description</label> 2.8 - <input>$LIB/list undigest</input> 2.9 + <label>Name|Version|Description</label> 2.10 + <input icon_column="0">$LIB/list undigest</input> 2.11 <action>echo "$DEV" > /tmp/tazpkgbox/pkg</action> 2.12 <action>$LIB/package_infos</action> 2.13 <action>refresh:PKG</action>