def restartGUI(self, answer): if answer is True: try: if config.skin.primary_skin.value == "MetrixHD/skin.MySkin.xml": from Plugins.Extensions.MyMetrixLite.ActivateSkinSettings import ActivateSkinSettings ActivateSkinSettings().RefreshIcons(True) #restore default icons except: pass config.skin.primary_skin.value = self.skinfile config.skin.primary_skin.save() self.session.open(TryQuitMainloop, 3)
def restoreMetrixHD( self ): # TODO: call this only after metrix update / move this to Metrix Plugin try: if config.skin.primary_skin.value == "MetrixHD/skin.MySkin.xml": if not exists("/usr/share/enigma2/MetrixHD/skin.MySkin.xml"): from Plugins.SystemPlugins.SoftwareManager.BackupRestore import RestoreMyMetrixHD self.session.openWithCallback(self.restoreMetrixHDCallback, RestoreMyMetrixHD) return elif config.plugins.MyMetrixLiteOther.EHDenabled.value != '0': from Plugins.Extensions.MyMetrixLite.ActivateSkinSettings import ActivateSkinSettings ActivateSkinSettings().RefreshIcons() except: pass self.restoreMetrixHDCallback()
def restoreSkin(self): try: from Plugins.Extensions.MyMetrixLite.ActivateSkinSettings import ActivateSkinSettings result = ActivateSkinSettings().WriteSkin(True) if result: infotext = ({1:_("Unknown Error creating Skin.\nPlease check after reboot MyMetrixLite-Plugin and apply your settings."), 2:_("Error creating HD-Skin. Not enough flash memory free."), 3:_("Error creating FullHD-Skin. Not enough flash memory free.\nUsing HD-Skin!"), 4:_("Error creating FullHD-Skin. Icon package download not available.\nUsing HD-Skin!"), 5:_("Error creating FullHD-Skin.\nUsing HD-Skin!"), 6:_("Some FullHD-Icons are missing.\nUsing HD-Icons!"), 7:_("Error, unknown Result!"), }[result]) self.session.openWithCallback(self.checkSkinCallback, MessageBox, infotext, MessageBox.TYPE_ERROR, timeout = 30) else: self.close() except: self.session.openWithCallback(self.checkSkinCallback, MessageBox, _("Error creating MetrixHD-Skin.\nPlease check after reboot MyMetrixLite-Plugin and apply your settings."), MessageBox.TYPE_ERROR, timeout = 30)