Skip to content

Commit 03e35f1

Browse files
committed
BGUG FIX: config status
1 parent 4d3c191 commit 03e35f1

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

Changelog

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
2019-05-27 s-n-g
1+
2019-06-06
2+
* Verion 0.7.6.2
3+
This is a BUG FIX release, fixing config status (indicating whether
4+
config is modified or not)
5+
6+
2019-06-02
7+
* Version 0.7.6.1
8+
This is a BUG FIX release, fixing regression: config not saved when
9+
changing themes
10+
11+
2019-06-01 s-n-g
212
* Version 0.7.6
313
* Added "e" option to change station's encoding.
414
* Implemented playlist backup and recovery, to address saving errors.

pyradio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" pyradio -- Console radio player. "
22

3-
version_info = (0, 7, 6, 1)
3+
version_info = (0, 7, 6, 2)
44

55
__version__ = version = '.'.join(map(str, version_info))
66
__project__ = __name__

pyradio/config_window.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def __init__(self, parent, config,
7575
self._show_theme_selector_function = show_theme_selector_function
7676
self._saved_config_options = deepcopy(config.opts)
7777
self._config_options = deepcopy(config.opts)
78+
self._old_theme = self._config_options['theme'][1]
7879
if logger.isEnabledFor(logging.INFO):
7980
if self._saved_config_options == self._config_options:
8081
logger.info('Saved options loaded')
@@ -87,7 +88,6 @@ def __init__(self, parent, config,
8788
self.init_config_win()
8889
self.refresh_config_win()
8990
self._old_use_transparency = self._config_options['use_transparency'][1]
90-
self._old_theme = self._config_options['theme'][1]
9191

9292
def __del__(self):
9393
self._toggle_transparency_function = None
@@ -372,6 +372,8 @@ def keypress(self, char):
372372
self._saved_config_options = deepcopy(self._config_options)
373373
if self._cnf.opts != self._saved_config_options:
374374
self._cnf.opts = deepcopy(self._saved_config_options)
375+
self._old_theme == self._saved_config_options['theme'][1]
376+
self._config_options = deepcopy(self._cnf.opts)
375377
self._cnf.dirty_config = True
376378
else:
377379
self._cnf.dirty_config = False

pyradio/themes.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,13 @@ def keypress(self, char):
510510
True : theme is to be saved in config
511511
False : theme is not to be saved in config
512512
"""
513-
if char in (curses.KEY_ENTER, ord('\n'),
513+
if char in (ord('e'), ):
514+
# edit theme
515+
pass
516+
elif char in (ord('n'), ):
517+
# new theme
518+
pass
519+
elif char in (curses.KEY_ENTER, ord('\n'),
514520
ord('\r'), ord('l'),
515521
curses.KEY_RIGHT):
516522
self._applied_theme = self._selection

0 commit comments

Comments
 (0)