summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-10-29 21:30:53 +0100
committerhut <hut@lepus.uberspace.de>2015-10-29 21:30:53 +0100
commit933c9eabc3c75d7bbea75de1e3b5a1578b5903ea (patch)
tree6debdb0ea260749dbe2d62a627144ebf28763300
parent8414941b0a490312936799cf4679e6daf417b910 (diff)
downloadranger-933c9eabc3c75d7bbea75de1e3b5a1578b5903ea.tar.gz
ranger.gui.widgets: code deduplication
moved the definition of TitleBar.ellipsis and BrowserColumn.ellipsis to
Widget.ellipsis
-rw-r--r--ranger/gui/widgets/__init__.py2
-rw-r--r--ranger/gui/widgets/browsercolumn.py2
-rw-r--r--ranger/gui/widgets/titlebar.py2
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)