[autoshutdown] Fix patch.
authorhschang <chang@dev3>
Thu, 18 Dec 2014 01:56:11 +0000 (10:56 +0900)
committerhschang <chang@dev3>
Thu, 18 Dec 2014 01:56:11 +0000 (10:56 +0900)
meta-openvuplus/recipes-vuplus/e2openplugins/enigma2-plugin-systemplugins-autoshutdown.bb
meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-default-time_20121207.patch [deleted file]
meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-fix-standby_20140407.patch [deleted file]
meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-fix-standby_20141218.patch [new file with mode: 0644]

index adfd130..f8d871b 100644 (file)
@@ -11,11 +11,10 @@ PR = "r0"
 require openplugins.inc
 
 SRC_URI += " \
-        file://autoshutdown-default-time_20121207.patch \
-        file://autoshutdown-fix-standby_20140407.patch \
+        file://autoshutdown-fix-standby_20141218.patch \
 "
 
-inherit autotools
+inherit autotools-brokensep pkgconfig
 
 FILES_${PN} = "/"
 
diff --git a/meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-default-time_20121207.patch b/meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-default-time_20121207.patch
deleted file mode 100644 (file)
index 4cfaf21..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/src/plugin.py b/src/plugin.py
-index 4bb7533..4f90dae 100644
---- a/src/plugin.py
-+++ b/src/plugin.py
-@@ -27,7 +27,7 @@ from __init__ import _
- config.autoshutdown = ConfigSubsection()
- config.autoshutdown.time = ConfigInteger(default = 120, limits = (1, 1440))
--config.autoshutdown.inactivetime = ConfigInteger(default = 60, limits = (1, 1440))
-+config.autoshutdown.inactivetime = ConfigInteger(default = 300, limits = (1, 1440))
- config.autoshutdown.autostart = ConfigEnableDisable(default=True)
- config.autoshutdown.enableinactivity = ConfigEnableDisable(default=True)
- config.autoshutdown.inactivityaction = ConfigSelection(default = "standby", choices = [("standby", _("Standby")), ("deepstandby", _("Deepstandby"))])
-@@ -263,7 +263,7 @@ class AutoShutDownConfiguration(Screen, ConfigListScreen):
-                       config.autoshutdown.time.setValue(120)
-                       config.autoshutdown.autostart.setValue(1)
-                       config.autoshutdown.enableinactivity.setValue(1)
--                      config.autoshutdown.inactivetime.setValue(60)
-+                      config.autoshutdown.inactivetime.setValue(300)
-                       config.autoshutdown.inactivityaction.setValue("standby")
-                       config.autoshutdown.epgrefresh.setValue(1)
-                       config.autoshutdown.plugin.setValue(1)
diff --git a/meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-fix-standby_20140407.patch b/meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-fix-standby_20140407.patch
deleted file mode 100644 (file)
index d0ef227..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/src/plugin.py b/src/plugin.py
-index 4bb7533..61ba253 100644
---- a/src/plugin.py
-+++ b/src/plugin.py
-@@ -30,7 +30,7 @@ config.autoshutdown.time = ConfigInteger(default = 120, limits = (1, 1440))
- config.autoshutdown.inactivetime = ConfigInteger(default = 60, limits = (1, 1440))
- config.autoshutdown.autostart = ConfigEnableDisable(default=True)
- config.autoshutdown.enableinactivity = ConfigEnableDisable(default=True)
--config.autoshutdown.inactivityaction = ConfigSelection(default = "standby", choices = [("standby", _("Standby")), ("deepstandby", _("Deepstandby"))])
-+config.autoshutdown.inactivityaction = ConfigSelection(default = "standby", choices = [("standby", _("Idle Server Mode")), ("deepstandby", _("Standby"))])
- config.autoshutdown.inactivitymessage = ConfigYesNo(default=True)
- config.autoshutdown.messagetimeout = ConfigInteger(default = 5, limits = (1, 60))
- config.autoshutdown.epgrefresh = ConfigYesNo(default=True)
-@@ -99,7 +99,7 @@ class AutoShutDownActions:
-               if config.autoshutdown.inactivitymessage.value == True:
-                       self.asdkeyaction = None
-                       if config.autoshutdown.inactivityaction.value == "standby":
--                              self.asdkeyaction = _("Go to standby")
-+                              self.asdkeyaction = _("Go to idle server mode")
-                       elif config.autoshutdown.inactivityaction.value == "deepstandby":
-                               self.asdkeyaction = _("Power off STB")
-                       session.openWithCallback(shutdownactions.actionEndKeyTimer, MessageBox, _("AutoShutDown: %s ?") % self.asdkeyaction, MessageBox.TYPE_YESNO, timeout=config.autoshutdown.messagetimeout.value)
-@@ -207,7 +207,7 @@ class AutoShutDownConfiguration(Screen, ConfigListScreen):
-               self.list = []
-               self.list.append(getConfigListEntry(_("Enable AutoShutDown:"), config.autoshutdown.autostart))
-               if config.autoshutdown.autostart.value == True:
--                      self.list.append(getConfigListEntry(_("Time in standby for power off (min):"), config.autoshutdown.time))
-+                      self.list.append(getConfigListEntry(_("Time in idle server mode for power off (min):"), config.autoshutdown.time))
-               self.list.append(getConfigListEntry(_("Enable action after inactivity:"), config.autoshutdown.enableinactivity))
-               if config.autoshutdown.enableinactivity.value == True:
-                       self.list.append(getConfigListEntry(_("Time for inactivity (min):"), config.autoshutdown.inactivetime))
diff --git a/meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-fix-standby_20141218.patch b/meta-openvuplus/recipes-vuplus/e2openplugins/files/autoshutdown-fix-standby_20141218.patch
new file mode 100644 (file)
index 0000000..5adfa4c
--- /dev/null
@@ -0,0 +1,53 @@
+diff --git a/src/plugin.py b/src/plugin.py
+index f76f534..7493e67 100644
+--- a/src/plugin.py
++++ b/src/plugin.py
+@@ -39,7 +39,7 @@ config.autoshutdown.time = ConfigInteger(default = 120, limits = (1, 1440))
+ config.autoshutdown.inactivetime = ConfigInteger(default = 300, limits = (1, 1440))
+ config.autoshutdown.autostart = ConfigEnableDisable(default = False)
+ config.autoshutdown.enableinactivity = ConfigEnableDisable(default = False)
+-config.autoshutdown.inactivityaction = ConfigSelection(default = "standby", choices = [("standby", _("Standby")), ("deepstandby", _("Deepstandby"))])
++config.autoshutdown.inactivityaction = ConfigSelection(default = "standby", choices = [("standby", _("Idle Server Mode")), ("deepstandby", _("Standby"))])
+ config.autoshutdown.inactivitymessage = ConfigYesNo(default = True)
+ config.autoshutdown.messagetimeout = ConfigInteger(default = 20, limits = (1, 99))
+ config.autoshutdown.epgrefresh = ConfigYesNo(default = True)
+@@ -191,7 +191,7 @@ class AutoShutDownActions:
+                       if config.autoshutdown.inactivitymessage.value == True:
+                               self.asdkeyaction = None
+                               if config.autoshutdown.inactivityaction.value == "standby":
+-                                      self.asdkeyaction = _("Go to standby")
++                                      self.asdkeyaction = _("Go to idle server mode")
+                               elif config.autoshutdown.inactivityaction.value == "deepstandby":
+                                       self.asdkeyaction = _("Power off STB")
+                               if config.autoshutdown.play_media.value and os_path.exists(config.autoshutdown.media_file.value):
+@@ -268,12 +268,12 @@ def startSetup(menuid):
+ def Plugins(**kwargs):
+               if config.autoshutdown.plugin.value:
+                       return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart),
+-                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / standby"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup),
+-                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / standby"), where = PluginDescriptor.WHERE_PLUGINMENU, icon="autoshutdown.png", fnc=main),
+-                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / standby"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)]
++                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / idle mode"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup),
++                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / idle mode"), where = PluginDescriptor.WHERE_PLUGINMENU, icon="autoshutdown.png", fnc=main),
++                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / idle mode"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)]
+               else:
+                       return [PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart),
+-                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / standby"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup)]
++                              PluginDescriptor(name=_("AutoShutDown Setup"), description=_("configure automated power off / idle mode"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup)]
+ class AutoShutDownConfiguration(Screen, ConfigListScreen):
+       skin = """
+@@ -312,10 +312,10 @@ class AutoShutDownConfiguration(Screen, ConfigListScreen):
+       def createConfigList(self):
+               self.get_media = getConfigListEntry(_("Choose media file") + " (" + config.autoshutdown.media_file.value + ")", config.autoshutdown.fake_entry)
+               self.list = []
+-              self.list.append(getConfigListEntry("---------- " + _("Configuration for automatic power off in standby"), config.autoshutdown.fake_entry))
+-              self.list.append(getConfigListEntry(_("Enable automatic power off in standby:"), config.autoshutdown.autostart))
++              self.list.append(getConfigListEntry("---------- " + _("Configuration for automatic power off in idle server mode"), config.autoshutdown.fake_entry))
++              self.list.append(getConfigListEntry(_("Enable automatic power off in idle server mode:"), config.autoshutdown.autostart))
+               if config.autoshutdown.autostart.value == True:
+-                      self.list.append(getConfigListEntry(_("Time in standby for power off (min):"), config.autoshutdown.time))
++                      self.list.append(getConfigListEntry(_("Time in idle server mode for power off (min):"), config.autoshutdown.time))
+                       self.list.append(getConfigListEntry(_("Disable power off for given interval:"), config.autoshutdown.exclude_time_off))
+                       if config.autoshutdown.exclude_time_off.value:
+                               self.list.append(getConfigListEntry(_("Begin of excluded interval (hh:mm):"), config.autoshutdown.exclude_time_off_begin))