Permalink
Browse files

connection and disconnection

  • Loading branch information...
cflavio committed Jan 9, 2018
1 parent 7a1ebed commit 78a5ffb95d704dd59c73b80fd2353cffa57b19ab
Showing with 13 additions and 3 deletions.
  1. +1 −1 menu/mainpage.py
  2. +8 −0 menu/multiplayerfrm.py
  3. +1 −1 project.py
  4. +2 −0 yorg/yorg.py
  5. +1 −1 yyagl
View
@@ -57,7 +57,7 @@ def on_ok(self):
self.conn_attempted = True
self.widgets[6]['text'] = self.get_label()
self.eng.xmpp.send_connected()
self.notify('on_login')
#self.notify('on_login')
def on_ko(self, msg=None):
self.conn_attempted = True
View
@@ -206,6 +206,8 @@ def __init__(self, menu_args):
DirectButton(text=_('Start'), pos=(.39, 1, .03), command=self.on_start,
parent=self.match_frm, **btn_args)
self.eng.xmpp.attach(self.on_users)
self.eng.xmpp.attach(self.on_user_connected)
self.eng.xmpp.attach(self.on_user_disconnected)
self.set_connection_label()
def set_connection_label(self):
@@ -223,6 +225,12 @@ def trunc(self, name, lgt):
if len(name) > lgt: return name[:lgt] + '...'
return name
def on_user_connected(self, user):
self.on_users()
def on_user_disconnected(self, user):
self.on_users()
def on_users(self):
if not self.eng.xmpp.xmpp:
self.set_connection_label()
View
@@ -3,7 +3,7 @@
# TODO LIST =====
# 0.9 (network)
# connections and disconnections
# keepalive: use domethodlaters in place of active polling
# manage friends
# do a message box with a top bar with left/right arrow for changing the room
# do a rapid start for network
View
@@ -71,6 +71,8 @@ def __init__(self):
win_orig = opt_dev['win_orig']
parser = argparse.ArgumentParser()
parser.add_argument('--win_orig')
parser.add_argument('--user')
parser.add_argument('--pwd')
args = parser.parse_args()
if args.win_orig:
win_orig = args.win_orig
2 yyagl
Submodule yyagl updated 1 files
+39 −1 engine/network/xmpp.py

0 comments on commit 78a5ffb

Please sign in to comment.