Permalink
Browse files

Example 17: Connect to jabber and print buddy list on login.

Disconnects immediately so as not to keep the program open when the window is closed.
  • Loading branch information...
1 parent 6f1fbfa commit b5c3a9ad3196b7219bbbde148e650135e52bedfe @buchuki committed Jun 22, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 orkiv/__main__.py
View
10 orkiv/__main__.py
@@ -10,9 +10,13 @@ class AccountDetailsForm(AnchorLayout):
password_box = ObjectProperty()
def login(self):
- print(self.server_box.text)
- print(self.username_box.text)
- print(self.password_box.text)
+ jabber_id = self.username_box.text + "@" + self.server_box.text
+ password = self.password_box.text
+
+ app = Orkiv.get_running_app()
+ app.connect_to_jabber(jabber_id, password)
+ print(app.xmpp.client_roster.keys())
+ app.xmpp.disconnect()
class Orkiv(App):

0 comments on commit b5c3a9a

Please sign in to comment.