The branch, dharma-pre has been updated
       via  6c28654de0db2f44a7d5b2ff74c81008d38004c3 (commit)
      from  1b233f2a0668770c5f84ef7e4ff2694d55cc6264 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=6c28654de0db2f44a7d5b2ff74c81008d38004c3

commit 6c28654de0db2f44a7d5b2ff74c81008d38004c3
Author: spiff <[email protected]>
Date:   Tue Nov 16 11:59:20 2010 +0100

    [plugin.program.mceremote] updated to version 1.1.0

diff --git a/plugin.program.mceremote/ReadMeFirst.txt 
b/plugin.program.mceremote/ReadMeFirst.txt
index b6f64bd..ce0c41c 100644
--- a/plugin.program.mceremote/ReadMeFirst.txt
+++ b/plugin.program.mceremote/ReadMeFirst.txt
@@ -117,4 +117,4 @@ create one. Answer yes to create a template keyboard.xml 
that you can
 modify to your requirements.

 

 John Rennie

-15th October 2010

+16th November 2010

diff --git a/plugin.program.mceremote/addon.xml 
b/plugin.program.mceremote/addon.xml
index 3a097c1..75ae405 100644
--- a/plugin.program.mceremote/addon.xml
+++ b/plugin.program.mceremote/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

 <addon id="plugin.program.mceremote"

        name="MCERemote"

-       version="1.0.1"

+       version="1.1.0"

        provider-name="John Rennie">

   <requires>

     <import addon="xbmc.gui" version="2.11"/>

diff --git a/plugin.program.mceremote/changelog.txt 
b/plugin.program.mceremote/changelog.txt
index 40e92b0..3a033cf 100644
--- a/plugin.program.mceremote/changelog.txt
+++ b/plugin.program.mceremote/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 1.1.0 16th Nov 2010[/B]

+- Now uses KeyMapEdit to edit the keyboard.xml.

+

 [B]Version 1.0.1 9th Nov 2010[/B]

 - Updated icon - no other changes.

 

diff --git a/plugin.program.mceremote/default.py 
b/plugin.program.mceremote/default.py
index b6208c2..2bc1a9f 100644
--- a/plugin.program.mceremote/default.py
+++ b/plugin.program.mceremote/default.py
@@ -2,7 +2,7 @@
 ************************************************************************

 MCERemote Addon

 Author: John Rennie

-v1.0.0 17th Oct 2010

+v1.1.0 16th Nov 2010

 

 This addon allows you to configure a Microsoft MCE remote, or any

 compatible remote using the eHome driver.

@@ -454,9 +454,28 @@ def EditKeyboardDotXML():
         else:

             return

 

+# Check if we are updating KeyMapEdit.exe

+

+    doupdate = _settings.getSetting("update_keyedit")

+    if doupdate == "true":

+        if dialog.yesno("MCERemote", "Do you want to update the keymap 
editor", "from Sourceforge?"):

+            if GetKeyMapEdit():

+                _settings.setSetting("update_keyedit", "false")

+            else:

+                return

+

+# Select the keymap editor: if KeyMapEdit.exe exists use it, otherwise

+# use Notepad.

+

+    srcpath = xbmc.translatePath("special://home/") + "addons\\" + 
_thisPluginName + "\\resources\\data\\KeyMapEdit.exe"

+    if not os.path.isfile(srcpath):

+        srcpath = xbmc.translatePath("special://xbmc/") + "addons\\" + 
_thisPluginName + "\\resources\\data\\KeyMapEdit.exe"

+        if not os.path.isfile(srcpath):

+            srcpath = "notepad.exe"

+

 # Edit the keyboard.xml in Notepad

 

-    child = subprocess.Popen('notepad.exe "' + dstpath + '"')

+    child = subprocess.Popen(srcpath + ' "' + dstpath + '"')

     rc = child.wait()

     ourpath = xbmc.translatePath("special://xbmcbin/")

     child = subprocess.Popen(ourpath + "XBMC.exe")

@@ -530,6 +549,55 @@ def CreateKeyboardDotXML():
 

 

 # **********************************************************************

+# GetKeyMapEdit

+# -------------

+# Download the latest version of KeyMapEdit.exe from Sourceforge.

+# Return True or False to indicate whether the download succeeded.

+# **********************************************************************

+

+# _KEYMAPEDITURL = 
"http://sourceforge.net/projects/xbmcmce/files/KeyMapEdit.exe/download";

+_KEYMAPEDITURL = "http://swarchive.ratsauce.co.uk/XBMC/KeyMapEdit.exe";

+

+def GetKeyMapEdit():

+

+    import urllib

+

+    dialog = xbmcgui.Dialog()

+

+    dstpath = xbmc.translatePath("special://home/") + "addons\\" + 
_thisPluginName + "\\resources\\data\\KeyMapEdit.exe"

+

+    # Attempt to open KeymapEdit.exe from Sourceforge

+    try:

+        webFile = urllib.urlopen(_KEYMAPEDITURL)

+

+        # Attempt to open the local file

+        try:

+            localFile = open(dstpath, "wb")

+            localFile.write(webFile.read())

+            webFile.close()

+            localFile.close()

+

+        # Attempt to open KeyMapEdit.exe failed

+        except IOError, e:

+            dialog.ok("MCERemote", "Failed to open KeyMapEdit.exe:", 
str(e.args[1]))

+            return False

+        except:

+            dialog.ok("MCERemote", "Unidentified error downloading 
KeyMapEdit.exe")

+            return False

+

+    # Attempt to open Sourceforge failed

+    except IOError, e:

+        dialog.ok("MCERemote", "Failed to connect to Sourceforge:", 
str(e.args[1]))

+        return False

+    except:

+        dialog.ok("MCERemote", "Unidentified error connecting to Sourceforge")

+        return False

+

+    # Return indicating the file was successfully downloaded

+    return True

+

+

+# **********************************************************************

 # ReadInstructions

 # ----------------

 # Display the instructions in Notepad

diff --git a/plugin.program.mceremote/resources/language/English/strings.xml 
b/plugin.program.mceremote/resources/language/English/strings.xml
index 0c499a0..c31cc10 100644
--- a/plugin.program.mceremote/resources/language/English/strings.xml
+++ b/plugin.program.mceremote/resources/language/English/strings.xml
@@ -53,4 +53,7 @@
     <string id="40092">Green button</string>

     <string id="40093">Yellow button</string>

     <string id="40094">Blue button</string>

+    <!-- Strings: Misc Menu -->
+    <string id="49998">Misc settings</string>

+    <string id="41000">Update/install keymap editor</string>

 </strings>
diff --git a/plugin.program.mceremote/resources/settings.xml 
b/plugin.program.mceremote/resources/settings.xml
index de106b7..a71cf88 100644
--- a/plugin.program.mceremote/resources/settings.xml
+++ b/plugin.program.mceremote/resources/settings.xml
@@ -53,4 +53,7 @@
     <setting id="button_yellow"     type="text" label="40093" 
default="ctrl-alt-3"    />

     <setting id="button_blue"       type="text" label="40094" 
default="ctrl-alt-4"    />

   </category>
+  <category label="49998">
+    <setting id="update_keyedit"    type="bool" label="41000" default="yes"    
         />

+  </category>
 </settings>


-----------------------------------------------------------------------

Summary of changes:
 plugin.program.mceremote/ReadMeFirst.txt           |    2 +-
 plugin.program.mceremote/addon.xml                 |    2 +-
 plugin.program.mceremote/changelog.txt             |    3 +
 plugin.program.mceremote/default.py                |   72 +++++++++++++++++++-
 .../resources/language/English/strings.xml         |    3 +
 plugin.program.mceremote/resources/settings.xml    |    3 +
 6 files changed, 81 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to