[gnome-games/sudoku-tube] Fix



commit 0bd6d6e405e3bdf27a13740e73f9e66863190c20
Author: Zhang Sen <zh jesse gmail com>
Date:   Thu Aug 13 09:36:52 2009 +0800

    Fix

 gnome-sudoku/src/lib/main.py       |    5 +++--
 gnome-sudoku/src/lib/networking.py |    9 +--------
 gnome-sudoku/src/lib/view.py       |    2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 5e64678..bdb36fd 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -2,13 +2,14 @@
 try:
     import pygtk
     pygtk.require('2.0')
-except ImportError, err:
+except ImportError:
     print ("PyGTK not found. Please make sure it is installed properly and referenced in your PYTHONPATH environment variable.")
 
 import logging
 import os.path
 import threading
 
+import dbus
 import gobject
 import gtk
 from gettext import gettext as _
@@ -565,7 +566,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
         myself = networking.Peer(bus, me, self)
         try:
             self._peer = bus.get_object(object_path=peer)
-        except DBusException as err:
+        except dbus.exceptions.DBusException as err:
             logger.error("Error when contacting with initiator: %s" % err)
             return False
         return True
diff --git a/gnome-sudoku/src/lib/networking.py b/gnome-sudoku/src/lib/networking.py
index 09df81e..ce3ad3a 100644
--- a/gnome-sudoku/src/lib/networking.py
+++ b/gnome-sudoku/src/lib/networking.py
@@ -55,10 +55,6 @@ class SideViewProxy(dbus.service.Object):
         self._view.set_value(x, y, 0)
         self._view.set_background_color(x, y, None)
 
-    @dbus.service.method(dbus_interface=view_interface,
-            in_signature="", out_signature="")
-    def puzzle_finished_cb(self):
-        print "the other user has finished"
 
 class RemoteViewHandler:
 
@@ -84,11 +80,8 @@ class RemoteViewHandler:
                         reply_handler=self._handle_reply,
                         error_handler=self._handle_error)
 
-    def puzzle_finished_cb(self):
-        self._remote_proxy.puzzle_finished_cb()
-
     def _handle_reply(self):
         pass
 
     def _handle_error(self, error):
-        print 'error: ', error
+        logger.error('Failed to update the remote view: %s' % error)
diff --git a/gnome-sudoku/src/lib/view.py b/gnome-sudoku/src/lib/view.py
index c43b24e..a360a1e 100644
--- a/gnome-sudoku/src/lib/view.py
+++ b/gnome-sudoku/src/lib/view.py
@@ -428,4 +428,4 @@ class SudokuSideView(SudokuNumberGrid):
         for x in range(self.group_size):
             for y in range(self.group_size):
                 self.set_value(x, y, 0)
-                self.set_color(x, y, None)
+                self.set_background_color(x, y, None)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]