Merge remote branch 'origin/bug_380_stop_service_entering_tuner_setup'
authorghost <andreas.monzner@multimedia-labs.de>
Wed, 27 Jan 2010 09:51:41 +0000 (10:51 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Wed, 27 Jan 2010 09:51:41 +0000 (10:51 +0100)
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/HDMI.png [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Videomode/Makefile.am
lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
lib/python/Plugins/SystemPlugins/Videomode/lcd_HDMI.png [new file with mode: 0644]
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/PluginBrowser.py
lib/service/servicedvb.cpp

index f61ea53..b20ba51 100755 (executable)
@@ -137,8 +137,8 @@ class UpdatePluginMenu(Screen):
                        self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext, None))
                        self.list.append(("backuplocation", _("Choose backup location"),  _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext, None))
                        self.list.append(("backupfiles", _("Choose backup files"),  _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext, None))
-                       #if config.usage.setup_level.index >= 2: # expert+
-                       #       self.list.append(("ipkg-manager", _("Packet management"),  _("\nView, install and remove available or installed packages." ) + self.oktext, None))
+                       if config.usage.setup_level.index >= 2: # expert+
+                               self.list.append(("ipkg-manager", _("Packet management"),  _("\nView, install and remove available or installed packages." ) + self.oktext, None))
                        self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext, None))
                        for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER):
                                if p.__call__.has_key("AdvancedSoftwareSupported"):
@@ -326,10 +326,12 @@ class PluginManager(Screen, DreamInfoHandler):
                        <widget source="status" render="Label" position="5,410" zPosition="10" size="540,30" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />
                </screen>"""
 
-       def __init__(self, session, plugin_path, args = None):
+       def __init__(self, session, plugin_path = None, args = None):
                Screen.__init__(self, session)
                self.session = session
                self.skin_path = plugin_path
+               if self.skin_path == None:
+                       self.skin_path = resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager")
 
                self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions", "HelpActions" ],
                {
@@ -634,7 +636,7 @@ class PluginManager(Screen, DreamInfoHandler):
                        elif tag == 'Default':
                                return(( _("Default Settings"), _("View list of available default settings" ), tag, divpng ))
                        elif tag == 'SAT':
-                               return(( _("Satteliteequipment"), _("View list of available Satteliteequipment extensions." ), tag, divpng ))
+                               return(( _("Satellite equipment"), _("View list of available Satellite equipment extensions." ), tag, divpng ))
                        elif tag == 'Software':
                                return(( _("Software"), _("View list of available software extensions" ), tag, divpng ))
                        elif tag == 'Multimedia':
@@ -818,7 +820,7 @@ class PluginManagerHelp(Screen):
                        <widget source="list" render="Listbox" position="5,50" size="550,350" scrollbarMode="showOnDemand" selectionDisabled="1">
                                <convert type="TemplatedMultiContent">
                                        {"template": [
-                                                       MultiContentEntryText(pos = (50, 0), size = (150, 26), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name
+                                                       MultiContentEntryText(pos = (50, 0), size = (540, 26), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name
                                                        MultiContentEntryText(pos = (50, 27), size = (540, 23), font=1, flags = RT_HALIGN_LEFT, text = 1), # index 1 is the state
                                                        MultiContentEntryPixmapAlphaTest(pos = (0, 1), size = (48, 48), png = 2), # index 2 is the status pixmap
                                                        MultiContentEntryPixmapAlphaTest(pos = (0, 48), size = (550, 2), png = 3), # index 3 is the div pixmap
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/HDMI.png b/lib/python/Plugins/SystemPlugins/Videomode/HDMI.png
new file mode 100644 (file)
index 0000000..5aa8304
Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/Videomode/HDMI.png differ
index 2ec0b33..1ac1d5d 100644 (file)
@@ -16,4 +16,6 @@ dist_install_DATA = \
        LICENSE \
        Scart.png \
        videowizard.xml \
-       YPbPr.png
+       YPbPr.png \
+       HDMI.png \
+       lcd_HDMI.png
index 512bcec..15f4d51 100644 (file)
@@ -99,7 +99,10 @@ class VideoWizard(WizardLanguage, Rc):
                print "input selection moved:", self.selection
                self.inputSelect(self.selection)
                if self["portpic"].instance is not None:
-                       self["portpic"].instance.setPixmapFromFile(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/" + self.selection + ".png"))
+                       picname = self.selection
+                       if picname == "DVI" and HardwareInfo().get_device_name() == "dm500hd":
+                               picname = "HDMI"
+                       self["portpic"].instance.setPixmapFromFile(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/" + picname + ".png"))
                
        def inputSelect(self, port):
                print "inputSelect:", port
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/lcd_HDMI.png b/lib/python/Plugins/SystemPlugins/Videomode/lcd_HDMI.png
new file mode 100644 (file)
index 0000000..425da5c
Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/Videomode/lcd_HDMI.png differ
index 7ae0b12..ca9ba55 100644 (file)
@@ -2014,8 +2014,10 @@ class InfoBarCueSheetSupport:
 
                        if last is not None:
                                self.resume_point = last
+                               
+                               l = last / 90000
                                if config.usage.on_movie_start.value == "ask":
-                                       Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?"), timeout=10)
+                                       Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?") + "\n" + (_("Resume position at %s") % ("%d:%02d:%02d" % (l/3600, l%3600/60, l%60))), timeout=10)
                                elif config.usage.on_movie_start.value == "resume":
 # TRANSLATORS: The string "Resuming playback" flashes for a moment
 # TRANSLATORS: at the start of a movie, when the user has selected
index cce08ae..69bf80f 100755 (executable)
@@ -38,7 +38,12 @@ class PluginBrowser(Screen):
                        "red": self.delete,
                        "green": self.download
                })
+               self["SoftwareActions"] = ActionMap(["ColorActions"],
+               {
+                       "red": self.openExtensionmanager
+               })
                self["PluginDownloadActions"].setEnabled(False)
+               self["SoftwareActions"].setEnabled(False)
                self.onFirstExecBegin.append(self.checkWarnings)
                self.onShown.append(self.updateList)
        
@@ -62,12 +67,14 @@ class PluginBrowser(Screen):
                self.list = [PluginEntryComponent(plugin) for plugin in self.pluginlist]
                self["list"].l.setList(self.list)
                if fileExists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/plugin.py")):
-                       self["red"].setText("")
+                       self["red"].setText(_("Manage extensions"))
                        self["green"].setText("")
+                       self["SoftwareActions"].setEnabled(True)
                        self["PluginDownloadActions"].setEnabled(False)
                else:
                        self["red"].setText(_("Remove Plugins"))
                        self["green"].setText(_("Download Plugins"))
+                       self["SoftwareActions"].setEnabled(False)
                        self["PluginDownloadActions"].setEnabled(True)
                        
        def delete(self):
@@ -80,6 +87,14 @@ class PluginBrowser(Screen):
                self.updateList()
                self.checkWarnings()
 
+       def openExtensionmanager(self):
+               if fileExists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/plugin.py")):
+                       try:
+                               from Plugins.SystemPlugins.SoftwareManager.plugin import PluginManager
+                       except ImportError:
+                               self.session.open(MessageBox, _("The Softwaremanagement extension is not installed!\nPlease install it."), type = MessageBox.TYPE_INFO,timeout = 10 )
+                       else:
+                               self.session.openWithCallback(self.PluginDownloadBrowserClosed, PluginManager)
 
 class PluginDownloadBrowser(Screen):
        DOWNLOAD = 0
index 615329c..1a3cb0e 100644 (file)
@@ -1128,11 +1128,7 @@ RESULT eDVBServicePlay::stop()
                        
                        if (length)
                        {
-                               int perc = play_position * 100LL / length;
-                       
-                                       /* only store last play position when between 1% and 99% */
-                               if ((1 < perc) && (perc < 99))
-                                       m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */
+                               m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */
                        }
                        m_cuesheet_changed = 1;
                }