diff options
Diffstat (limited to 'ranger/gui/widgets/browsercolumn.py')
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 9e177a52..c96a2d73 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -258,12 +258,25 @@ class BrowserColumn(Pager): self.color_reset() continue - if drawn._linemode == "filename": + + # Deal with the line mode + use_linemode = drawn._linemode + if use_linemode == "title": + paperinfo = self.fm.papermanager.get_paper_info(drawn.path) + if paperinfo.title: + if paperinfo.year: + text = "%s - %s" % (paperinfo.year, paperinfo.title) + else: + text = paperinfo.title + else: + use_linemode = "filename" + if use_linemode == "filename": text = drawn.basename - elif drawn._linemode == "permissions": + elif use_linemode == "permissions": text = "%s %s %s %s" % (drawn.get_permission_string(), drawn.user, drawn.group, drawn.basename) + if drawn.marked and (self.main_column or \ self.settings.display_tags_in_all_columns): text = " " + text @@ -291,7 +304,7 @@ class BrowserColumn(Pager): space -= vcsstringlen # info string - if drawn._linemode == "filename": + if use_linemode == "filename": infostring = self._draw_infostring_display(drawn, space) infostringlen = self._total_len(infostring) if space - infostringlen > 2: |