diff options
author | hut <hut@lavabit.com> | 2009-12-26 01:02:36 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-26 01:02:36 +0100 |
commit | 20f949734282bbddb1c45951ea1f88419e7c992b (patch) | |
tree | 80d4725236bc427ed0116f2ea9ee10d6de43cff5 /ranger/gui/widgets/filelist.py | |
parent | ae57e58776adca204f021df6f84c9c54541bcbc4 (diff) | |
download | ranger-20f949734282bbddb1c45951ea1f88419e7c992b.tar.gz |
implemented tagging
Diffstat (limited to 'ranger/gui/widgets/filelist.py')
-rw-r--r-- | ranger/gui/widgets/filelist.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py index 457c9856..c6b654b4 100644 --- a/ranger/gui/widgets/filelist.py +++ b/ranger/gui/widgets/filelist.py @@ -170,6 +170,8 @@ class FileList(Widget): break this_color = base_color + list(drawed.mimetype_tuple) + text = drawed.basename + tagged = drawed.realpath in self.fm.tags if i == selected_i: this_color.append('selected') @@ -177,6 +179,11 @@ class FileList(Widget): if drawed.marked: this_color.append('marked') + if tagged: + this_color.append('tagged') + if self.main_display: + text = '* ' + text + if isinstance(drawed, Directory): this_color.append('directory') else: @@ -192,12 +199,10 @@ class FileList(Widget): string = drawed.basename if self.main_display: if self.wid > 2: - self.win.addnstr( - self.y + line, self.x + 1, - drawed.basename, self.wid - 2) + self.win.addnstr(self.y + line, self.x + 1, + text, self.wid - 2) else: - self.win.addnstr( - self.y + line, self.x, drawed.basename, self.wid) + self.win.addnstr(self.y + line, self.x, text, self.wid) if self.display_infostring and drawed.infostring: info = drawed.infostring @@ -207,6 +212,10 @@ class FileList(Widget): self.color_at(self.y + line, self.x, self.wid, this_color) + if self.main_display and tagged and self.wid > 2: + this_color.append('tag_marker') + self.color_at(self.y + line, self.x + 1, 1, this_color) + self.color_reset() def get_scroll_begin(self): |