@@ -383,7 +383,7 @@ def show(self, item=None):
383
383
self ._win .addstr (17 + step , 5 , '─' * (self .maxX - 10 ), curses .color_pair (3 ))
384
384
except :
385
385
self ._win .addstr (17 + step , 3 , '─' .encode ('utf-8' ) * (self .maxX - 10 ), curses .color_pair (3 ))
386
- self ._win .addstr (17 + step , int ((self .maxX - 33 ) / 2 ), ' Player Keys (Not in Line Editor) ' , curses .color_pair (4 ))
386
+ self ._win .addstr (17 + step , int ((self .maxX - 42 ) / 2 ), ' Global Functions (with \ in Line Editor) ' , curses .color_pair (4 ))
387
387
388
388
self ._win .addstr (18 + step , 5 , '-' , curses .color_pair (4 ))
389
389
self ._win .addstr ('/' , curses .color_pair (5 ))
@@ -400,6 +400,14 @@ def show(self, item=None):
400
400
self ._win .addstr ('ute player / Save ' , curses .color_pair (5 ))
401
401
self ._win .addstr ('v' , curses .color_pair (4 ))
402
402
self ._win .addstr ('olume (not in vlc).' , curses .color_pair (5 ))
403
+ if step + 21 < self .maxY :
404
+ self ._win .addstr (20 + step , 5 , 'W' , curses .color_pair (4 ))
405
+ self ._win .addstr (' / ' , curses .color_pair (5 ))
406
+ self ._win .addstr ('w' , curses .color_pair (4 ))
407
+ self ._win .addstr (20 + step , 23 , 'Toggle titles log / like a station' , curses .color_pair (5 ))
408
+ if step + 22 < self .maxY :
409
+ self ._win .addstr (21 + step , 5 , 'T' , curses .color_pair (4 ))
410
+ self ._win .addstr (21 + step , 23 , 'Toggle transparency' , curses .color_pair (5 ))
403
411
404
412
if item :
405
413
self ._set_item (item )
@@ -629,8 +637,8 @@ def keypress(self, char):
629
637
self .new_station = None
630
638
self ._reset_editors_modes ()
631
639
ret = - 1
632
- elif chr ( char ) in self ._global_functions .keys ():
633
- self ._global_functions [chr ( char ) ]()
640
+ elif char in self ._global_functions .keys ():
641
+ self ._global_functions [char ]()
634
642
635
643
if self ._focus > 1 :
636
644
self ._reset_editors_modes ()
@@ -958,7 +966,7 @@ def show(self):
958
966
self ._win .addstr (18 + adjust_line_Y , 5 , '─' * (self .maxX - 10 ), curses .color_pair (3 ))
959
967
except :
960
968
self ._win .addstr (18 + adjust_line_Y , 3 , '─' .encode ('utf-8' ) * (self .maxX - 10 ), curses .color_pair (3 ))
961
- self ._win .addstr (18 + adjust_line_Y , int ((self .maxX - 33 ) / 2 ), ' Player Keys (Not in Line Editor) ' , curses .color_pair (4 ))
969
+ self ._win .addstr (18 + adjust_line_Y , int ((self .maxX - 42 ) / 2 ), ' Global Functions (with \ in Line Editor) ' , curses .color_pair (4 ))
962
970
963
971
self ._win .addstr (19 + adjust_line_Y , 5 , '-' , curses .color_pair (4 ))
964
972
self ._win .addstr ('/' , curses .color_pair (5 ))
@@ -975,6 +983,14 @@ def show(self):
975
983
self ._win .addstr ('ute player / Save ' , curses .color_pair (5 ))
976
984
self ._win .addstr ('v' , curses .color_pair (4 ))
977
985
self ._win .addstr ('olume (not in vlc).' , curses .color_pair (5 ))
986
+ if adjust_line_Y + 22 < self .maxY :
987
+ self ._win .addstr (21 + adjust_line_Y , 5 , 'W' , curses .color_pair (4 ))
988
+ self ._win .addstr (' / ' , curses .color_pair (5 ))
989
+ self ._win .addstr ('w' , curses .color_pair (4 ))
990
+ self ._win .addstr (21 + adjust_line_Y , 23 , 'Toggle titles log / like a station' , curses .color_pair (5 ))
991
+ if adjust_line_Y + 23 < self .maxY :
992
+ self ._win .addstr (22 + adjust_line_Y , 5 , 'T' , curses .color_pair (4 ))
993
+ self ._win .addstr (22 + adjust_line_Y , 23 , 'Toggle transparency' , curses .color_pair (5 ))
978
994
979
995
self ._win .refresh ()
980
996
self ._update_focus ()
@@ -1150,8 +1166,8 @@ def keypress(self, char):
1150
1166
# cancel
1151
1167
self ._widgets [0 ].string = ''
1152
1168
ret = - 1
1153
- elif chr ( char ) in self ._global_functions .keys ():
1154
- self ._global_functions [chr ( char ) ]()
1169
+ elif char in self ._global_functions .keys ():
1170
+ self ._global_functions [char ]()
1155
1171
#self._show_title()
1156
1172
#self.show()
1157
1173
return self ._get_result (ret )
@@ -1236,8 +1252,8 @@ def keypress(self, char):
1236
1252
0: go on
1237
1253
1: Ok
1238
1254
"""
1239
- if chr ( char ) in self ._global_functions .keys ():
1240
- self ._global_functions [chr ( char ) ]()
1255
+ if char in self ._global_functions .keys ():
1256
+ self ._global_functions [char ]()
1241
1257
1242
1258
elif char in (curses .KEY_ENTER , ord ('\n ' ), ord ('\r ' ), ord ('s' )):
1243
1259
return 1
0 commit comments