Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Example 77: When window is resized while chat_window is visible, dete…

…rmine whether buddy list needs to be shown or hidden.
  • Loading branch information...
commit 4fd433d482f8493bd351388f983fcea37e49678d 1 parent 8399270
@buchuki authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 orkiv/__main__.py
View
8 orkiv/__main__.py
@@ -205,6 +205,14 @@ def handle_xmpp_message(self, message):
self.buddy_list.new_messages.add(jabber_id)
self.buddy_list.force_list_view_update()
+ def on_mode(self, widget, mode):
+ if mode == "narrow":
+ if self.chat_visible and self.buddy_list_visible:
+ self.remove_widget(self.buddy_list)
+ else:
+ if self.chat_visible and not self.buddy_list_visible:
+ self.add_widget(self.buddy_list, index=1)
+
class Orkiv(App):
def __init__(self):
Please sign in to comment.
Something went wrong with that request. Please try again.