diff --git a/Changelog b/Changelog index d53b449a..f2f98157 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,14 @@ -2019-05-27 s-n-g +2019-06-06 + * Verion 0.7.6.2 + This is a BUG FIX release, fixing config status (indicating whether + config is modified or not) + +2019-06-02 + * Version 0.7.6.1 + This is a BUG FIX release, fixing regression: config not saved when + changing themes + +2019-06-01 s-n-g * Version 0.7.6 * Added "e" option to change station's encoding. * Implemented playlist backup and recovery, to address saving errors. diff --git a/pyradio/__init__.py b/pyradio/__init__.py index 3c612d64..68de2dc8 100644 --- a/pyradio/__init__.py +++ b/pyradio/__init__.py @@ -1,6 +1,6 @@ " pyradio -- Console radio player. " -version_info = (0, 7, 6, 1) +version_info = (0, 7, 6, 2) __version__ = version = '.'.join(map(str, version_info)) __project__ = __name__ diff --git a/pyradio/config_window.py b/pyradio/config_window.py index 2a551f50..c8d9ca95 100644 --- a/pyradio/config_window.py +++ b/pyradio/config_window.py @@ -75,6 +75,7 @@ def __init__(self, parent, config, self._show_theme_selector_function = show_theme_selector_function self._saved_config_options = deepcopy(config.opts) self._config_options = deepcopy(config.opts) + self._old_theme = self._config_options['theme'][1] if logger.isEnabledFor(logging.INFO): if self._saved_config_options == self._config_options: logger.info('Saved options loaded') @@ -87,7 +88,6 @@ def __init__(self, parent, config, self.init_config_win() self.refresh_config_win() self._old_use_transparency = self._config_options['use_transparency'][1] - self._old_theme = self._config_options['theme'][1] def __del__(self): self._toggle_transparency_function = None @@ -372,6 +372,8 @@ def keypress(self, char): self._saved_config_options = deepcopy(self._config_options) if self._cnf.opts != self._saved_config_options: self._cnf.opts = deepcopy(self._saved_config_options) + self._old_theme == self._saved_config_options['theme'][1] + self._config_options = deepcopy(self._cnf.opts) self._cnf.dirty_config = True else: self._cnf.dirty_config = False diff --git a/pyradio/themes.py b/pyradio/themes.py index 81de977e..6c1b868d 100644 --- a/pyradio/themes.py +++ b/pyradio/themes.py @@ -510,7 +510,13 @@ def keypress(self, char): True : theme is to be saved in config False : theme is not to be saved in config """ - if char in (curses.KEY_ENTER, ord('\n'), + if char in (ord('e'), ): + # edit theme + pass + elif char in (ord('n'), ): + # new theme + pass + elif char in (curses.KEY_ENTER, ord('\n'), ord('\r'), ord('l'), curses.KEY_RIGHT): self._applied_theme = self._selection