[gnome-games/sudoku-tube] Properly change self._is_initiator
- From: Zhang Sen <zhangsen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games/sudoku-tube] Properly change self._is_initiator
- Date: Tue, 11 Aug 2009 11:52:52 +0000 (UTC)
commit 35a4b737055e52d517c2973346e61d71eaf998ab
Author: Zhang Sen <zh jesse gmail com>
Date: Tue Aug 11 18:34:04 2009 +0800
Properly change self._is_initiator
Only set to True when contact is selected.
Set to None if user cancels offering.
gnome-sudoku/src/lib/main.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 2327f26..40215d3 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -451,9 +451,9 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
def _new_with_contact_cb(self, action):
assert self._is_initiator is None
- self._is_initiator = True
choice = contact_selector.contact_selector_run(self.w)
if choice:
+ self._is_initiator = True
conn, handle, contact = choice
logger.debug("selected: %s\n connection: %s\n handle: %d" % (
contact.alias, conn.service_name, handle))
@@ -482,6 +482,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
if self._is_waiting_for_response:
if response_id in (gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT):
self._tube_offer.cancel()
+ self._is_initiator = None
# else don't need to do anything
self._wait_dialog.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]