mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-03 22:55:01 -04:00
Added fullscreen mode to browser and conversations
This commit is contained in:
parent
3c7b8511d7
commit
726ee8873e
4 changed files with 29 additions and 1 deletions
|
@ -32,6 +32,8 @@ class ConversationsArea(urwid.LineBox):
|
|||
self.delegate.new_conversation()
|
||||
elif key == "ctrl r":
|
||||
self.delegate.sync_conversations()
|
||||
elif key == "ctrl g":
|
||||
self.delegate.toggle_fullscreen()
|
||||
elif key == "tab":
|
||||
self.delegate.app.ui.main_display.frame.set_focus("header")
|
||||
elif key == "up" and (self.delegate.ilb.first_item_is_selected() or self.delegate.ilb.body_is_empty()):
|
||||
|
@ -332,6 +334,15 @@ class ConversationsDisplay():
|
|||
conversation = ConversationsDisplay.cached_conversation_widgets[source_hash]
|
||||
self.close_conversation(conversation)
|
||||
|
||||
def toggle_fullscreen(self):
|
||||
if ConversationsDisplay.given_list_width != 0:
|
||||
self.saved_list_width = ConversationsDisplay.given_list_width
|
||||
ConversationsDisplay.given_list_width = 0
|
||||
else:
|
||||
ConversationsDisplay.given_list_width = self.saved_list_width
|
||||
|
||||
self.update_conversation_list()
|
||||
|
||||
def sync_conversations(self):
|
||||
g = self.app.ui.glyphs
|
||||
self.dialog_open = True
|
||||
|
@ -790,6 +801,8 @@ class ConversationWidget(urwid.WidgetWrap):
|
|||
self.toggle_editor()
|
||||
elif key == "ctrl x":
|
||||
self.clear_history_dialog()
|
||||
elif key == "ctrl g":
|
||||
nomadnet.NomadNetworkApp.get_shared_instance().ui.main_display.sub_displays.conversations_display.toggle_fullscreen()
|
||||
elif key == "ctrl o":
|
||||
self.sort_by_timestamp ^= True
|
||||
self.conversation_changed(None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue