gnome-games r7143 - in trunk/glchess: . src



Author: andreasr
Date: Sat Jan 12 10:18:15 2008
New Revision: 7143
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7143&view=rev

Log:
Port bugfix #406672 from sudoku to glChess.


Modified:
   trunk/glchess/ChangeLog
   trunk/glchess/src/glchess.in.in

Modified: trunk/glchess/src/glchess.in.in
==============================================================================
--- trunk/glchess/src/glchess.in.in	(original)
+++ trunk/glchess/src/glchess.in.in	Sat Jan 12 10:18:15 2008
@@ -20,34 +20,29 @@
 
 except ImportError:
     try:
-      # Import glchess from system installation.
+      # Import glChess from pyexecdir or system installation.
       installed_mode = True
-      from glchess.glchess import start_game
-    except ImportError:
       import sys
       if "#pyexecdir#" not in sys.path:
           sys.path.insert(0, "#pyexecdir#")
+      from glchess.glchess import start_game
 
-      try:
-          # Import glchess from system installation (with pyexecdir in path).
-          from glchess.glchess import start_game
-
-      except ImportError:
-	  # Import of glchess failed. Show error message.
-          import gtk
-  	  import os.path
-	  import gettext
-          from gettext import gettext as _
+    except ImportError:
+      # Import of glChess failed. Show error message.
+      import gtk
+      import os.path
+      import gettext
+      from gettext import gettext as _
         
-	  gettext.bindtextdomain('gnome-games', os.path.join('@prefix@', 'share', 'locale'))
-	  gettext.textdomain('gnome-games')
-          title = _("Chess incorrectly installed")
-          description = _("""Chess is not able to start because required application files are not installed. If you are currently upgrading your system please wait until the upgrade has completed.""")
-          dialog = gtk.MessageDialog(type = gtk.MESSAGE_ERROR, message_format = title)
-          dialog.format_secondary_text(description)
-          dialog.add_button(gtk.STOCK_QUIT, gtk.RESPONSE_CLOSE)
-          dialog.run()
-          sys.exit(0)
+      gettext.bindtextdomain('gnome-games', os.path.join('@prefix@', 'share', 'locale'))
+      gettext.textdomain('gnome-games')
+      title = _("Chess incorrectly installed")
+      description = _("""Chess is not able to start because required application files are not installed. If you are currently upgrading your system please wait until the upgrade has completed.""")
+      dialog = gtk.MessageDialog(type = gtk.MESSAGE_ERROR, message_format = title)
+      dialog.format_secondary_text(description)
+      dialog.add_button(gtk.STOCK_QUIT, gtk.RESPONSE_CLOSE)
+      dialog.run()
+      sys.exit(0)
 
 sys.modules["glchess"].installed_mode = installed_mode
 



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