mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-18 16:40:41 -06:00
Modified keymaps are saved at exit
This commit is contained in:
parent
95fc66dfba
commit
8728c74aac
@ -445,6 +445,7 @@ class Controller(object):
|
|||||||
return output.speak(page.get_message(), True)
|
return output.speak(page.get_message(), True)
|
||||||
output.speak(_(u"{0} not found.").format(string,), True)
|
output.speak(_(u"{0} not found.").format(string,), True)
|
||||||
page.buffer.list.select_item(start)
|
page.buffer.list.select_item(start)
|
||||||
|
|
||||||
def edit_keystrokes(self, *args, **kwargs):
|
def edit_keystrokes(self, *args, **kwargs):
|
||||||
editor = keystrokeEditor.KeystrokeEditor()
|
editor = keystrokeEditor.KeystrokeEditor()
|
||||||
if editor.changed == True:
|
if editor.changed == True:
|
||||||
@ -553,6 +554,7 @@ class Controller(object):
|
|||||||
log.debug("Exiting...")
|
log.debug("Exiting...")
|
||||||
log.debug("Saving global configuration...")
|
log.debug("Saving global configuration...")
|
||||||
config.app.write()
|
config.app.write()
|
||||||
|
config.keymap.write()
|
||||||
for item in session_.sessions:
|
for item in session_.sessions:
|
||||||
if session_.sessions[item].logged == False: continue
|
if session_.sessions[item].logged == False: continue
|
||||||
log.debug("Saving config for %s session" % (session_.sessions[item].session_id,))
|
log.debug("Saving config for %s session" % (session_.sessions[item].session_id,))
|
||||||
|
@ -1,53 +1,52 @@
|
|||||||
[info]
|
[info]
|
||||||
name = Default
|
name = Default
|
||||||
desc = TWBlue's default keymap.
|
desc = TWBlue's default keymap.
|
||||||
author = Bill Dengler <codeofdusk@gmail.com>
|
author = Bill Dengler <codeofdusk@gmail.com>
|
||||||
|
|
||||||
[keymap]
|
[keymap]
|
||||||
up = control+win+up
|
up = control+win+up
|
||||||
down = control+win+down
|
down = control+win+down
|
||||||
left = control+win+left
|
left = control+win+left
|
||||||
right = control+win+right
|
right = control+win+right
|
||||||
next_account = control+win+shift+right
|
next_account = control+win+shift+right
|
||||||
previous_account = control+win+shift+left
|
previous_account = control+win+shift+left
|
||||||
open_conversation = control+win+c
|
open_conversation = control+win+c
|
||||||
show_hide = control+win+m
|
show_hide = control+win+m
|
||||||
post_tweet = control+win+n
|
post_tweet = control+win+n
|
||||||
post_reply = control+win+r
|
post_reply = control+win+r
|
||||||
post_retweet = control+win+shift+r
|
post_retweet = control+win+shift+r
|
||||||
send_dm = control+win+d
|
send_dm = control+win+d
|
||||||
add_to_favourites = alt+win+f
|
add_to_favourites = alt+win+f
|
||||||
remove_from_favourites = alt+shift+win+f
|
remove_from_favourites = alt+shift+win+f
|
||||||
follow = control+win+s
|
follow = control+win+s
|
||||||
user_details = control+win+alt+n
|
user_details = control+win+alt+n
|
||||||
view_item = control+win+v
|
view_item = control+win+v
|
||||||
exit = control+win+f4
|
exit = control+win+f4
|
||||||
open_timeline = control+win+i
|
open_timeline = control+win+i
|
||||||
remove_buffer = control+win+shift+i
|
remove_buffer = control+win+shift+i
|
||||||
interact = control+alt+win+return
|
interact = control+alt+win+return
|
||||||
url = control+win+return
|
url = control+win+return
|
||||||
volume_up = control+win+alt+up
|
volume_up = control+win+alt+up
|
||||||
volume_down = control+win+alt+down
|
volume_down = control+win+alt+down
|
||||||
go_home = control+win+home
|
go_home = control+win+home
|
||||||
go_end = control+win+end
|
go_end = control+win+end
|
||||||
go_page_up = control+win+pageup
|
go_page_up = control+win+pageup
|
||||||
go_page_down = control+win+pagedown
|
go_page_down = control+win+pagedown
|
||||||
update_profile = alt+win+p
|
update_profile = alt+win+p
|
||||||
delete = control+win+delete
|
delete = control+win+delete
|
||||||
clear_buffer = control+win+shift+delete
|
clear_buffer = control+win+shift+delete
|
||||||
repeat_item = control+win+space
|
repeat_item = control+win+space
|
||||||
copy_to_clipboard = control+win+c
|
copy_to_clipboard = control+win+c
|
||||||
add_to_list = control+win+a
|
add_to_list = control+win+a
|
||||||
remove_from_list = control+win+shift+a
|
remove_from_list = control+win+shift+a
|
||||||
toggle_buffer_mute = control+win+shift+m
|
toggle_buffer_mute = control+win+shift+m
|
||||||
toggle_session_mute = alt+win+m
|
toggle_session_mute = alt+win+m
|
||||||
toggle_autoread = control+win+e
|
toggle_autoread = control+win+e
|
||||||
search = control+win+-
|
search = control+win+-
|
||||||
edit_keystrokes = control+win+k
|
edit_keystrokes = control+win+k
|
||||||
view_user_lists = control+win+l
|
view_user_lists = control+win+l
|
||||||
get_more_items = alt+win+pageup
|
get_more_items = alt+win+pageup
|
||||||
reverse_geocode = control+win+g
|
reverse_geocode = control+win+g
|
||||||
view_reverse_geocode = control+win+shift+g
|
view_reverse_geocode = control+win+shift+g
|
||||||
get_trending_topics = control+win+t
|
get_trending_topics = control+win+t
|
||||||
find = control+win+/
|
find = control+win+/
|
||||||
secondary_interact = control+win+alt+return
|
|
||||||
|
@ -23,10 +23,8 @@ class KeystrokeEditor(object):
|
|||||||
answer = edit_dialog.get_response()
|
answer = edit_dialog.get_response()
|
||||||
if answer == widgetUtils.OK:
|
if answer == widgetUtils.OK:
|
||||||
new_keystroke = self.get_edited_keystroke(edit_dialog)
|
new_keystroke = self.get_edited_keystroke(edit_dialog)
|
||||||
print new_keystroke
|
|
||||||
if new_keystroke != self.map[action]:
|
if new_keystroke != self.map[action]:
|
||||||
self.changed = True
|
self.changed = True
|
||||||
print "changed"
|
|
||||||
self.map[action] = new_keystroke
|
self.map[action] = new_keystroke
|
||||||
|
|
||||||
def set_keystroke(self, keystroke, dialog):
|
def set_keystroke(self, keystroke, dialog):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user