diff options
author | hut <hut@lepus.uberspace.de> | 2015-10-29 21:30:53 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-10-29 21:30:53 +0100 |
commit | 933c9eabc3c75d7bbea75de1e3b5a1578b5903ea (patch) | |
tree | 6debdb0ea260749dbe2d62a627144ebf28763300 /ranger | |
parent | 8414941b0a490312936799cf4679e6daf417b910 (diff) | |
download | ranger-933c9eabc3c75d7bbea75de1e3b5a1578b5903ea.tar.gz |
ranger.gui.widgets: code deduplication
moved the definition of TitleBar.ellipsis and BrowserColumn.ellipsis to Widget.ellipsis
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/__init__.py | 2 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 2 | ||||
-rw-r--r-- | ranger/gui/widgets/titlebar.py | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/ranger/gui/widgets/__init__.py b/ranger/gui/widgets/__init__.py index f2e52c0a..bd0f2337 100644 --- a/ranger/gui/widgets/__init__.py +++ b/ranger/gui/widgets/__init__.py @@ -21,3 +21,5 @@ class Widget(Displayable): 'ahead': ('>', ["vcsahead"]), 'diverged': ('Y', ["vcsdiverged"]), 'unknown': ('?', ["vcsunknown"])} + + ellipsis = { False: '~', True: '…' } diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 0dc39a9b..52ef62b8 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. @@ -24,7 +23,6 @@ class BrowserColumn(Pager): scroll_begin = 0 target = None last_redraw_time = -1 - ellipsis = { False: '~', True: '…' } old_dir = None old_thisfile = None diff --git a/ranger/gui/widgets/titlebar.py b/ranger/gui/widgets/titlebar.py index 644db25e..dbd08981 100644 --- a/ranger/gui/widgets/titlebar.py +++ b/ranger/gui/widgets/titlebar.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. @@ -20,7 +19,6 @@ class TitleBar(Widget): throbber = ' ' need_redraw = False tab_width = 0 - ellipsis = { False: '~', True: '…' } def __init__(self, *args, **keywords): Widget.__init__(self, *args, **keywords) |