@@ -629,6 +629,7 @@ def __init__(self, pyradio_config,
629629 self.ws.SCHEDULE_STATION_SEARCH_MODE: self._redisplay_search_show,
630630 self.ws.SCHEDULE_PLAYLIST_SEARCH_MODE: self._redisplay_search_show,
631631 self.ws.GROUP_SEARCH_MODE: self._redisplay_search_show,
632+ self.ws.CONFIG_SEARCH_MODE: self._redisplay_search_show,
632633 self.ws.THEME_MODE: self._redisplay_theme_mode,
633634 self.ws.ASK_TO_CREATE_NEW_THEME_MODE: self._redisplay_ask_to_create_new_theme,
634635 self.ws.ADD_STATION_MODE: self._show_station_editor,
@@ -689,6 +690,7 @@ def __init__(self, pyradio_config,
689690 self.ws.BROWSER_SEARCH_MODE: 'H_RB_SEARCH',
690691 self.ws.SEARCH_NORMAL_MODE: 'H_SEARCH',
691692 self.ws.SEARCH_PLAYLIST_MODE: 'H_SEARCH',
693+ self.ws.CONFIG_SEARCH_MODE: 'H_SEARCH',
692694 self.ws.SELECT_STATION_ENCODING_MODE: 'H_CONFIG_ENCODING',
693695 self.ws.SELECT_ENCODING_MODE: 'H_CONFIG_ENCODING',
694696 self.ws.EDIT_STATION_ENCODING_MODE: 'H_CONFIG_ENCODING',
@@ -702,8 +704,9 @@ def __init__(self, pyradio_config,
702704 2 - theme search
703705 3 - paste mode
704706 4 - group selection
707+ 5 - config search
705708 '''
706- self._search_classes = [None, None, None, None, None]
709+ self._search_classes = [None, None, None, None, None, None ]
707710
708711 ''' the files that the search terms are stored to '''
709712 self._search_files = (
@@ -712,6 +715,7 @@ def __init__(self, pyradio_config,
712715 path.join(self._cnf.state_dir, 'search-theme.txt'),
713716 path.join(self._cnf.state_dir, 'search-paste.txt'),
714717 path.join(self._cnf.state_dir, 'search-group.txt'),
718+ path.join(self._cnf.state_dir, 'search-config.txt'),
715719 )
716720
717721 ''' points to list in which the search will be performed '''
@@ -728,6 +732,7 @@ def __init__(self, pyradio_config,
728732 self.ws.THEME_MODE: 2,
729733 self.ws.PASTE_MODE: 3,
730734 self.ws.GROUP_SELECTION_MODE: 4,
735+ self.ws.CONFIG_MODE: 5,
731736 }
732737
733738 ''' which search mode opens from each allowed mode '''
@@ -741,12 +746,14 @@ def __init__(self, pyradio_config,
741746 self.ws.GROUP_SELECTION_MODE: self.ws.GROUP_SEARCH_MODE,
742747 self.ws.SCHEDULE_PLAYLIST_SELECT_MODE: self.ws.SCHEDULE_PLAYLIST_SEARCH_MODE,
743748 self.ws.SCHEDULE_STATION_SELECT_MODE: self.ws.SCHEDULE_STATION_SEARCH_MODE,
749+ self.ws.CONFIG_MODE: self.ws.CONFIG_SEARCH_MODE,
744750 }
745751
746752 ''' search modes opened from main windows '''
747753 self.search_main_window_modes = (
748754 self.ws.SEARCH_NORMAL_MODE,
749755 self.ws.SEARCH_PLAYLIST_MODE,
756+ self.ws.CONFIG_SEARCH_MODE
750757 )
751758
752759 ''' volume functions '''
@@ -2333,8 +2340,7 @@ def _give_me_a_search_class(self, operation_mode):
23332340 '''
23342341 try:
23352342 if self._search_classes[self._mode_to_search[operation_mode]] is None:
2336- self._search_classes[self._mode_to_search[operation_mode]] \
2337- = \
2343+ self._search_classes[self._mode_to_search[operation_mode]] = \
23382344 PyRadioSearch(
23392345 parent=self.outerBodyWin,
23402346 width=33,
@@ -2355,10 +2361,11 @@ def _give_me_a_search_class(self, operation_mode):
23552361 return
23562362 self.search = self._search_classes[self._mode_to_search[operation_mode]]
23572363 #self.search.pure_ascii = True
2358- if self.ws.previous_operation_mode == self.ws.CONFIG_MODE:
2364+ if self.ws.operation_mode == self.ws.CONFIG_MODE or \
2365+ self.ws.previous_operation_mode == self.ws.CONFIG_MODE:
23592366 self.search.box_color = curses.color_pair(3)
2360- else:
2361- self.search.box_color = curses.color_pair(5 )
2367+ self.search.caption_color=curses.color_pair(11)
2368+ self.search.edit_color= curses.color_pair(10 )
23622369
23632370 def ctrl_c_handler(self, signum, frame, save_playlist=True):
23642371 # ok
@@ -6797,6 +6804,7 @@ def keypress(self, char):
67976804 win_del_old_inst()
67986805 return
67996806
6807+ logger.error('self.ws.operation_mode in self._search_modes = {}'.format(self.ws.operation_mode in self._search_modes))
68006808 if self.ws.operation_mode in (
68016809 self.ws.DEPENDENCY_ERROR,
68026810 self.ws.NO_PLAYER_ERROR_MODE,
@@ -7526,7 +7534,9 @@ def keypress(self, char):
75267534 self.refreshBody()
75277535
75287536 elif self.ws.operation_mode == self.ws.CONFIG_MODE and \
7529- char not in self._chars_to_bypass:
7537+ char not in self._chars_to_bypass and \
7538+ char not in self._chars_to_bypass_for_search:
7539+
75307540 if char in (kbkey['revert_saved'], kbkey['revert_def']) or \
75317541 check_localized(char, (kbkey['revert_saved'], kbkey['revert_def'])):
75327542 self._player_select_win = None
0 commit comments