deskbar-applet r2332 - in trunk: . deskbar/core
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2332 - in trunk: . deskbar/core
- Date: Sun, 17 Aug 2008 16:10:27 +0000 (UTC)
Author: sebp
Date: Sun Aug 17 16:10:27 2008
New Revision: 2332
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2332&view=rev
Log:
Refactored DeskbarHistory
Modified:
trunk/ChangeLog
trunk/deskbar/core/DeskbarHistory.py
Modified: trunk/deskbar/core/DeskbarHistory.py
==============================================================================
--- trunk/deskbar/core/DeskbarHistory.py (original)
+++ trunk/deskbar/core/DeskbarHistory.py Sun Aug 17 16:10:27 2008
@@ -190,11 +190,11 @@
for idx, val in enumerate(self):
htime, htext, haction = val
if isinstance(haction, EmptyHistoryAction):
- self.remove (self.get_iter_from_string (str(idx)))
+ self.remove (idx)
continue
if (action.get_hash() == haction.get_hash() and action.__class__.__name__ == haction.__class__.__name__):
- self.remove (self.get_iter_from_string (str(idx)))
+ self.remove (idx)
break
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())
@@ -203,11 +203,13 @@
self.reset()
self.save()
+
+ def remove(self, index):
+ gtk.ListStore.remove (self, self.get_iter_from_string (str(index)))
def __remove_too_many(self):
while len(self) > self.__max_history_items:
- last = self.get_iter_from_string (str(len(self) - 1))
- self.remove (last)
+ self.remove (len(self) - 1)
def up(self):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]