changeset 1749:f549702f7b41

added possibility to use geeqie-rotate as a standalone script
author nadvornik
date Sun, 13 Sep 2009 09:55:21 +0000
parents 22c398d44d7a
children 067f08c0a9f8
files plugins/rotate/geeqie-rotate plugins/rotate/rotate.desktop.in
diffstat 2 files changed, 17 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/rotate/geeqie-rotate	Sat Sep 12 16:37:05 2009 +0000
+++ b/plugins/rotate/geeqie-rotate	Sun Sep 13 09:55:21 2009 +0000
@@ -47,13 +47,23 @@
     esac
 }
 
+get_sidecars=
+if [ "x$1" == "x-g" ] ; then
+    get_sidecars=yes
+    shift
+fi
+
 # iterate over files on commandline
 for file in "$@" ; do
-    # we got only one file for each group, typically the main one
-    # get the sidecars:
-    geeqie -r --get-sidecars:"$file" |while read sidecar ; do
-	# the main file is included in the sidecar file list, no special handling is required
-	rotate "$sidecar"
-    done
+    if [ -n "$get_sidecars" ] ; then
+        # we got only one file for each group, typically the main one
+        # get the sidecars:
+        geeqie -r --get-sidecars:"$file" |while read sidecar ; do
+            # the main file is included in the sidecar file list, no special handling is required
+            rotate "$sidecar"
+        done
+    else
+        rotate "$file"
+    fi
 done
 
--- a/plugins/rotate/rotate.desktop.in	Sat Sep 12 16:37:05 2009 +0000
+++ b/plugins/rotate/rotate.desktop.in	Sun Sep 13 09:55:21 2009 +0000
@@ -4,7 +4,7 @@
 _Name=Apply the orientation to image content
 
 # call the helper script
-Exec=geeqie-rotate %f
+Exec=geeqie-rotate -g %f
 
 # Desktop files that are usable only in Geeqie should be marked like this:
 Categories=X-Geeqie;