Skip to content

Commit

Permalink
BGUG FIX: config status
Browse files Browse the repository at this point in the history
  • Loading branch information
s-n-g committed Jun 6, 2019
1 parent 4d3c191 commit 03e35f1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
12 changes: 11 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyradio/__init__.py
Original file line number Diff line number Diff line change
@@ -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__
Expand Down
4 changes: 3 additions & 1 deletion pyradio/config_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion pyradio/themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 03e35f1

Please sign in to comment.