diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-10 01:02:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-10 01:02:50 +0000 |
commit | c66249b79aa9bfa0924494adcd5345b5b1244b0c (patch) | |
tree | 19a77c57cc41d8b522554fbde0c36d6f20d7dc7b /src/updates | |
download | gwenview-c66249b79aa9bfa0924494adcd5345b5b1244b0c.tar.gz gwenview-c66249b79aa9bfa0924494adcd5345b5b1244b0c.zip |
Added old abandoned KDE3 version of gwenview
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gwenview@1088034 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/updates')
-rw-r--r-- | src/updates/Makefile.am | 9 | ||||
-rwxr-xr-x | src/updates/gwenview_1.4_osdformat.sh | 43 | ||||
-rw-r--r-- | src/updates/gwenview_1.4_osdformat.upd | 4 | ||||
-rwxr-xr-x | src/updates/gwenview_1.4_osdformat_test.sh | 39 | ||||
-rw-r--r-- | src/updates/gwenview_thumbnail_size.sh | 12 | ||||
-rw-r--r-- | src/updates/gwenview_thumbnail_size.upd | 5 |
6 files changed, 112 insertions, 0 deletions
diff --git a/src/updates/Makefile.am b/src/updates/Makefile.am new file mode 100644 index 0000000..c246428 --- /dev/null +++ b/src/updates/Makefile.am @@ -0,0 +1,9 @@ +update_DATA = \ + gwenview_thumbnail_size.upd \ + gwenview_1.4_osdformat.upd + +update_SCRIPTS = \ + gwenview_thumbnail_size.sh \ + gwenview_1.4_osdformat.sh + +updatedir = $(kde_datadir)/kconf_update diff --git a/src/updates/gwenview_1.4_osdformat.sh b/src/updates/gwenview_1.4_osdformat.sh new file mode 100755 index 0000000..6a28550 --- /dev/null +++ b/src/updates/gwenview_1.4_osdformat.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# Escape backslashes. Shell sucks. +sed s'/\\/BACKSLASH/g' | ( + +osdMode= +while read line ; do + if echo $line | grep '^osd mode' >/dev/null 2>/dev/null ; then + osdMode=$(echo $line | sed 's/^.*=//') + continue + fi + if echo $line | grep '^free output format' >/dev/null 2>/dev/null ; then + freeOutputFormat=$(echo $line | sed -e 's/^.*=//') + continue + fi + echo $line +done + +case $osdMode in + 0) + osdFormat='' + ;; + 1) + osdFormat='%p' + ;; + 2) + osdFormat='%c' + ;; + 3) + osdFormat='%p\\n%c' + ;; + 4) + osdFormat="$freeOutputFormat" + ;; + *) + osdFormat='' + ;; +esac + +echo osdFormat=$osdFormat + +) | sed 's/BACKSLASH/\\/g' +# Escape backslashes. Shell sucks. diff --git a/src/updates/gwenview_1.4_osdformat.upd b/src/updates/gwenview_1.4_osdformat.upd new file mode 100644 index 0000000..52f341d --- /dev/null +++ b/src/updates/gwenview_1.4_osdformat.upd @@ -0,0 +1,4 @@ +Id=osdformat +File=gwenviewrc +Group=pixmap widget +Script=gwenview_1.4_osdformat.sh,sh diff --git a/src/updates/gwenview_1.4_osdformat_test.sh b/src/updates/gwenview_1.4_osdformat_test.sh new file mode 100755 index 0000000..ed555d7 --- /dev/null +++ b/src/updates/gwenview_1.4_osdformat_test.sh @@ -0,0 +1,39 @@ +#!/bin/sh +check() { + cat > src.txt <<EOF +$1 +EOF + cat > tmp.txt <<EOF +$2 +EOF + sort tmp.txt > wanted.txt + ./gwenview_1.4_osdformat.sh < src.txt | sort > dst.txt + if diff -uwB --brief wanted.txt dst.txt ; then + echo ok + else + echo " +-------------- +# From: +$1 +# To: +$2 +# Got: +" + cat dst.txt + echo "# Wanted:" + cat wanted.txt + echo " +-------------- +" + fi +} + +check "osd mode=0" "osdFormat=" +check "osd mode=1" "osdFormat=%p" +check "osd mode=2" "osdFormat=%c" +check "osd mode=3" "osdFormat=%p\\n%c" +check "osd mode=3 +something else" "osdFormat=%p\\n%c +something else" +check "osd mode=4 +free output format=zog\\nzog" "osdFormat=zog\\nzog" diff --git a/src/updates/gwenview_thumbnail_size.sh b/src/updates/gwenview_thumbnail_size.sh new file mode 100644 index 0000000..5e2872b --- /dev/null +++ b/src/updates/gwenview_thumbnail_size.sh @@ -0,0 +1,12 @@ +#! /bin/sh +while read line; do + if echo "$line" | grep '^thumbnail size=small' >/dev/null 2>/dev/null; then + echo "thumbnail size=48" + elif echo "$line" | grep '^thumbnail size=med' >/dev/null 2>/dev/null; then + echo "thumbnail size=96" + elif echo "$line" | grep '^thumbnail size=large' >/dev/null 2>/dev/null; then + echo "thumbnail size=128" + else + echo "$line" + fi +done diff --git a/src/updates/gwenview_thumbnail_size.upd b/src/updates/gwenview_thumbnail_size.upd new file mode 100644 index 0000000..dea652b --- /dev/null +++ b/src/updates/gwenview_thumbnail_size.upd @@ -0,0 +1,5 @@ +Id=gwenview_thumbnail_size +File=gwenviewrc +Group=file widget +Options=overwrite +Script=gwenview_thumbnail_size.sh,sh |