+
+ def loadStaticConfig(self):
+ """
+ Always try to load the static config file from
+ /etc/enigma2/curlytx-pagefeed.xml
+ """
+ staticFeedPath = Directories.resolveFilename(Directories.SCOPE_CONFIG, self.staticPageFeedFile)
+ if not os.path.exists(staticFeedPath):
+ return
+
+ from AtomFeed import AtomFeed
+ AtomFeed(
+ 'file://' + staticFeedPath,
+ self.saveStaticConfig, self.loadStaticConfigFail
+ )
+
+ def loadStaticConfigFail(self, errorMessage):
+ """ Loading the page url feed failed somehow """
+ from Screens.MessageBox import MessageBox
+ self.session.open(
+ MessageBox,
+ _("Error loading page feed:") + "\n\n" + str(errorMessage),
+ type = MessageBox.TYPE_ERROR
+ )
+
+ def saveStaticConfig(self, pages, settings):
+ feedPagesToConfig(pages)
+ feedSettingsToConfig(settings)
+ savePageConfig()
+ self.loadButtons()