discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=51f18b86422aec617683170622d1e9eb0dfb45b6

commit 51f18b86422aec617683170622d1e9eb0dfb45b6
Author: Simon Lees <si...@simotek.net>
Date:   Tue Jul 14 13:07:18 2015 -0400

    enlightenment_remote: restore compatibility with older versions with bg-add 
/ bg-del
    
    Summary:
    older versions of enlightenment_remote had a additional first param that 
did nothing
    this change detects if that paramater is still passed in and ignores it. 
There are
    a couple of applications including variety that rely on this behavior as 
well as some
    user scripts
    
    Reviewers: zmike, raster
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2813
---
 data/tools/enlightenment_remote | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/data/tools/enlightenment_remote b/data/tools/enlightenment_remote
index 3f20433..dd4ddf1 100644
--- a/data/tools/enlightenment_remote
+++ b/data/tools/enlightenment_remote
@@ -342,14 +342,26 @@ er_desktop_show_by_name(){
 #   E Desktop background add
 
#-------------------------------------------------------------------------------
 er_desktop_bg_add(){
-   ERCIIIS org.enlightenment.wm.Desktop.Background.Add "$2" "$3" "$4" "$5"
+   # retain compatibility with the older versions by optionally supporting them
+   # no longer required parameter
+   if [ $# -eq 6 ]; then
+      ERCIIIS org.enlightenment.wm.Desktop.Background.Add "$3" "$4" "$5" "$6"
+   elif [ $# -eq 5 ]; then
+      ERCIIIS org.enlightenment.wm.Desktop.Background.Add "$2" "$3" "$4" "$5"
+   fi
 }
 
 
#-------------------------------------------------------------------------------
 #   E Desktop background del
 
#-------------------------------------------------------------------------------
 er_desktop_bg_del(){
-   ERCIII org.enlightenment.wm.Desktop.Background.Del "$2" "$3" "$4"
+   # retain compatibility with the older versions by optionally supporting them
+   # no longer required parameter
+   if [ $# -eq 5 ]; then
+      ERCIII org.enlightenment.wm.Desktop.Background.Del "$3" "$4" "$5"
+   elif [ $# -eq 4 ]; then
+      ERCIII org.enlightenment.wm.Desktop.Background.Del "$2" "$3" "$4"
+   fi
 }
 
 
#-------------------------------------------------------------------------------

-- 


Reply via email to