summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-13 20:02:50 +0100
committerhut <hut@lavabit.com>2010-01-13 20:02:50 +0100
commitf70ee6b2209af6785cf9a030b1a8893f09a770ac (patch)
tree1d89c0bc23f1ad64e09235fcabfafe2c6f782ada
parente7733577e2ff3c4451a8dbcf03e3f34ee3934b85 (diff)
downloadranger-f70ee6b2209af6785cf9a030b1a8893f09a770ac.tar.gz
browserview: hide certain bookmarks in the list
-rw-r--r--TODO2
-rw-r--r--ranger/gui/widgets/browserview.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/TODO b/TODO
index 33d72956..69f2c1dd 100644
--- a/TODO
+++ b/TODO
@@ -46,6 +46,6 @@ Ideas
 
    ( ) #20  10/01/01  use inotify to monitor filesystem changes
    ( ) #24  10/01/06  progress bar
-   ( ) #27  10/01/06  hide bookmarks in list which contain hidden dir
+   (X) #27  10/01/06  hide bookmarks in list which contain hidden dir
    ( ) #28  10/01/06  use regexp instead of string for searching
    ( ) #33  10/01/08  accelerate mousewheel speed
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 27a14c1e..7a7e43e6 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -71,7 +71,9 @@ class BrowserView(Widget, DisplayableContainer):
 	def _draw_bookmarks(self):
 		self.need_clear = True
 
-		sorted_bookmarks = sorted(self.fm.bookmarks)
+		sorted_bookmarks = sorted(item for item in self.fm.bookmarks \
+				if item[0] != '`' and '/.' not in item[1].path)
+
 		def generator():
 			return zip(range(self.hei), sorted_bookmarks)