diff --git a/trunk/images/ocarina.png b/trunk/images/ocarina.png index cea8953b..b012ed7b 100644 Binary files a/trunk/images/ocarina.png and b/trunk/images/ocarina.png differ diff --git a/trunk/src/list.py b/trunk/src/list.py index 62093345..cb859fa8 100644 --- a/trunk/src/list.py +++ b/trunk/src/list.py @@ -150,6 +150,7 @@ class List(gtk.ScrolledWindow): self.count = len(self.filter) for i in range(self.count): self.seconds+=self.data.library.files[self.filter[i][0]].duration + self.gotoCurSong() self.makeLabel() self.timeText() diff --git a/trunk/src/rightPane.py b/trunk/src/rightPane.py index 3d325b18..9fde523e 100644 --- a/trunk/src/rightPane.py +++ b/trunk/src/rightPane.py @@ -57,6 +57,7 @@ class RightPane(gtk.VBox): #self.changedTab(None,None,0) self.status = "" + self.filterCount = 0 def setLabels(self): @@ -221,15 +222,22 @@ class RightPane(gtk.VBox): # text was typed, refilter rows - # IDEA: refilter in half a second, if no additional text was typed + # Arrange to filter rows in 250ms, as long as no additional text has been typed def textTyped(self,entry): search = entry.get_text().lower() - self.filter(search) + self.filterCount+=1 + gobject.timeout_add(250,self.filter,search) # Filter the rows of the current tab # Do a quickFilter on nonvisible tabs + # Decrements self.filterCount def filter(self,search): + # If filterCount is 0, no additional text has been typed + self.filterCount -= 1 + if self.filterCount > 0: + return + # It is ok to filter rows if self.curTab == 0: self.playlist.filterRows(search) tabs = [1,2]