Permalink
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...
Dusty Phillips
Dusty Phillips committed Aug 17, 2013
1 parent 8399270 commit 4fd433d482f8493bd351388f983fcea37e49678d
Showing with 8 additions and 0 deletions.
  1. +8 −0 orkiv/__main__.py
View
@@ -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):

0 comments on commit 4fd433d

Please sign in to comment.