[PATCH] Keep history of useful set_filename() calls



Here is a patch that make meld save history of set_filename()
calls, which is IMHO a sensible thing to do.

The condition of path existence before saving history is debatable
but I don't think we should keep the non existent pathes.

-- 
Vincent Legoll
Index: historyentry.py
===================================================================
--- historyentry.py	(revision 1282)
+++ historyentry.py	(working copy)
@@ -320,6 +320,9 @@
 
     def set_filename(self, filename):
         self.__gentry.child.set_text(filename)
+        # Move current to top of history if it exists
+        if os.path.exists(filename):
+            self.__gentry.prepend_text(filename)
 
     def set_modal(self, is_modal):
         self.__is_modal = is_modal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]