X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ead18eb53880ecff8c41fa2e2db7ae87e2b950de..eca375cca394a4f593cb45e8fa7534620b157aec:/lib/python/Components/FileList.py diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 01358d53..09756e3c 100644 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -65,6 +65,9 @@ class FileList(MenuList, HTMLComponent, GUIComponent): return None return self.l.getCurrentSelection()[0] + def getSelectionIndex(self): + return self.l.getCurrentSelectionIndex() + def getFileList(self): return self.list @@ -187,3 +190,16 @@ class FileList(MenuList, HTMLComponent, GUIComponent): def postWidgetCreate(self, instance): instance.setContent(self.l) + + def execBegin(self): + harddiskmanager.on_partition_list_change.append(self.partitionListChanged) + + def execEnd(self): + harddiskmanager.on_partition_list_change.remove(self.partitionListChanged) + + def refresh(self): + self.changeDir(self.current_directory, self.getFilename()) + + def partitionListChanged(self, action, device): + if self.current_directory is None: + self.refresh()