From 08ba54db2f825de3e6eb9f5693f57dd1332c1f23 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Thu, 12 Jul 2012 22:15:47 +0100 Subject: docstrings for new settings methods --- alot/settings/__init__.py | 25 ++++++++++++++++++++----- alot/settings/theme.py | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to 'alot') 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)] -- cgit v1.2.3