Make the on_button_close call asynchronous
This commit is contained in:
parent
897e0132af
commit
ed4fc948ca
@ -79,7 +79,7 @@ class BuddyChat(Chat):
|
|||||||
success = True
|
success = True
|
||||||
try:
|
try:
|
||||||
peer.message(text)
|
peer.message(text)
|
||||||
except (socket.error, xmlrpclib.Fault), e:
|
except socket.error, e:
|
||||||
msg = str(e)
|
msg = str(e)
|
||||||
success = False
|
success = False
|
||||||
self._local_message(success, msg)
|
self._local_message(success, msg)
|
||||||
@ -366,10 +366,6 @@ class ChatActivity(activity.Activity):
|
|||||||
|
|
||||||
# Clear the "new message" icon when the user activates the chat
|
# Clear the "new message" icon when the user activates the chat
|
||||||
aniter = self._get_iter_for_buddy(buddy)
|
aniter = self._get_iter_for_buddy(buddy)
|
||||||
# Select the row in the list
|
|
||||||
if aniter:
|
|
||||||
selection = self._buddy_list_view.get_selection()
|
|
||||||
selection.select_iter(aniter)
|
|
||||||
icon = self._buddy_list_model.get_value(aniter, self._MODEL_COL_ICON)
|
icon = self._buddy_list_model.get_value(aniter, self._MODEL_COL_ICON)
|
||||||
if icon == self._pixbuf_new_message:
|
if icon == self._pixbuf_new_message:
|
||||||
self._buddy_list_model.set_value(aniter, self._MODEL_COL_ICON, self._pixbuf_active_chat)
|
self._buddy_list_model.set_value(aniter, self._MODEL_COL_ICON, self._pixbuf_active_chat)
|
||||||
|
@ -75,8 +75,15 @@ class ActivityHost(dbus.service.Object):
|
|||||||
index = notebook.append_page(self.socket, hbox)
|
index = notebook.append_page(self.socket, hbox)
|
||||||
notebook.set_current_page(index)
|
notebook.set_current_page(index)
|
||||||
|
|
||||||
|
def __close_button_clicked_reply_cb(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def __close_button_clicked_error_cb(self, error):
|
||||||
|
pass
|
||||||
|
|
||||||
def tab_close_button_clicked(self, button):
|
def tab_close_button_clicked(self, button):
|
||||||
self.peer_service.close_from_user()
|
self.peer_service.close_from_user(reply_handler = self.__close_button_clicked_reply_cb, \
|
||||||
|
error_handler = self.__close_button_clicked_error_cb)
|
||||||
|
|
||||||
@dbus.service.method("com.redhat.Sugar.Shell.ActivityHost", \
|
@dbus.service.method("com.redhat.Sugar.Shell.ActivityHost", \
|
||||||
in_signature="", \
|
in_signature="", \
|
||||||
|
Loading…
Reference in New Issue
Block a user