tazpkg rev 97
tazpkgbox: add files button
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 20 10:17:33 2008 +0000 (2008-05-20) |
parents | c48294925d77 |
children | 7cfc23ba1a4d |
files | lib/tazpkgbox/package_infos |
line diff
1.1 --- a/lib/tazpkgbox/package_infos Mon May 19 21:32:24 2008 +0000 1.2 +++ b/lib/tazpkgbox/package_infos Tue May 20 10:17:33 2008 +0000 1.3 @@ -7,6 +7,33 @@ 1.4 1.5 PKG=`cat /tmp/tazpkgbox/pkg | sed s/" "/""/g` 1.6 1.7 +if [ "$1" = "list_files" ]; then 1.8 + tazpkg list-files $2 | awk ' 1.9 +BEGIN { ls=0 } { 1.10 + if (/^===/) ls=1-ls; 1.11 + else if (ls) system("stat -c \"%A|%U|%G|%s|%n\" " $0); 1.12 +}' 1.13 + exit 0 1.14 +fi 1.15 + 1.16 +export LIST_FILES=" 1.17 +<window title=\"$PKG files\" icon-name=\"system-file-manager\"> 1.18 + <vbox> 1.19 + <tree> 1.20 + <width>600</width><height>160</height> 1.21 + <label>Access | User | Group | Size | Name</label> 1.22 + <input> $0 list_files $PKG </input> 1.23 + </tree> 1.24 + <hbox> 1.25 + <button> 1.26 + <input file icon=\"gtk-close\"></input> 1.27 + <action type=\"closewindow\">INSTALLED_PACKAGE_ACTIONS</action> 1.28 + </button> 1.29 + </hbox> 1.30 + </vbox> 1.31 +</window> 1.32 +" 1.33 + 1.34 # Installed or not installed, that the question. 1.35 if [ -d /var/lib/tazpkg/installed/$PKG ]; then 1.36 PACKED_SIZE="" 1.37 @@ -75,6 +102,11 @@ 1.38 <action type=\"closewindow\">INSTALLED_PACKAGE_ACTIONS</action> 1.39 </button> 1.40 <button> 1.41 + <label>Files</label> 1.42 + <input file icon=\"tazpkg\"></input> 1.43 + <action type=\"launch\">LIST_FILES</action> 1.44 + </button> 1.45 + <button> 1.46 <input file icon=\"gtk-close\"></input> 1.47 <action type=\"closewindow\">INSTALLED_PACKAGE_ACTIONS</action> 1.48 </button>