Skip to content

Commit

Permalink
Simplify SampleGTKServer
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Nov 11, 2012
1 parent 1dd2eac commit c0c2f21
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/gtk/server.py
Expand Up @@ -73,11 +73,8 @@ def set_button_label(label):
self.server.register_function(destroy)
self.server.register_function(set_button_label)

def get_client_handler(self):
return next(iter(self.server.clients))

def clicked(self, widget, data=None):
handler = self.get_client_handler()
handler = self.server.clients[0]
handler.call('message', ["clicked!"], lambda _: None)

def destroy(self, widget, data=None):
Expand Down

0 comments on commit c0c2f21

Please sign in to comment.