diff options
author | hut <hut@lavabit.com> | 2011-05-08 17:07:08 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-05-08 17:07:08 +0200 |
commit | e690d4e989cb52a73cfd3c141a6388aded4b4a8c (patch) | |
tree | 6955a01eec0020cdc818f07909adc42d7d75fdb7 | |
parent | efcdbb775a468c4c815ef56ada7320beda9dd931 (diff) | |
download | ranger-e690d4e989cb52a73cfd3c141a6388aded4b4a8c.tar.gz |
added option "display_tags_in_all_columns"
-rw-r--r-- | ranger/container/settingobject.py | 1 | ||||
-rw-r--r-- | ranger/defaults/options.py | 3 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 11 |
3 files changed, 11 insertions, 4 deletions
diff --git a/ranger/container/settingobject.py b/ranger/container/settingobject.py index c56a18b5..d036245f 100644 --- a/ranger/container/settingobject.py +++ b/ranger/container/settingobject.py @@ -26,6 +26,7 @@ ALLOWED_SETTINGS = { 'dirname_in_tabs': bool, 'display_size_in_main_column': bool, 'display_size_in_status_bar': bool, + 'display_tags_in_all_columns': bool, 'draw_bookmark_borders': bool, 'draw_borders': bool, 'flushinput': bool, diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py index a2289729..c9cbf8ad 100644 --- a/ranger/defaults/options.py +++ b/ranger/defaults/options.py @@ -84,6 +84,9 @@ mouse_enabled = True display_size_in_main_column = True display_size_in_status_bar = False +# Display files tags in all columns or only in main column? +display_tags_in_all_columns = True + # Set a title for the window? update_title = True diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index b8277748..2928af23 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -231,6 +231,8 @@ class BrowserColumn(Pager): space = self.wid - len(infostring) if self.main_column: space -= 2 + elif self.settings.display_tags_in_all_columns: + space -= 1 # if len(text) > space: # text = text[:space-1] + self.ellipsis @@ -240,12 +242,12 @@ class BrowserColumn(Pager): if drawn.marked: this_color.append('marked') - if self.main_column: + if self.main_column or self.settings.display_tags_in_all_columns: text = " " + text if tagged: this_color.append('tagged') - if self.main_column: + if self.main_column or self.settings.display_tags_in_all_columns: text = self.tagged_marker + text if drawn.is_directory: @@ -276,7 +278,7 @@ class BrowserColumn(Pager): wtext = WideString(text) if len(wtext) > space: wtext = wtext[:space - 1] + ellipsis - if self.main_column: + if self.main_column or self.settings.display_tags_in_all_columns: if tagged: self.addstr(line, 0, str(wtext)) elif self.wid > 1: @@ -296,7 +298,8 @@ class BrowserColumn(Pager): start, wid = bad_info_color self.color_at(line, start, wid, this_color, 'badinfo') - if self.main_column and tagged and self.wid > 2: + if (self.main_column or self.settings.display_tags_in_all_columns) \ + and tagged and self.wid > 2: this_color.append('tag_marker') self.color_at(line, 0, len(self.tagged_marker), this_color) |