dont send a diseqc switch command when simple rotor mode is used
[enigma2.git] / lib / python / Components / FileList.py
index b85b8ea337548a79dbb054245113e90e06c693c5..09756e3ce9281cafa4c06af0264b9f6427e4198d 100644 (file)
@@ -58,12 +58,16 @@ class FileList(MenuList, HTMLComponent, GUIComponent):
                self.changeDir(directory)
 
                self.l.setFont(0, gFont("Regular", 18))
-               
+               self.l.setItemHeight(23)
+
        def getSelection(self):
                if self.l.getCurrentSelection() is None:
                        return None
                return self.l.getCurrentSelection()[0]
        
+       def getSelectionIndex(self):
+               return self.l.getCurrentSelectionIndex()
+
        def getFileList(self):
                return self.list
        
@@ -186,4 +190,16 @@ class FileList(MenuList, HTMLComponent, GUIComponent):
 
        def postWidgetCreate(self, instance):
                instance.setContent(self.l)
-               instance.setItemHeight(23)
+
+       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()