diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-06-11 20:10:31 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-06-11 20:10:31 +0000 |
| commit | b6fb1984add5d1fbc08686d510d6aa46efa7f3bd (patch) | |
| tree | a8b67772aa3b96c993daf5fcb844ed986be95b38 /lib/python/Components/FileList.py | |
| parent | 06935bb4a7b5567193a26504de047df836a46acc (diff) | |
| download | enigma2-b6fb1984add5d1fbc08686d510d6aa46efa7f3bd.tar.gz enigma2-b6fb1984add5d1fbc08686d510d6aa46efa7f3bd.zip | |
add support for hotplug partitions. partitions/filesystems are dynamically added and removed by an external plugin.
Diffstat (limited to 'lib/python/Components/FileList.py')
| -rw-r--r-- | lib/python/Components/FileList.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 3091436f..09756e3c 100644 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -190,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() |
