summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-07-12 22:15:47 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-07-12 22:15:47 +0100
commit08ba54db2f825de3e6eb9f5693f57dd1332c1f23 (patch)
treeb203d8fe69a5964cdafc6c7570ccdb467ec6bc16 /alot
parent382d5fcb9bed5aec164538a15e320314289b90f6 (diff)
docstrings for new settings methods
Diffstat (limited to 'alot')
-rw-r--r--alot/settings/__init__.py25
-rw-r--r--alot/settings/theme.py2
2 files changed, 21 insertions, 6 deletions
diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py
index 510d75db..dacdcc9f 100644
--- a/alot/settings/__init__.py
+++ b/alot/settings/__init__.py
@@ -230,17 +230,32 @@ class SettingsManager(object):
return self._theme.get_attribute(mode, name, colours)
def get_threadline_theming(self, thread):
+ """
+ looks up theming info a threadline displaying a given thread
+
+ :param thread: thread to theme
+ :type thread: alot.db.thread.Thread
+ """
colours = int(self._config.get('colourmode'))
- return self._theme.get_threadline_structure(thread, colours)
+ return self._theme.get_threadline_theming(thread, colours)
def get_tagstring_representation(self, tag, onebelow_normal=None,
onebelow_focus=None):
"""
looks up user's preferred way to represent a given tagstring
-
- This returns a dictionary mapping
- 'normal' and 'focussed' to `urwid.AttrSpec` sttributes,
- and 'translated' to an alternative string representation
+ on top of a widget with given attributes that shine though
+ for '' and 'default' values.
+
+ This returns a dictionary mapping 'normal' and 'focussed' to
+ `urwid.AttrSpec` attributes, 'translated' to an alternative string
+ representation and 'hidden' to a boolean flag.
+
+ :param tag: tagstring
+ :type tag: str
+ :param onebelow_normal: attribute that shine through if unfocussed
+ :type onebelow_normal: urwid.AttrSpec
+ :param onebelow_focus: attribute that shines through if focussed
+ :type onebelow_focus : urwid.AttrSpec
"""
colourmode = int(self._config.get('colourmode'))
theme = self._theme
diff --git a/alot/settings/theme.py b/alot/settings/theme.py
index 8b60b2f1..563296c5 100644
--- a/alot/settings/theme.py
+++ b/alot/settings/theme.py
@@ -59,7 +59,7 @@ class Theme(object):
"""
return self._config[mode][name][self._colours.index(colourmode)]
- def get_threadline_structure(self, thread, colourmode):
+ def get_threadline_theming(self, thread, colourmode):
def pickcolour(triple):
return triple[self._colours.index(colourmode)]