Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnacio Rodríguez <ignacio@Ignacio-Magallanes.(none)>2012-10-26 14:50:08 (GMT)
committer Ignacio Rodríguez <ignacio@Ignacio-Magallanes.(none)>2012-10-26 14:50:08 (GMT)
commitdb0d08685410d174d7eab0fb875a8807f6cd01db (patch)
tree64794fdc1af45ee5ea111f1556b1ff96dea1a8b3
parent704742313a2c5a60e34510fca8d410c6384409b7 (diff)
Port finish, But I Need Summary!
-rw-r--r--GNUChessActivity.py180
-rw-r--r--NEWS5
-rw-r--r--activity/activity.info2
-rw-r--r--[-rwxr-xr-x]bin/armv7l/gnuchessbin184824 -> 184824 bytes
-rw-r--r--[-rwxr-xr-x]bin/i686/gnuchessbin180672 -> 180672 bytes
-rw-r--r--chess.py69
-rw-r--r--locale/cs/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 415 bytes
-rw-r--r--locale/cs/activity.linfo2
-rw-r--r--locale/da/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3133 bytes
-rw-r--r--locale/da/activity.linfo2
-rw-r--r--locale/el/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 730 bytes
-rw-r--r--locale/el/activity.linfo2
-rw-r--r--locale/en/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3248 bytes
-rw-r--r--locale/en/activity.linfo2
-rw-r--r--locale/en_GB/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3251 bytes
-rw-r--r--locale/en_GB/activity.linfo2
-rw-r--r--locale/en_US/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3251 bytes
-rw-r--r--locale/en_US/activity.linfo2
-rw-r--r--locale/es/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3309 bytes
-rw-r--r--locale/es/activity.linfo2
-rw-r--r--locale/fr/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 660 bytes
-rw-r--r--locale/fr/activity.linfo2
-rw-r--r--locale/hy/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3402 bytes
-rw-r--r--locale/hy/activity.linfo2
-rw-r--r--locale/mi/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 728 bytes
-rw-r--r--locale/mi/activity.linfo2
-rw-r--r--locale/nl/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3125 bytes
-rw-r--r--locale/nl/activity.linfo2
-rw-r--r--locale/quz/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 723 bytes
-rw-r--r--locale/quz/activity.linfo2
-rw-r--r--locale/zh_CN/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mobin0 -> 3072 bytes
-rw-r--r--locale/zh_CN/activity.linfo2
-rw-r--r--po/SimpleGNUChess.pot49
-rw-r--r--po/el.po18
-rw-r--r--po/en.po58
-rw-r--r--po/en_GB.po58
-rw-r--r--po/en_US.po58
-rw-r--r--po/es.po8
-rw-r--r--po/fr.po100
-rw-r--r--po/hus.po244
-rw-r--r--po/hy.po11
-rw-r--r--po/id.po242
-rw-r--r--po/mi.po106
-rw-r--r--po/nah.po242
-rw-r--r--po/pl.po246
-rw-r--r--po/tvl.po242
-rw-r--r--po/vi.po242
-rw-r--r--[-rwxr-xr-x]setup.py33
-rw-r--r--sprites.py467
-rw-r--r--toolbar_utils.py40
-rw-r--r--utils.py5
51 files changed, 835 insertions, 1916 deletions
diff --git a/GNUChessActivity.py b/GNUChessActivity.py
index 4d24ff2..5a11f27 100644
--- a/GNUChessActivity.py
+++ b/GNUChessActivity.py
@@ -1,4 +1,5 @@
#Copyright (c) 2012 Walter Bender
+#Copyright (c) 2012 Ignacio Rodriguez
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -9,27 +10,20 @@
# along with this library; if not, write to the Free Software
# Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
-
-import gtk
-import gobject
-
-from sugar.activity import activity
-from sugar import profile
-try:
- from sugar.graphics.toolbarbox import ToolbarBox
- _have_toolbox = True
-except ImportError:
- _have_toolbox = False
-if _have_toolbox:
- from sugar.activity.widgets import ActivityToolbarButton
- from sugar.activity.widgets import StopButton
- from sugar.graphics.toolbarbox import ToolbarButton
-from sugar.graphics.objectchooser import ObjectChooser
-from sugar.datastore import datastore
-from sugar import mime
-from sugar.graphics.alert import ConfirmationAlert, NotifyAlert
-from sugar.graphics.icon import Icon
-from sugar.graphics.xocolor import XoColor
+from gi.repository import Gtk, Gdk, GObject
+
+from sugar3.activity import activity
+from sugar3 import profile
+from sugar3.graphics.toolbarbox import ToolbarBox
+from sugar3.activity.widgets import ActivityToolbarButton
+from sugar3.activity.widgets import StopButton
+from sugar3.graphics.toolbarbox import ToolbarButton
+from sugar3.graphics.objectchooser import ObjectChooser
+from sugar3.datastore import datastore
+from sugar3 import mime
+from sugar3.graphics.alert import ConfirmationAlert, NotifyAlert
+from sugar3.graphics.icon import Icon
+from sugar3.graphics.xocolor import XoColor
from toolbar_utils import button_factory, label_factory, separator_factory, \
radio_factory, entry_factory
@@ -40,8 +34,8 @@ import telepathy
import dbus
from dbus.service import signal
from dbus.gobject_service import ExportedGObject
-from sugar.presence import presenceservice
-from sugar.presence.tubeconn import TubeConnection
+from sugar3.presence import presenceservice
+from sugar3.presence.tubeconn import TubeConnection
from gettext import gettext as _
@@ -88,9 +82,9 @@ class GNUChessActivity(activity.Activity):
self._setup_dispatch_table()
# Create a canvas
- canvas = gtk.DrawingArea()
- canvas.set_size_request(gtk.gdk.screen_width(), \
- gtk.gdk.screen_height())
+ canvas = Gtk.DrawingArea()
+ canvas.set_size_request(Gdk.Screen.width(), \
+ Gdk.Screen.height())
self.set_canvas(canvas)
canvas.show()
self.show_all()
@@ -120,7 +114,8 @@ class GNUChessActivity(activity.Activity):
if hasattr(self.get_window(), 'get_cursor'):
self.get_window().set_cursor(self.old_cursor)
else:
- self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
+ Left = Gdk.Cursor(Gdk.CursorType.LEFT_PTR)
+ self.get_window().set_cursor(Left)
def set_thinking_cursor(self):
''' Thinking, so set watch cursor. '''
@@ -128,71 +123,57 @@ class GNUChessActivity(activity.Activity):
return
if hasattr(self.get_window(), 'get_cursor'):
self.old_cursor = self.get_window().get_cursor()
- self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+ Watch = Gdk.Cursor(Gdk.CursorType.WATCH)
+ self.get_window().set_cursor(Watch)
def _setup_toolbars(self):
''' Setup the toolbars. '''
self.max_participants = 2
- self.edit_toolbar = gtk.Toolbar()
- self.view_toolbar = gtk.Toolbar()
- self.adjust_toolbar = gtk.Toolbar()
- self.custom_toolbar = gtk.Toolbar()
-
- if _have_toolbox:
- toolbox = ToolbarBox()
-
- activity_button = ActivityToolbarButton(self)
- toolbox.toolbar.insert(activity_button, 0)
- activity_button.show()
-
- edit_toolbar_button = ToolbarButton(label=_("Edit"),
- page=self.edit_toolbar,
- icon_name='toolbar-edit')
- self.edit_toolbar.show()
- toolbox.toolbar.insert(edit_toolbar_button, -1)
- edit_toolbar_button.show()
-
- view_toolbar_button = ToolbarButton(label=_("View"),
- page=self.view_toolbar,
- icon_name='toolbar-view')
- self.view_toolbar.show()
- toolbox.toolbar.insert(view_toolbar_button, -1)
- view_toolbar_button.show()
-
- adjust_toolbar_button = ToolbarButton(label=_('Adjust'),
- page=self.adjust_toolbar,
- icon_name=\
- 'preferences-system')
- self.adjust_toolbar.show()
- toolbox.toolbar.insert(adjust_toolbar_button, -1)
- adjust_toolbar_button.show()
-
- custom_toolbar_button = ToolbarButton(label=_("Custom"),
- page=self.custom_toolbar,
- icon_name='view-source')
- self.custom_toolbar.show()
- toolbox.toolbar.insert(custom_toolbar_button, -1)
- custom_toolbar_button.show()
-
- self.set_toolbar_box(toolbox)
- toolbox.show()
- self.toolbar = toolbox.toolbar
-
- adjust_toolbar_button.set_expanded(True)
-
- else:
- # Use pre-0.86 toolbar design
- games_toolbar = gtk.Toolbar()
- toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(toolbox)
- toolbox.add_toolbar(_('Play'), self.adjust_toolbar)
- toolbox.add_toolbar(_('Edit'), self.edit_toolbar)
- toolbox.add_toolbar(_('View'), self.view_toolbar)
- toolbox.add_toolbar(_('Custom'), self.custom_toolbar)
- toolbox.show()
- toolbox.set_current_toolbar(1)
- self.toolbar = self.adjust_toolbar
+ self.edit_toolbar = Gtk.Toolbar()
+ self.view_toolbar = Gtk.Toolbar()
+ self.adjust_toolbar = Gtk.Toolbar()
+ self.custom_toolbar = Gtk.Toolbar()
+
+ toolbox = ToolbarBox()
+
+ activity_button = ActivityToolbarButton(self)
+ toolbox.toolbar.insert(activity_button, 0)
+ activity_button.show()
+
+ edit_toolbar_button = ToolbarButton(label=_("Edit"),
+ page=self.edit_toolbar,
+ icon_name='toolbar-edit')
+ self.edit_toolbar.show()
+ toolbox.toolbar.insert(edit_toolbar_button, -1)
+ edit_toolbar_button.show()
+
+ view_toolbar_button = ToolbarButton(label=_("View"),
+ page=self.view_toolbar,
+ icon_name='toolbar-view')
+ self.view_toolbar.show()
+ toolbox.toolbar.insert(view_toolbar_button, -1)
+ view_toolbar_button.show()
+
+ adjust_toolbar_button = ToolbarButton(label=_('Adjust'),
+ page=self.adjust_toolbar,
+ icon_name='preferences-system')
+ self.adjust_toolbar.show()
+ toolbox.toolbar.insert(adjust_toolbar_button, -1)
+ adjust_toolbar_button.show()
+
+ custom_toolbar_button = ToolbarButton(label=_("Custom"),
+ page=self.custom_toolbar,
+ icon_name='view-source')
+ self.custom_toolbar.show()
+ toolbox.toolbar.insert(custom_toolbar_button, -1)
+ custom_toolbar_button.show()
+
+ self.set_toolbar_box(toolbox)
+ toolbox.show()
+ self.toolbar = toolbox.toolbar
+
+ adjust_toolbar_button.set_expanded(True)
button_factory('edit-copy',
self.edit_toolbar,
@@ -333,12 +314,11 @@ class GNUChessActivity(activity.Activity):
self.status = label_factory(self.toolbar, '')
self.status.set_label(_("It is White's move."))
- if _have_toolbox:
- separator_factory(toolbox.toolbar, True, False)
- stop_button = StopButton(self)
- stop_button.props.accelerator = '<Ctrl>q'
- toolbox.toolbar.insert(stop_button, -1)
- stop_button.show()
+ separator_factory(toolbox.toolbar, True, False)
+ stop_button = StopButton(self)
+ stop_button.props.accelerator = '<Ctrl>q'
+ toolbox.toolbar.insert(stop_button, -1)
+ stop_button.show()
button_factory('white-pawn',
self.custom_toolbar,
@@ -524,12 +504,12 @@ class GNUChessActivity(activity.Activity):
return
def _copy_cb(self, *args):
- clipboard = gtk.Clipboard()
+ clipboard = Gtk.Clipboard()
clipboard.set_text(self.tag_pairs() + self._gnuchess.copy_game())
def _paste_cb(self, *args):
''' Pasting '''
- clipboard = gtk.Clipboard()
+ clipboard = Gtk.Clipboard()
move_list = self._parse_move_list(clipboard.wait_for_text())
if move_list is not None:
self._gnuchess.restore_game(move_list)
@@ -701,11 +681,11 @@ class GNUChessActivity(activity.Activity):
chooser = ObjectChooser(parent=self, what_filter=None)
except TypeError:
chooser = ObjectChooser(None, activity,
- gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
+ Gtk.DialogType.MODAL | Gtk.DialogType.DESTROY_WITH_PARENT)
if chooser is not None:
try:
result = chooser.run()
- if result == gtk.RESPONSE_ACCEPT:
+ if result == Gtk.Responsetype.ACCEPT:
jobject = chooser.get_selected_object()
if jobject and jobject.file_path:
name = jobject.metadata['title']
@@ -774,9 +754,9 @@ class GNUChessActivity(activity.Activity):
alert.props.msg = _('Do you want to start a new game?')
def _new_game_alert_response_cb(alert, response_id, self, button):
- if response_id is gtk.RESPONSE_OK:
+ if response_id is Gtk.ResponseType.OK:
self._take_button_action(button)
- elif response_id is gtk.RESPONSE_CANCEL:
+ elif response_id is Gtk.ResponseType.CANCEL:
self._no_action(button)
self._restoring = False
self.remove_alert(alert)
@@ -991,7 +971,7 @@ params=%r state=%d' % (id, initiator, type, service, params, state))
def send_piece(self, piece, pixbuf):
_logger.debug('send_piece %s' % (piece))
- gobject.idle_add(self.send_event, 'p|%s' % (self._dump(piece, pixbuf)))
+ GObject.idle_add(self.send_event, 'p|%s' % (self._dump(piece, pixbuf)))
def _receive_piece(self, payload):
piece, pixbuf = self._load(payload)
diff --git a/NEWS b/NEWS
index 997b81a..8b84e15 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+7
+
+ENHANCEMENT:
+* Ignacio Rodriguez port to gtk3
+
6
ENHANCEMENT:
diff --git a/activity/activity.info b/activity/activity.info
index ce701a5..34397e3 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,6 +1,6 @@
[Activity]
name = SimpleGNUChess
-activity_version = 6
+activity_version = 7
license = GPLv3
bundle_id = org.sugarlabs.GNUChessActivity
exec = sugar-activity GNUChessActivity.GNUChessActivity
diff --git a/bin/armv7l/gnuchess b/bin/armv7l/gnuchess
index 5475f3e..5475f3e 100755..100644
--- a/bin/armv7l/gnuchess
+++ b/bin/armv7l/gnuchess
Binary files differ
diff --git a/bin/i686/gnuchess b/bin/i686/gnuchess
index f8a2870..f8a2870 100755..100644
--- a/bin/i686/gnuchess
+++ b/bin/i686/gnuchess
Binary files differ
diff --git a/chess.py b/chess.py
index 42a6f44..30a1369 100644
--- a/chess.py
+++ b/chess.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
#Copyright (c) 2012 Walter Bender
+#Copyright (c) 2012 Ignacio Rodriguez
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,9 +11,7 @@
# along with this library; if not, write to the Free Software
# Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
-
-import gtk
-import gobject
+from gi.repository import Gtk, Gdk, GdkPixbuf, GObject
import cairo
import os
import subprocess
@@ -76,17 +75,16 @@ class Gnuchess():
parent.show_all()
self._parent = parent
- self._canvas.set_flags(gtk.CAN_FOCUS)
- self._canvas.add_events(gtk.gdk.BUTTON_PRESS_MASK)
- self._canvas.add_events(gtk.gdk.BUTTON_RELEASE_MASK)
- self._canvas.add_events(gtk.gdk.POINTER_MOTION_MASK)
- self._canvas.connect("expose-event", self._expose_cb)
+ self._canvas.add_events(Gdk.EventMask.BUTTON_PRESS_MASK)
+ self._canvas.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK)
+ self._canvas.add_events(Gdk.EventMask.POINTER_MOTION_MASK)
+ self._canvas.connect("draw", self.__draw_cb)
self._canvas.connect("button-press-event", self._button_press_cb)
self._canvas.connect("button-release-event", self._button_release_cb)
self._canvas.connect("motion-notify-event", self._mouse_move_cb)
- self._width = gtk.gdk.screen_width()
- self._height = gtk.gdk.screen_height()
+ self._width = Gdk.Screen.width()
+ self._height = Gdk.Screen.height()
self.scale = int((self._height - 55) / 10)
self.we_are_sharing = False
@@ -128,6 +126,8 @@ class Gnuchess():
def move(self, my_move):
''' Send a command to gnuchess. '''
+ # Permisos para jugar
+ os.system('chmod -R 755 bin')
p = subprocess.Popen(['%s/%s/gnuchess' % (self._bundle_path,
self._bin_path)],
stdin=subprocess.PIPE,
@@ -350,7 +350,7 @@ class Gnuchess():
if self._counter < len(self._copy_of_move_list):
self.move(self._copy_of_move_list[self._counter])
self._counter += 1
- gobject.timeout_add(2000, self._stepper)
+ GObject.timeout_add(2000, self._stepper)
def _button_press_cb(self, win, event):
win.grab_focus()
@@ -509,7 +509,7 @@ class Gnuchess():
self._activity.status.set_label(_('Thinking...'))
self._thinking = True
self._get_before()
- gobject.timeout_add(500, self._robot_move)
+ GObject.timeout_add(500, self._robot_move)
return True
@@ -584,11 +584,11 @@ class Gnuchess():
self._activity.set_thinking_cursor()
self._activity.status.set_label(_('Thinking'))
self._thinking = True
- gobject.timeout_add(500, self.move, HINT)
+ GObject.timeout_add(500, self.move, HINT)
def _flash_tile(self, tiles, flash_color=2):
self._counter = 0
- gobject.timeout_add(100, self._flasher, tiles, flash_color)
+ GObject.timeout_add(100, self._flasher, tiles, flash_color)
return
def _flasher(self, tiles, flash_color):
@@ -603,7 +603,7 @@ class Gnuchess():
else:
self._board[i].set_image(self._squares[black_or_white(i)])
self._board[i].set_layer(BOT)
- gobject.timeout_add(200, self._flasher, tiles, flash_color)
+ GObject.timeout_add(200, self._flasher, tiles, flash_color)
def _parse_move(self, move):
tiles = []
@@ -1519,9 +1519,8 @@ class Gnuchess():
return ('%s%d' % (FILES[int((pos[0] - xo) / self.scale)],
8 - int((pos[1] - yo) / self.scale)))
- def _expose_cb(self, win, event):
- self.do_expose_event(event)
-
+ def __draw_cb(self, canvas, cr):
+ self._sprites.redraw_sprites(cr=cr)
def do_expose_event(self, event):
''' Handle the expose-event by drawing '''
# Restrict Cairo to the exposed area
@@ -1533,7 +1532,7 @@ class Gnuchess():
self._sprites.redraw_sprites(cr=cr)
def _destroy_cb(self, win, event):
- gtk.main_quit()
+ Gtk.main_quit()
def _load_board(self, board):
''' Load the board based on gnuchess board output '''
@@ -1648,7 +1647,7 @@ class Gnuchess():
self.reskin(piece, pixbuf)
def reskin_from_file(self, piece, file_path, return_pixbuf=False):
- pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(
+ pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
file_path, self.scale, self.scale)
self.reskin(piece, pixbuf)
if return_pixbuf:
@@ -1741,12 +1740,12 @@ class Gnuchess():
yo = int(self.scale / 2)
self.rank = Sprite(self._sprites, xo - self.scale, yo,
- gtk.gdk.pixbuf_new_from_file_at_size(
+ GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/images/rank.svg' % (self._bundle_path),
self.scale, 8 * self.scale))
self.rank.set_layer(0)
self.file = Sprite(self._sprites, xo, yo + int(self.scale * 8),
- gtk.gdk.pixbuf_new_from_file_at_size(
+ GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/images/file.svg' % (self._bundle_path),
8 * self.scale, self.scale))
self.file.set_layer(0)
@@ -1771,29 +1770,29 @@ class Gnuchess():
x += self.scale
y += self.scale
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/white-pawn.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/black-pawn.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/white-rook.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/black-rook.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/white-knight.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/black-knight.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/white-bishop.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/black-bishop.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/white-queen.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/black-queen.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/white-king.svg' % (self._bundle_path), w, h))
- self.skins.append(gtk.gdk.pixbuf_new_from_file_at_size(
+ self.skins.append(GdkPixbuf.Pixbuf.new_from_file_at_size(
'%s/icons/black-king.svg' % (self._bundle_path), w, h))
self.white.append(Sprite(self._sprites, 0, 0, self.skins[WR]))
@@ -1899,7 +1898,7 @@ class Gnuchess():
def svg_str_to_pixbuf(svg_string, w=None, h=None):
""" Load pixbuf from SVG string """
- pl = gtk.gdk.PixbufLoader('svg')
+ pl = GdkPixbuf.PixbufLoader.new_with_type('svg')
if w is not None:
pl.set_size(w, h)
pl.write(svg_string)
diff --git a/locale/cs/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/cs/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..4fdd27c
--- /dev/null
+++ b/locale/cs/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/cs/activity.linfo b/locale/cs/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/cs/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/da/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/da/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..36d9655
--- /dev/null
+++ b/locale/da/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/da/activity.linfo b/locale/da/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/da/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/el/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/el/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..05d4138
--- /dev/null
+++ b/locale/el/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/el/activity.linfo b/locale/el/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/el/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/en/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/en/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..33c5e4a
--- /dev/null
+++ b/locale/en/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/en/activity.linfo b/locale/en/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/en/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/en_GB/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/en_GB/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..a94bf19
--- /dev/null
+++ b/locale/en_GB/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/en_GB/activity.linfo b/locale/en_GB/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/en_GB/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/en_US/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/en_US/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..12b2d9e
--- /dev/null
+++ b/locale/en_US/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/en_US/activity.linfo b/locale/en_US/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/en_US/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/es/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/es/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..dcacfa1
--- /dev/null
+++ b/locale/es/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/es/activity.linfo b/locale/es/activity.linfo
new file mode 100644
index 0000000..13f7f52
--- /dev/null
+++ b/locale/es/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = Ajedrez
diff --git a/locale/fr/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/fr/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..2635288
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/fr/activity.linfo b/locale/fr/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/fr/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/hy/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/hy/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..4203c4a
--- /dev/null
+++ b/locale/hy/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/hy/activity.linfo b/locale/hy/activity.linfo
new file mode 100644
index 0000000..eea947a
--- /dev/null
+++ b/locale/hy/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = ՊարզGNUՇախմատ
diff --git a/locale/mi/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/mi/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..1280ed2
--- /dev/null
+++ b/locale/mi/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/mi/activity.linfo b/locale/mi/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/mi/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/nl/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/nl/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..9cf08c3
--- /dev/null
+++ b/locale/nl/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/nl/activity.linfo b/locale/nl/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/nl/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/quz/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/quz/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..92a60f7
--- /dev/null
+++ b/locale/quz/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/quz/activity.linfo b/locale/quz/activity.linfo
new file mode 100644
index 0000000..3ca41b7
--- /dev/null
+++ b/locale/quz/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = SimpleGNUChess
diff --git a/locale/zh_CN/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo b/locale/zh_CN/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
new file mode 100644
index 0000000..7f0387c
--- /dev/null
+++ b/locale/zh_CN/LC_MESSAGES/org.sugarlabs.GNUChessActivity.mo
Binary files differ
diff --git a/locale/zh_CN/activity.linfo b/locale/zh_CN/activity.linfo
new file mode 100644
index 0000000..6c1398d
--- /dev/null
+++ b/locale/zh_CN/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = GNU象棋
diff --git a/po/SimpleGNUChess.pot b/po/SimpleGNUChess.pot
index a7e2a01..6225d8b 100644
--- a/po/SimpleGNUChess.pot
+++ b/po/SimpleGNUChess.pot
@@ -8,10 +8,11 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
+"POT-Creation-Date: 2012-07-30 17:42-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -56,7 +57,7 @@ msgstr ""
msgid "Play game history"
msgstr ""
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
+#: GNUChessActivity.py:223 GNUChessActivity.py:519
msgid "Show game history"
msgstr ""
@@ -124,7 +125,7 @@ msgstr ""
msgid "Hint"
msgstr ""
-#: GNUChessActivity.py:334 chess.py:250
+#: GNUChessActivity.py:334 chess.py:249
msgid "It is White's move."
msgstr ""
@@ -176,66 +177,70 @@ msgstr ""
msgid "Black King"
msgstr ""
-#: GNUChessActivity.py:520
+#: GNUChessActivity.py:516
msgid "Show game board"
msgstr ""
-#: GNUChessActivity.py:773
+#: GNUChessActivity.py:770
msgid "Game in progress."
msgstr ""
-#: GNUChessActivity.py:774
+#: GNUChessActivity.py:771
msgid "Do you want to start a new game?"
msgstr ""
-#: chess.py:192
+#: chess.py:191
msgid "Illegal move"
msgstr ""
-#: chess.py:239 chess.py:462 chess.py:469
+#: chess.py:238 chess.py:461 chess.py:468
msgid "Check"
msgstr ""
-#: chess.py:241 chess.py:465 chess.py:471
+#: chess.py:240 chess.py:464 chess.py:470
msgid "Checkmate"
msgstr ""
-#: chess.py:252
+#: chess.py:251
msgid "It is Black's move."
msgstr ""
-#: chess.py:284
+#: chess.py:283
msgid "Black wins."
msgstr ""
-#: chess.py:286
+#: chess.py:285
msgid "White wins."
msgstr ""
-#: chess.py:290
+#: chess.py:289
msgid "White's King is in check."
msgstr ""
-#: chess.py:293
+#: chess.py:292
msgid "Black's King is in check."
msgstr ""
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
+#: chess.py:389
+msgid "White: please wait for your turn."
+msgstr ""
+
+#: chess.py:392
+msgid "Black: please wait for your turn."
msgstr ""
-#: chess.py:397
+#: chess.py:396
msgid "Please play White."
msgstr ""
-#: chess.py:399
+#: chess.py:398
msgid "Please play Black."
msgstr ""
-#: chess.py:481
-msgid "Thinking..."
+#: chess.py:480 chess.py:508
+msgid "Thinking"
msgstr ""
-#: chess.py:509
-msgid "Thinking"
+#: chess.py:505
+msgid "Please wait for your turn."
msgstr ""
diff --git a/po/el.po b/po/el.po
index ef021e1..70fceb8 100644
--- a/po/el.po
+++ b/po/el.po
@@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-09-10 20:39+0200\n"
-"Last-Translator: Yannis <kiolalis@gmail.com>\n"
+"PO-Revision-Date: 2012-08-01 07:35+0200\n"
+"Last-Translator: Chris <cjl@laptop.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: el\n"
"MIME-Version: 1.0\n"
@@ -19,7 +19,7 @@ msgstr ""
#: activity/activity.info:2
msgid "SimpleGNUChess"
-msgstr "GNUσκάκι"
+msgstr ""
#: GNUChessActivity.py:149 GNUChessActivity.py:190
msgid "Edit"
@@ -31,15 +31,15 @@ msgstr "Προβολή"
#: GNUChessActivity.py:163
msgid "Adjust"
-msgstr "Διευθέτηση"
+msgstr ""
#: GNUChessActivity.py:171 GNUChessActivity.py:192
msgid "Custom"
-msgstr "Προσαρμοσμένο"
+msgstr ""
#: GNUChessActivity.py:189
msgid "Play"
-msgstr "Αναπαραγωγή"
+msgstr ""
#: GNUChessActivity.py:200
msgid "Copy"
@@ -55,15 +55,15 @@ msgstr "Πλήρης Οθόνη"
#: GNUChessActivity.py:218
msgid "Play game history"
-msgstr "Ιστορικό αναπαραγωγής του παιχνιδιού"
+msgstr ""
#: GNUChessActivity.py:223 GNUChessActivity.py:523
msgid "Show game history"
-msgstr "Εμφάνιση ιστορικού του παιχνιδιού"
+msgstr ""
#: GNUChessActivity.py:228
msgid "White: "
-msgstr "Λευκό:"
+msgstr ""
#: GNUChessActivity.py:231
msgid "White's move"
diff --git a/po/en.po b/po/en.po
index 90130e7..acad587 100644
--- a/po/en.po
+++ b/po/en.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-08-05 07:28+0200\n"
+"POT-Creation-Date: 2012-07-30 17:42-0400\n"
+"PO-Revision-Date: 2012-07-31 08:16+0200\n"
"Last-Translator: Chris <cjl@laptop.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en\n"
@@ -57,7 +57,7 @@ msgstr "Fullscreen"
msgid "Play game history"
msgstr "Play game history"
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
+#: GNUChessActivity.py:223 GNUChessActivity.py:519
msgid "Show game history"
msgstr "Show game history"
@@ -125,7 +125,7 @@ msgstr "Undo"
msgid "Hint"
msgstr "Hint"
-#: GNUChessActivity.py:334 chess.py:250
+#: GNUChessActivity.py:334 chess.py:249
msgid "It is White's move."
msgstr "It is White's move."
@@ -177,72 +177,70 @@ msgstr "White King"
msgid "Black King"
msgstr "Black King"
-#: GNUChessActivity.py:520
+#: GNUChessActivity.py:516
msgid "Show game board"
msgstr "Show game board"
-#: GNUChessActivity.py:773
+#: GNUChessActivity.py:770
msgid "Game in progress."
msgstr "Game in progress."
-#: GNUChessActivity.py:774
+#: GNUChessActivity.py:771
msgid "Do you want to start a new game?"
msgstr "Do you want to start a new game?"
-#: chess.py:192
+#: chess.py:191
msgid "Illegal move"
msgstr "Illegal move"
-#: chess.py:239 chess.py:462 chess.py:469
+#: chess.py:238 chess.py:461 chess.py:468
msgid "Check"
msgstr "Check"
-#: chess.py:241 chess.py:465 chess.py:471
+#: chess.py:240 chess.py:464 chess.py:470
msgid "Checkmate"
msgstr "Checkmate"
-#: chess.py:252
+#: chess.py:251
msgid "It is Black's move."
msgstr "It is Black's move."
-#: chess.py:284
+#: chess.py:283
msgid "Black wins."
msgstr "Black wins."
-#: chess.py:286
+#: chess.py:285
msgid "White wins."
msgstr "White wins."
-#: chess.py:290
+#: chess.py:289
msgid "White's King is in check."
msgstr "White's King is in check."
-#: chess.py:293
+#: chess.py:292
msgid "Black's King is in check."
msgstr "Black's King is in check."
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr "Please wait for your turn."
+#: chess.py:389
+msgid "White: please wait for your turn."
+msgstr "White: please wait for your turn."
-#: chess.py:397
+#: chess.py:392
+msgid "Black: please wait for your turn."
+msgstr "Black: please wait for your turn."
+
+#: chess.py:396
msgid "Please play White."
msgstr "Please play White."
-#: chess.py:399
+#: chess.py:398
msgid "Please play Black."
msgstr "Please play Black."
-#: chess.py:481
-msgid "Thinking..."
-msgstr "Thinking..."
-
-#: chess.py:509
+#: chess.py:480 chess.py:508
msgid "Thinking"
msgstr "Thinking"
-#~ msgid "White: please wait for your turn."
-#~ msgstr "White: please wait for your turn."
-
-#~ msgid "Black: please wait for your turn."
-#~ msgstr "Black: please wait for your turn."
+#: chess.py:505
+msgid "Please wait for your turn."
+msgstr "Please wait for your turn."
diff --git a/po/en_GB.po b/po/en_GB.po
index f69f85b..dfc0ff1 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-08-09 07:58+0200\n"
+"POT-Creation-Date: 2012-07-30 17:42-0400\n"
+"PO-Revision-Date: 2012-07-31 08:16+0200\n"
"Last-Translator: Chris <cjl@laptop.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en_GB\n"
@@ -57,7 +57,7 @@ msgstr "Fullscreen"
msgid "Play game history"
msgstr "Play game history"
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
+#: GNUChessActivity.py:223 GNUChessActivity.py:519
msgid "Show game history"
msgstr "Show game history"
@@ -125,7 +125,7 @@ msgstr "Undo"
msgid "Hint"
msgstr "Hint"
-#: GNUChessActivity.py:334 chess.py:250
+#: GNUChessActivity.py:334 chess.py:249
msgid "It is White's move."
msgstr "It is White's move."
@@ -177,72 +177,70 @@ msgstr "White King"
msgid "Black King"
msgstr "Black King"
-#: GNUChessActivity.py:520
+#: GNUChessActivity.py:516
msgid "Show game board"
msgstr "Show game board"
-#: GNUChessActivity.py:773
+#: GNUChessActivity.py:770
msgid "Game in progress."
msgstr "Game in progress."
-#: GNUChessActivity.py:774
+#: GNUChessActivity.py:771
msgid "Do you want to start a new game?"
msgstr "Do you want to start a new game?"
-#: chess.py:192
+#: chess.py:191
msgid "Illegal move"
msgstr "Illegal move"
-#: chess.py:239 chess.py:462 chess.py:469
+#: chess.py:238 chess.py:461 chess.py:468
msgid "Check"
msgstr "Check"
-#: chess.py:241 chess.py:465 chess.py:471
+#: chess.py:240 chess.py:464 chess.py:470
msgid "Checkmate"
msgstr "Checkmate"
-#: chess.py:252
+#: chess.py:251
msgid "It is Black's move."
msgstr "It is Black's move."
-#: chess.py:284
+#: chess.py:283
msgid "Black wins."
msgstr "Black wins."
-#: chess.py:286
+#: chess.py:285
msgid "White wins."
msgstr "White wins."
-#: chess.py:290
+#: chess.py:289
msgid "White's King is in check."
msgstr "White's King is in check."
-#: chess.py:293
+#: chess.py:292
msgid "Black's King is in check."
msgstr "Black's King is in check."
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr "Please wait for your turn."
+#: chess.py:389
+msgid "White: please wait for your turn."
+msgstr "White: please wait for your turn."
-#: chess.py:397
+#: chess.py:392
+msgid "Black: please wait for your turn."
+msgstr "Black: please wait for your turn."
+
+#: chess.py:396
msgid "Please play White."
msgstr "Please play White."
-#: chess.py:399
+#: chess.py:398
msgid "Please play Black."
msgstr "Please play Black."
-#: chess.py:481
-msgid "Thinking..."
-msgstr "Thinking..."
-
-#: chess.py:509
+#: chess.py:480 chess.py:508
msgid "Thinking"
msgstr "Thinking"
-#~ msgid "White: please wait for your turn."
-#~ msgstr "White: please wait for your turn."
-
-#~ msgid "Black: please wait for your turn."
-#~ msgstr "Black: please wait for your turn."
+#: chess.py:505
+msgid "Please wait for your turn."
+msgstr "Please wait for your turn."
diff --git a/po/en_US.po b/po/en_US.po
index 03b8ffb..1bd9766 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-08-09 07:58+0200\n"
+"POT-Creation-Date: 2012-07-30 17:42-0400\n"
+"PO-Revision-Date: 2012-07-31 08:15+0200\n"
"Last-Translator: Chris <cjl@laptop.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en_US\n"
@@ -57,7 +57,7 @@ msgstr "Fullscreen"
msgid "Play game history"
msgstr "Play game history"
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
+#: GNUChessActivity.py:223 GNUChessActivity.py:519
msgid "Show game history"
msgstr "Show game history"
@@ -125,7 +125,7 @@ msgstr "Undo"
msgid "Hint"
msgstr "Hint"
-#: GNUChessActivity.py:334 chess.py:250
+#: GNUChessActivity.py:334 chess.py:249
msgid "It is White's move."
msgstr "It is White's move."
@@ -177,72 +177,70 @@ msgstr "White King"
msgid "Black King"
msgstr "Black King"
-#: GNUChessActivity.py:520
+#: GNUChessActivity.py:516
msgid "Show game board"
msgstr "Show game board"
-#: GNUChessActivity.py:773
+#: GNUChessActivity.py:770
msgid "Game in progress."
msgstr "Game in progress."
-#: GNUChessActivity.py:774
+#: GNUChessActivity.py:771
msgid "Do you want to start a new game?"
msgstr "Do you want to start a new game?"
-#: chess.py:192
+#: chess.py:191
msgid "Illegal move"
msgstr "Illegal move"
-#: chess.py:239 chess.py:462 chess.py:469
+#: chess.py:238 chess.py:461 chess.py:468
msgid "Check"
msgstr "Check"
-#: chess.py:241 chess.py:465 chess.py:471
+#: chess.py:240 chess.py:464 chess.py:470
msgid "Checkmate"
msgstr "Checkmate"
-#: chess.py:252
+#: chess.py:251
msgid "It is Black's move."
msgstr "It is Black's move."
-#: chess.py:284
+#: chess.py:283
msgid "Black wins."
msgstr "Black wins."
-#: chess.py:286
+#: chess.py:285
msgid "White wins."
msgstr "White wins."
-#: chess.py:290
+#: chess.py:289
msgid "White's King is in check."
msgstr "White's King is in check."
-#: chess.py:293
+#: chess.py:292
msgid "Black's King is in check."
msgstr "Black's King is in check."
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr "Please wait for your turn."
+#: chess.py:389
+msgid "White: please wait for your turn."
+msgstr "White: please wait for your turn."
-#: chess.py:397
+#: chess.py:392
+msgid "Black: please wait for your turn."
+msgstr "Black: please wait for your turn."
+
+#: chess.py:396
msgid "Please play White."
msgstr "Please play White."
-#: chess.py:399
+#: chess.py:398
msgid "Please play Black."
msgstr "Please play Black."
-#: chess.py:481
-msgid "Thinking..."
-msgstr "Thinking..."
-
-#: chess.py:509
+#: chess.py:480 chess.py:508
msgid "Thinking"
msgstr "Thinking"
-#~ msgid "White: please wait for your turn."
-#~ msgstr "White: please wait for your turn."
-
-#~ msgid "Black: please wait for your turn."
-#~ msgstr "Black: please wait for your turn."
+#: chess.py:505
+msgid "Please wait for your turn."
+msgstr "Please wait for your turn."
diff --git a/po/es.po b/po/es.po
index 511b77e..5357547 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-10-07 21:50+0200\n"
-"Last-Translator: Chris <cjl@laptop.org>\n"
+"PO-Revision-Date: 2012-08-06 22:19+0200\n"
+"Last-Translator: AlanJAS <alanjas@hotmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
@@ -63,7 +63,7 @@ msgstr "Mostrar la historia del juego"
#: GNUChessActivity.py:228
msgid "White: "
-msgstr "Blancas: "
+msgstr "Blancas:"
#: GNUChessActivity.py:231
msgid "White's move"
@@ -71,7 +71,7 @@ msgstr "Movimiento de las blancas"
#: GNUChessActivity.py:236
msgid "Black: "
-msgstr "Negras: "
+msgstr "Negras:"
#: GNUChessActivity.py:239
msgid "Black's move"
diff --git a/po/fr.po b/po/fr.po
index 6765b03..533f714 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -19,7 +19,7 @@ msgstr ""
#: activity/activity.info:2
msgid "SimpleGNUChess"
-msgstr "SimpleGNUChess"
+msgstr ""
#: GNUChessActivity.py:149 GNUChessActivity.py:190
msgid "Edit"
@@ -27,15 +27,15 @@ msgstr "Éditer"
#: GNUChessActivity.py:156 GNUChessActivity.py:191
msgid "View"
-msgstr "Voir"
+msgstr ""
#: GNUChessActivity.py:163
msgid "Adjust"
-msgstr "Ajuster"
+msgstr ""
#: GNUChessActivity.py:171 GNUChessActivity.py:192
msgid "Custom"
-msgstr "Adapter"
+msgstr ""
#: GNUChessActivity.py:189
msgid "Play"
@@ -55,67 +55,67 @@ msgstr "Plein écran"
#: GNUChessActivity.py:218
msgid "Play game history"
-msgstr "Rejouer l'historique de la partie"
+msgstr ""
#: GNUChessActivity.py:223 GNUChessActivity.py:523
msgid "Show game history"
-msgstr "Voir l'historique de la partie"
+msgstr ""
#: GNUChessActivity.py:228
msgid "White: "
-msgstr "Blanc: "
+msgstr ""
#: GNUChessActivity.py:231
msgid "White's move"
-msgstr "Coup blanc"
+msgstr ""
#: GNUChessActivity.py:236
msgid "Black: "
-msgstr "Noir: "
+msgstr ""
#: GNUChessActivity.py:239
msgid "Black's move"
-msgstr "Coup noir"
+msgstr ""
#: GNUChessActivity.py:246
msgid "Default pieces"
-msgstr "Pièces par défaut"
+msgstr ""
#: GNUChessActivity.py:252
msgid "Sugar-style pieces"
-msgstr "Pièces style \"Sugar\""
+msgstr ""
#: GNUChessActivity.py:262
msgid "Custom pieces"
-msgstr "Pièces personnalisées"
+msgstr ""
#: GNUChessActivity.py:270
msgid "Play White"
-msgstr "Jouer avec les blancs"
+msgstr ""
#: GNUChessActivity.py:276
msgid "Play Black"
-msgstr "Jouer avec les noirs"
+msgstr ""
#: GNUChessActivity.py:286
msgid "Beginner"
-msgstr "Débutant"
+msgstr ""
#: GNUChessActivity.py:292
msgid "Expert"
-msgstr "Expert"
+msgstr ""
#: GNUChessActivity.py:303
msgid "Play against the computer"
-msgstr "Jouer contre l'ordinateur"
+msgstr ""
#: GNUChessActivity.py:309
msgid "Play against a person"
-msgstr "Jouer contre une personne"
+msgstr ""
#: GNUChessActivity.py:320
msgid "New game"
-msgstr "Nouvelle partie"
+msgstr ""
#: GNUChessActivity.py:325
msgid "Undo"
@@ -123,120 +123,120 @@ msgstr "Défaire"
#: GNUChessActivity.py:330
msgid "Hint"
-msgstr "Conseil"
+msgstr ""
#: GNUChessActivity.py:334 chess.py:250
msgid "It is White's move."
-msgstr "À Blanc de jouer."
+msgstr ""
#: GNUChessActivity.py:347
msgid "White Pawn"
-msgstr "Pion blanc"
+msgstr ""
#: GNUChessActivity.py:353
msgid "Black Pawn"
-msgstr "Pion noir"
+msgstr ""
#: GNUChessActivity.py:359
msgid "White Rook"
-msgstr "Tour blanche"
+msgstr ""
#: GNUChessActivity.py:365
msgid "Black Rook"
-msgstr "Tour noire"
+msgstr ""
#: GNUChessActivity.py:371
msgid "White Knight"
-msgstr "Cavalier blanc"
+msgstr ""
#: GNUChessActivity.py:377
msgid "Black Knight"
-msgstr "Cavalier noir"
+msgstr ""
#: GNUChessActivity.py:383
msgid "White Bishop"
-msgstr "Fou blanc"
+msgstr ""
#: GNUChessActivity.py:389
msgid "Black Bishop"
-msgstr "Fou noir"
+msgstr ""
#: GNUChessActivity.py:395
msgid "White Queen"
-msgstr "Reine blanche"
+msgstr ""
#: GNUChessActivity.py:401
msgid "Black Queen"
-msgstr "Reine noire"
+msgstr ""
#: GNUChessActivity.py:407
msgid "White King"
-msgstr "Roi blanc"
+msgstr ""
#: GNUChessActivity.py:413
msgid "Black King"
-msgstr "Roi noir"
+msgstr ""
#: GNUChessActivity.py:520
msgid "Show game board"
-msgstr "Voir l'échiquier"
+msgstr ""
#: GNUChessActivity.py:773
msgid "Game in progress."
-msgstr "Partie en cours."
+msgstr ""
#: GNUChessActivity.py:774
msgid "Do you want to start a new game?"
-msgstr "Voulez-vous démarrer une nouvelle partie ?"
+msgstr ""
#: chess.py:192
msgid "Illegal move"
-msgstr "Coup impossible"
+msgstr ""
#: chess.py:239 chess.py:462 chess.py:469
msgid "Check"
-msgstr "Échec"
+msgstr ""
#: chess.py:241 chess.py:465 chess.py:471
msgid "Checkmate"
-msgstr "Échec et mat"
+msgstr ""
#: chess.py:252
msgid "It is Black's move."
-msgstr "A Noir de jouer."
+msgstr ""
#: chess.py:284
msgid "Black wins."
-msgstr "Noir gagne."
+msgstr ""
#: chess.py:286
msgid "White wins."
-msgstr "Blanc gagne."
+msgstr ""
#: chess.py:290
msgid "White's King is in check."
-msgstr "Le roi Blanc est en échec."
+msgstr ""
#: chess.py:293
msgid "Black's King is in check."
-msgstr "Le roi Noir est en échec."
+msgstr ""
#: chess.py:390 chess.py:393 chess.py:506
msgid "Please wait for your turn."
-msgstr "Merci d'attendre votre tour."
+msgstr ""
#: chess.py:397
msgid "Please play White."
-msgstr "Jouez Blanc s'il vous plaît."
+msgstr ""
#: chess.py:399
msgid "Please play Black."
-msgstr "Jouez Noir s'il vous plaît."
+msgstr ""
#: chess.py:481
msgid "Thinking..."
-msgstr "En réflexion..."
+msgstr ""
#: chess.py:509
msgid "Thinking"
-msgstr "En réflexion"
+msgstr ""
diff --git a/po/hus.po b/po/hus.po
deleted file mode 100644
index e3a30b4..0000000
--- a/po/hus.po
+++ /dev/null
@@ -1,244 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-10-07 22:43+0200\n"
-"Last-Translator: Chris <cjl@laptop.org>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: hus\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.0.5\n"
-
-#: activity/activity.info:2
-msgid "SimpleGNUChess"
-msgstr ""
-
-#: GNUChessActivity.py:149 GNUChessActivity.py:190
-msgid "Edit"
-msgstr "Jalk'uy"
-
-#: GNUChessActivity.py:156 GNUChessActivity.py:191
-msgid "View"
-msgstr "Tsu'uw"
-
-#: GNUChessActivity.py:163
-msgid "Adjust"
-msgstr "Xut'ut'uy"
-
-#: GNUChessActivity.py:171 GNUChessActivity.py:192
-msgid "Custom"
-msgstr "Kwete'k'ál"
-
-#: GNUChessActivity.py:189
-msgid "Play"
-msgstr ""
-
-#: GNUChessActivity.py:200
-msgid "Copy"
-msgstr "K'ot'biy"
-
-#: GNUChessActivity.py:206
-msgid "Paste"
-msgstr "Ts'at'k'a'"
-
-#: GNUChessActivity.py:212
-msgid "Fullscreen"
-msgstr "Putat walek"
-
-#: GNUChessActivity.py:218
-msgid "Play game history"
-msgstr ""
-
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
-msgid "Show game history"
-msgstr ""
-
-#: GNUChessActivity.py:228
-msgid "White: "
-msgstr "Dhakni': "
-
-#: GNUChessActivity.py:231
-msgid "White's move"
-msgstr ""
-
-#: GNUChessActivity.py:236
-msgid "Black: "
-msgstr "T'unu': "
-
-#: GNUChessActivity.py:239
-msgid "Black's move"
-msgstr ""
-
-#: GNUChessActivity.py:246
-msgid "Default pieces"
-msgstr ""
-
-#: GNUChessActivity.py:252
-msgid "Sugar-style pieces"
-msgstr ""
-
-#: GNUChessActivity.py:262
-msgid "Custom pieces"
-msgstr ""
-
-#: GNUChessActivity.py:270
-msgid "Play White"
-msgstr ""
-
-#: GNUChessActivity.py:276
-msgid "Play Black"
-msgstr ""
-
-#: GNUChessActivity.py:286
-#, fuzzy
-msgid "Beginner"
-msgstr "exobal ubat"
-
-#: GNUChessActivity.py:292
-#, fuzzy
-msgid "Expert"
-msgstr "ts'alpadh"
-
-#: GNUChessActivity.py:303
-msgid "Play against the computer"
-msgstr ""
-
-#: GNUChessActivity.py:309
-msgid "Play against a person"
-msgstr ""
-
-#: GNUChessActivity.py:320
-msgid "New game"
-msgstr ""
-
-#: GNUChessActivity.py:325
-msgid "Undo"
-msgstr "Wichk'ow"
-
-#: GNUChessActivity.py:330
-msgid "Hint"
-msgstr "Exóbchixtaláb"
-
-#: GNUChessActivity.py:334 chess.py:250
-msgid "It is White's move."
-msgstr ""
-
-#: GNUChessActivity.py:347
-msgid "White Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:353
-msgid "Black Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:359
-msgid "White Rook"
-msgstr ""
-
-#: GNUChessActivity.py:365
-msgid "Black Rook"
-msgstr ""
-
-#: GNUChessActivity.py:371
-msgid "White Knight"
-msgstr ""
-
-#: GNUChessActivity.py:377
-msgid "Black Knight"
-msgstr ""
-
-#: GNUChessActivity.py:383
-msgid "White Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:389
-msgid "Black Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:395
-msgid "White Queen"
-msgstr ""
-
-#: GNUChessActivity.py:401
-msgid "Black Queen"
-msgstr ""
-
-#: GNUChessActivity.py:407
-msgid "White King"
-msgstr ""
-
-#: GNUChessActivity.py:413
-msgid "Black King"
-msgstr ""
-
-#: GNUChessActivity.py:520
-msgid "Show game board"
-msgstr ""
-
-#: GNUChessActivity.py:773
-msgid "Game in progress."
-msgstr ""
-
-#: GNUChessActivity.py:774
-msgid "Do you want to start a new game?"
-msgstr ""
-
-#: chess.py:192
-msgid "Illegal move"
-msgstr ""
-
-#: chess.py:239 chess.py:462 chess.py:469
-msgid "Check"
-msgstr ""
-
-#: chess.py:241 chess.py:465 chess.py:471
-msgid "Checkmate"
-msgstr ""
-
-#: chess.py:252
-msgid "It is Black's move."
-msgstr ""
-
-#: chess.py:284
-msgid "Black wins."
-msgstr ""
-
-#: chess.py:286
-msgid "White wins."
-msgstr ""
-
-#: chess.py:290
-msgid "White's King is in check."
-msgstr ""
-
-#: chess.py:293
-msgid "Black's King is in check."
-msgstr ""
-
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr ""
-
-#: chess.py:397
-msgid "Please play White."
-msgstr ""
-
-#: chess.py:399
-msgid "Please play Black."
-msgstr ""
-
-#: chess.py:481
-msgid "Thinking..."
-msgstr ""
-
-#: chess.py:509
-msgid "Thinking"
-msgstr ""
diff --git a/po/hy.po b/po/hy.po
index f9dd0f9..281e4b9 100644
--- a/po/hy.po
+++ b/po/hy.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-08-29 20:48+0200\n"
+"PO-Revision-Date: 2012-08-06 17:55+0200\n"
"Last-Translator: anush.mkrtchyan <anush.mkrtchyan@ca1492.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: hy\n"
@@ -55,13 +55,12 @@ msgid "Fullscreen"
msgstr "Էկրանի չափով"
#: GNUChessActivity.py:218
-#, fuzzy
msgid "Play game history"
-msgstr "Ցուցադրել խաղի պատմությունը"
+msgstr ""
#: GNUChessActivity.py:223 GNUChessActivity.py:523
msgid "Show game history"
-msgstr "Ցուցադրել խաղի պատմությունը"
+msgstr ""
#: GNUChessActivity.py:228
msgid "White: "
@@ -81,11 +80,11 @@ msgstr "Սևի քայլը"
#: GNUChessActivity.py:246
msgid "Default pieces"
-msgstr "Պակաս խաղաքարեր"
+msgstr ""
#: GNUChessActivity.py:252
msgid "Sugar-style pieces"
-msgstr "Շաքար-ոճի խաղաքարեր"
+msgstr "Շաքար-ոճի քարեր"
#: GNUChessActivity.py:262
msgid "Custom pieces"
diff --git a/po/id.po b/po/id.po
deleted file mode 100644
index 320ec01..0000000
--- a/po/id.po
+++ /dev/null
@@ -1,242 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-08-02 03:48+0200\n"
-"Last-Translator: Chris <cjl@laptop.org>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: id\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.0.5\n"
-
-#: activity/activity.info:2
-msgid "SimpleGNUChess"
-msgstr ""
-
-#: GNUChessActivity.py:149 GNUChessActivity.py:190
-msgid "Edit"
-msgstr "Sunting"
-
-#: GNUChessActivity.py:156 GNUChessActivity.py:191
-msgid "View"
-msgstr "Tampilan"
-
-#: GNUChessActivity.py:163
-msgid "Adjust"
-msgstr "Menyesuaikan"
-
-#: GNUChessActivity.py:171 GNUChessActivity.py:192
-msgid "Custom"
-msgstr ""
-
-#: GNUChessActivity.py:189
-msgid "Play"
-msgstr ""
-
-#: GNUChessActivity.py:200
-msgid "Copy"
-msgstr "Salin"
-
-#: GNUChessActivity.py:206
-msgid "Paste"
-msgstr "Tempel"
-
-#: GNUChessActivity.py:212
-msgid "Fullscreen"
-msgstr "Layar Penuh"
-
-#: GNUChessActivity.py:218
-msgid "Play game history"
-msgstr ""
-
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
-msgid "Show game history"
-msgstr ""
-
-#: GNUChessActivity.py:228
-msgid "White: "
-msgstr ""
-
-#: GNUChessActivity.py:231
-msgid "White's move"
-msgstr ""
-
-#: GNUChessActivity.py:236
-msgid "Black: "
-msgstr ""
-
-#: GNUChessActivity.py:239
-msgid "Black's move"
-msgstr ""
-
-#: GNUChessActivity.py:246
-msgid "Default pieces"
-msgstr ""
-
-#: GNUChessActivity.py:252
-msgid "Sugar-style pieces"
-msgstr ""
-
-#: GNUChessActivity.py:262
-msgid "Custom pieces"
-msgstr ""
-
-#: GNUChessActivity.py:270
-msgid "Play White"
-msgstr ""
-
-#: GNUChessActivity.py:276
-msgid "Play Black"
-msgstr ""
-
-#: GNUChessActivity.py:286
-msgid "Beginner"
-msgstr ""
-
-#: GNUChessActivity.py:292
-msgid "Expert"
-msgstr ""
-
-#: GNUChessActivity.py:303
-msgid "Play against the computer"
-msgstr ""
-
-#: GNUChessActivity.py:309
-msgid "Play against a person"
-msgstr ""
-
-#: GNUChessActivity.py:320
-msgid "New game"
-msgstr ""
-
-#: GNUChessActivity.py:325
-msgid "Undo"
-msgstr "Tak jadi"
-
-#: GNUChessActivity.py:330
-msgid "Hint"
-msgstr ""
-
-#: GNUChessActivity.py:334 chess.py:250
-msgid "It is White's move."
-msgstr ""
-
-#: GNUChessActivity.py:347
-msgid "White Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:353
-msgid "Black Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:359
-msgid "White Rook"
-msgstr ""
-
-#: GNUChessActivity.py:365
-msgid "Black Rook"
-msgstr ""
-
-#: GNUChessActivity.py:371
-msgid "White Knight"
-msgstr ""
-
-#: GNUChessActivity.py:377
-msgid "Black Knight"
-msgstr ""
-
-#: GNUChessActivity.py:383
-msgid "White Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:389
-msgid "Black Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:395
-msgid "White Queen"
-msgstr ""
-
-#: GNUChessActivity.py:401
-msgid "Black Queen"
-msgstr ""
-
-#: GNUChessActivity.py:407
-msgid "White King"
-msgstr ""
-
-#: GNUChessActivity.py:413
-msgid "Black King"
-msgstr ""
-
-#: GNUChessActivity.py:520
-msgid "Show game board"
-msgstr ""
-
-#: GNUChessActivity.py:773
-msgid "Game in progress."
-msgstr ""
-
-#: GNUChessActivity.py:774
-msgid "Do you want to start a new game?"
-msgstr ""
-
-#: chess.py:192
-msgid "Illegal move"
-msgstr ""
-
-#: chess.py:239 chess.py:462 chess.py:469
-msgid "Check"
-msgstr ""
-
-#: chess.py:241 chess.py:465 chess.py:471
-msgid "Checkmate"
-msgstr ""
-
-#: chess.py:252
-msgid "It is Black's move."
-msgstr ""
-
-#: chess.py:284
-msgid "Black wins."
-msgstr ""
-
-#: chess.py:286
-msgid "White wins."
-msgstr ""
-
-#: chess.py:290
-msgid "White's King is in check."
-msgstr ""
-
-#: chess.py:293
-msgid "Black's King is in check."
-msgstr ""
-
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr ""
-
-#: chess.py:397
-msgid "Please play White."
-msgstr ""
-
-#: chess.py:399
-msgid "Please play Black."
-msgstr ""
-
-#: chess.py:481
-msgid "Thinking..."
-msgstr ""
-
-#: chess.py:509
-msgid "Thinking"
-msgstr ""
diff --git a/po/mi.po b/po/mi.po
index c295c0d..a5e2f50 100644
--- a/po/mi.po
+++ b/po/mi.po
@@ -2,24 +2,24 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-09-21 23:22+0200\n"
-"Last-Translator: hariru <hariruroa@gmail.com>\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: mi\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.0.5\n"
+"X-Generator: Translate Toolkit 1.7.0\n"
#: activity/activity.info:2
msgid "SimpleGNUChess"
-msgstr "WhaikīngiGNUMataiti"
+msgstr ""
#: GNUChessActivity.py:149 GNUChessActivity.py:190
msgid "Edit"
@@ -55,67 +55,70 @@ msgstr "Matakatoa"
#: GNUChessActivity.py:218
msgid "Play game history"
-msgstr "Hītori pūrei tākaro"
+msgstr ""
#: GNUChessActivity.py:223 GNUChessActivity.py:523
msgid "Show game history"
-msgstr "Whakaatu hītori tākaro"
+msgstr ""
#: GNUChessActivity.py:228
msgid "White: "
-msgstr "Mā:"
+msgstr ""
#: GNUChessActivity.py:231
msgid "White's move"
-msgstr "Te wā o Mā"
+msgstr ""
#: GNUChessActivity.py:236
msgid "Black: "
-msgstr "Pango:"
+msgstr ""
#: GNUChessActivity.py:239
msgid "Black's move"
-msgstr "Te wā o Pango"
+msgstr ""
#: GNUChessActivity.py:246
msgid "Default pieces"
-msgstr "Pīhi taunoa"
+msgstr ""
#: GNUChessActivity.py:252
msgid "Sugar-style pieces"
-msgstr "Pīhi āhua-Sugar"
+msgstr ""
#: GNUChessActivity.py:262
msgid "Custom pieces"
-msgstr "Pīhi ritenga"
+msgstr ""
#: GNUChessActivity.py:270
msgid "Play White"
-msgstr "Tākaro Mā"
+msgstr ""
#: GNUChessActivity.py:276
msgid "Play Black"
-msgstr "Tākaro Pango"
+msgstr ""
#: GNUChessActivity.py:286
+#, fuzzy
msgid "Beginner"
-msgstr "Tauhou"
+msgstr "tauhou"
#: GNUChessActivity.py:292
+#, fuzzy
msgid "Expert"
-msgstr "Tohunga"
+msgstr "tohunga"
#: GNUChessActivity.py:303
+#, fuzzy
msgid "Play against the computer"
msgstr "Tākaro me te rorohiko"
#: GNUChessActivity.py:309
msgid "Play against a person"
-msgstr "Tākaro me tētahi tangata"
+msgstr ""
#: GNUChessActivity.py:320
msgid "New game"
-msgstr "Tākaro hōu"
+msgstr ""
#: GNUChessActivity.py:325
msgid "Undo"
@@ -123,120 +126,121 @@ msgstr "Wete"
#: GNUChessActivity.py:330
msgid "Hint"
-msgstr "Tīwhiri"
+msgstr ""
#: GNUChessActivity.py:334 chess.py:250
msgid "It is White's move."
-msgstr "Kei a Mā te wā."
+msgstr ""
#: GNUChessActivity.py:347
msgid "White Pawn"
-msgstr "Kaihāpai-ō Mā"
+msgstr ""
#: GNUChessActivity.py:353
msgid "Black Pawn"
-msgstr "Kaihāpai-ō Pango"
+msgstr ""
#: GNUChessActivity.py:359
msgid "White Rook"
-msgstr "Pā Tūwatawata Mā"
+msgstr ""
#: GNUChessActivity.py:365
msgid "Black Rook"
-msgstr "Pā Tūwatawata Pango"
+msgstr ""
#: GNUChessActivity.py:371
msgid "White Knight"
-msgstr "Toa Mā"
+msgstr ""
#: GNUChessActivity.py:377
msgid "Black Knight"
-msgstr "Toa Pango"
+msgstr ""
#: GNUChessActivity.py:383
msgid "White Bishop"
-msgstr "Pīhopa Mā"
+msgstr ""
#: GNUChessActivity.py:389
msgid "Black Bishop"
-msgstr "Pīhopa Pango"
+msgstr ""
#: GNUChessActivity.py:395
msgid "White Queen"
-msgstr "Kūini Mā"
+msgstr ""
#: GNUChessActivity.py:401
msgid "Black Queen"
-msgstr "Kūini Pango"
+msgstr ""
#: GNUChessActivity.py:407
msgid "White King"
-msgstr "Kīngi Mā"
+msgstr ""
#: GNUChessActivity.py:413
msgid "Black King"
-msgstr "Kīngi Pango"
+msgstr ""
#: GNUChessActivity.py:520
msgid "Show game board"
-msgstr "Whakaatu papa tākaro"
+msgstr ""
#: GNUChessActivity.py:773
msgid "Game in progress."
-msgstr "E haere ana te tākaro."
+msgstr ""
#: GNUChessActivity.py:774
msgid "Do you want to start a new game?"
-msgstr "E hiahia ana koe ki te tīmata i tētahi tākaro hōu?"
+msgstr ""
#: chess.py:192
msgid "Illegal move"
-msgstr "Nekehanga hē"
+msgstr ""
#: chess.py:239 chess.py:462 chess.py:469
msgid "Check"
-msgstr "Tieke"
+msgstr ""
#: chess.py:241 chess.py:465 chess.py:471
msgid "Checkmate"
-msgstr "Whakamīere"
+msgstr ""
#: chess.py:252
msgid "It is Black's move."
-msgstr "Kei a Pango te wā."
+msgstr ""
#: chess.py:284
msgid "Black wins."
-msgstr "Ka toa a Pango."
+msgstr ""
#: chess.py:286
msgid "White wins."
-msgstr "Ka toa a Mā."
+msgstr ""
#: chess.py:290
msgid "White's King is in check."
-msgstr "Kua tieke te Kīngi Mā."
+msgstr ""
#: chess.py:293
msgid "Black's King is in check."
-msgstr "Kua tieke te Kīngi Pango."
+msgstr ""
#: chess.py:390 chess.py:393 chess.py:506
msgid "Please wait for your turn."
-msgstr "Taihoa koa, kia tae ki tō wā."
+msgstr ""
#: chess.py:397
msgid "Please play White."
-msgstr "Tākaro koa Mā."
+msgstr ""
#: chess.py:399
msgid "Please play Black."
-msgstr "Tākaro koa Pango."
+msgstr ""
#: chess.py:481
msgid "Thinking..."
-msgstr "Whakaaro ana..."
+msgstr ""
#: chess.py:509
+#, fuzzy
msgid "Thinking"
-msgstr "Whakaaro ana"
+msgstr "Kemokemo"
diff --git a/po/nah.po b/po/nah.po
deleted file mode 100644
index 7a0b88c..0000000
--- a/po/nah.po
+++ /dev/null
@@ -1,242 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-10-14 00:47+0200\n"
-"Last-Translator: Chris <cjl@laptop.org>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: nah\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 2.0.5\n"
-
-#: activity/activity.info:2
-msgid "SimpleGNUChess"
-msgstr "tlatlalmawiltilli"
-
-#: GNUChessActivity.py:149 GNUChessActivity.py:190
-msgid "Edit"
-msgstr "tlachiwaltilli"
-
-#: GNUChessActivity.py:156 GNUChessActivity.py:191
-msgid "View"
-msgstr "tlachiyal"
-
-#: GNUChessActivity.py:163
-msgid "Adjust"
-msgstr "tsokoyolos"
-
-#: GNUChessActivity.py:171 GNUChessActivity.py:192
-msgid "Custom"
-msgstr "axkatilli"
-
-#: GNUChessActivity.py:189
-msgid "Play"
-msgstr "mawiltilli"
-
-#: GNUChessActivity.py:200
-msgid "Copy"
-msgstr "ixkopina"
-
-#: GNUChessActivity.py:206
-msgid "Paste"
-msgstr "tlakiiltis"
-
-#: GNUChessActivity.py:212
-msgid "Fullscreen"
-msgstr "nochi tlaixnextilli"
-
-#: GNUChessActivity.py:218
-msgid "Play game history"
-msgstr "sempachiwal tlentasalol mawiltili"
-
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
-msgid "Show game history"
-msgstr "ixnextili tlensasallol mawiltili"
-
-#: GNUChessActivity.py:228
-msgid "White: "
-msgstr "istaktik: "
-
-#: GNUChessActivity.py:231
-msgid "White's move"
-msgstr "mooliniyaj ijistaktik"
-
-#: GNUChessActivity.py:236
-msgid "Black: "
-msgstr "yajyayawik: "
-
-#: GNUChessActivity.py:239
-msgid "Black's move"
-msgstr "mooliniyaj yajyayawik"
-
-#: GNUChessActivity.py:246
-msgid "Default pieces"
-msgstr "ajachi tlen axkuali"
-
-#: GNUChessActivity.py:252
-msgid "Sugar-style pieces"
-msgstr "ajachi tlen nelnesi ken sugar"
-
-#: GNUChessActivity.py:262
-msgid "Custom pieces"
-msgstr "ajachimej ajachkatitokej"
-
-#: GNUChessActivity.py:270
-msgid "Play White"
-msgstr "istakamej mawiltiyan"
-
-#: GNUChessActivity.py:276
-msgid "Play Black"
-msgstr "yayajkamej mawiltiya"
-
-#: GNUChessActivity.py:286
-msgid "Beginner"
-msgstr "achtowiketl"
-
-#: GNUChessActivity.py:292
-msgid "Expert"
-msgstr "neltlalnamiketl"
-
-#: GNUChessActivity.py:303
-msgid "Play against the computer"
-msgstr "timawiltis iixpan ajokuikaixnextli"
-
-#: GNUChessActivity.py:309
-msgid "Play against a person"
-msgstr "timawiltis iixpanseyok masewal"
-
-#: GNUChessActivity.py:320
-msgid "New game"
-msgstr "yankuik mawiltili"
-
-#: GNUChessActivity.py:325
-msgid "Undo"
-msgstr "xolewistli"
-
-#: GNUChessActivity.py:330
-msgid "Hint"
-msgstr "neltlajtolli"
-
-#: GNUChessActivity.py:334 chess.py:250
-msgid "It is White's move."
-msgstr "inin olinilis tlen istakmej."
-
-#: GNUChessActivity.py:347
-msgid "White Pawn"
-msgstr "istak tepalewiketl"
-
-#: GNUChessActivity.py:353
-msgid "Black Pawn"
-msgstr "yayak tepalewiketl"
-
-#: GNUChessActivity.py:359
-msgid "White Rook"
-msgstr "istak teposmilotl"
-
-#: GNUChessActivity.py:365
-msgid "Black Rook"
-msgstr "yayak teposmilotl"
-
-#: GNUChessActivity.py:371
-msgid "White Knight"
-msgstr "istak kawayo"
-
-#: GNUChessActivity.py:377
-msgid "Black Knight"
-msgstr "yayak kawayo"
-
-#: GNUChessActivity.py:383
-msgid "White Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:389
-msgid "Black Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:395
-msgid "White Queen"
-msgstr "istak siwayekanketl"
-
-#: GNUChessActivity.py:401
-msgid "Black Queen"
-msgstr "yayaksiwayekanketl"
-
-#: GNUChessActivity.py:407
-msgid "White King"
-msgstr "istak tlakayekanketl"
-
-#: GNUChessActivity.py:413
-msgid "Black King"
-msgstr "yayak tlakayekanketl"
-
-#: GNUChessActivity.py:520
-msgid "Show game board"
-msgstr "ixnextis wapalpamitl"
-
-#: GNUChessActivity.py:773
-msgid "Game in progress."
-msgstr "tlayenkkantilis mawiltili."
-
-#: GNUChessActivity.py:774
-msgid "Do you want to start a new game?"
-msgstr "ti nekis ti pewas ti mawiltis nojan?"
-
-#: chess.py:192
-msgid "Illegal move"
-msgstr "axkual olinistili"
-
-#: chess.py:239 chess.py:462 chess.py:469
-msgid "Check"
-msgstr "san ompona"
-
-#: chess.py:241 chess.py:465 chess.py:471
-msgid "Checkmate"
-msgstr "san ompona tipetonis"
-
-#: chess.py:252
-msgid "It is Black's move."
-msgstr "inin in olnilil tlen yayakmej."
-
-#: chess.py:284
-msgid "Black wins."
-msgstr "yayawikej tlatlanij."
-
-#: chess.py:286
-msgid "White wins."
-msgstr "istakmej tlatlanij."
-
-#: chess.py:290
-msgid "White's King is in check."
-msgstr "istak tlakayekanketl san ompona."
-
-#: chess.py:293
-msgid "Black's King is in check."
-msgstr "yayak tlakayekanketl san ompona."
-
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr "se tlayalis xi chiya mo panol."
-
-#: chess.py:397
-msgid "Please play White."
-msgstr "se tlayalis xikinawilti istakmej."
-
-#: chess.py:399
-msgid "Please play Black."
-msgstr "se tlayalis silinawilti yayakmej."
-
-#: chess.py:481
-msgid "Thinking..."
-msgstr "tlanejnewilitok..."
-
-#: chess.py:509
-msgid "Thinking"
-msgstr "tlanejnewilitok"
diff --git a/po/pl.po b/po/pl.po
deleted file mode 100644
index 1100407..0000000
--- a/po/pl.po
+++ /dev/null
@@ -1,246 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-10-07 23:14+0200\n"
-"Last-Translator: Chris <cjl@laptop.org>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: pl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Pootle 2.0.5\n"
-
-#: activity/activity.info:2
-msgid "SimpleGNUChess"
-msgstr ""
-
-#: GNUChessActivity.py:149 GNUChessActivity.py:190
-msgid "Edit"
-msgstr "Edytuj"
-
-#: GNUChessActivity.py:156 GNUChessActivity.py:191
-msgid "View"
-msgstr "Widok"
-
-# '3.13. Gracz na którego przypada posunięcie, i który chce postawić swoją figurę (lub figury) staranniej na polu (polach) które ona zajmuje, musi uprzednio i wyraźnie powiedzieć do swojego przeciwnika: „poprawiam” (ang. „I adjust” fr. „j’adoube” ros. „poprawlaju”)'
-#: GNUChessActivity.py:163
-msgid "Adjust"
-msgstr "Popraw"
-
-#: GNUChessActivity.py:171 GNUChessActivity.py:192
-#, fuzzy
-msgid "Custom"
-msgstr "Ustawienia niestandardowe"
-
-#: GNUChessActivity.py:189
-msgid "Play"
-msgstr "Graj"
-
-#: GNUChessActivity.py:200
-msgid "Copy"
-msgstr "Kopiuj"
-
-#: GNUChessActivity.py:206
-msgid "Paste"
-msgstr "Wklej"
-
-#: GNUChessActivity.py:212
-msgid "Fullscreen"
-msgstr "Pełny ekran"
-
-#: GNUChessActivity.py:218
-msgid "Play game history"
-msgstr "Odtwórz historię gry"
-
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
-msgid "Show game history"
-msgstr "Wyświetl historię gry"
-
-#: GNUChessActivity.py:228
-msgid "White: "
-msgstr "Białe: "
-
-#: GNUChessActivity.py:231
-msgid "White's move"
-msgstr "Ruch Białych"
-
-#: GNUChessActivity.py:236
-msgid "Black: "
-msgstr "Czarne: "
-
-#: GNUChessActivity.py:239
-msgid "Black's move"
-msgstr "Ruch Czarnych"
-
-#: GNUChessActivity.py:246
-msgid "Default pieces"
-msgstr "Pionki podstawowe"
-
-#: GNUChessActivity.py:252
-msgid "Sugar-style pieces"
-msgstr "Pionki Sugar-style"
-
-#: GNUChessActivity.py:262
-msgid "Custom pieces"
-msgstr "Pionki niestandardowe"
-
-#: GNUChessActivity.py:270
-msgid "Play White"
-msgstr "Graj Białymi"
-
-#: GNUChessActivity.py:276
-msgid "Play Black"
-msgstr "Graj Czarnymi"
-
-#: GNUChessActivity.py:286
-msgid "Beginner"
-msgstr "Początkujący"
-
-#: GNUChessActivity.py:292
-msgid "Expert"
-msgstr "Ekspert"
-
-#: GNUChessActivity.py:303
-msgid "Play against the computer"
-msgstr "Graj przeciw komputerowi"
-
-#: GNUChessActivity.py:309
-#, fuzzy
-msgid "Play against a person"
-msgstr "Graj przeciw osobie"
-
-#: GNUChessActivity.py:320
-msgid "New game"
-msgstr "Nowa gra"
-
-#: GNUChessActivity.py:325
-msgid "Undo"
-msgstr "Cofnij"
-
-#: GNUChessActivity.py:330
-msgid "Hint"
-msgstr "Wskazówka"
-
-#: GNUChessActivity.py:334 chess.py:250
-msgid "It is White's move."
-msgstr "To ruch Białych."
-
-#: GNUChessActivity.py:347
-msgid "White Pawn"
-msgstr "Biały Pion"
-
-#: GNUChessActivity.py:353
-msgid "Black Pawn"
-msgstr "Czarny Pion"
-
-#: GNUChessActivity.py:359
-msgid "White Rook"
-msgstr "Biała Wieża"
-
-#: GNUChessActivity.py:365
-msgid "Black Rook"
-msgstr "Czarna Wieża"
-
-#: GNUChessActivity.py:371
-msgid "White Knight"
-msgstr "Biały Skoczek"
-
-#: GNUChessActivity.py:377
-msgid "Black Knight"
-msgstr "Czarny Skoczek"
-
-#: GNUChessActivity.py:383
-msgid "White Bishop"
-msgstr "Biały Goniec"
-
-#: GNUChessActivity.py:389
-msgid "Black Bishop"
-msgstr "Czarny Goniec"
-
-#: GNUChessActivity.py:395
-msgid "White Queen"
-msgstr "Biały Hetman"
-
-#: GNUChessActivity.py:401
-msgid "Black Queen"
-msgstr "Czarny Hetman"
-
-#: GNUChessActivity.py:407
-msgid "White King"
-msgstr "Biały Król"
-
-#: GNUChessActivity.py:413
-msgid "Black King"
-msgstr "Czarny Król"
-
-#: GNUChessActivity.py:520
-msgid "Show game board"
-msgstr "Pokaż planszę gry"
-
-#: GNUChessActivity.py:773
-msgid "Game in progress."
-msgstr "Kontynuacja gry."
-
-#: GNUChessActivity.py:774
-msgid "Do you want to start a new game?"
-msgstr "Czy chcesz rozpocząć nową grę?"
-
-#: chess.py:192
-msgid "Illegal move"
-msgstr "Niedozwolony ruch"
-
-#: chess.py:239 chess.py:462 chess.py:469
-msgid "Check"
-msgstr "Szach"
-
-#: chess.py:241 chess.py:465 chess.py:471
-msgid "Checkmate"
-msgstr "Szach-mat"
-
-#: chess.py:252
-msgid "It is Black's move."
-msgstr "To ruch Czarnych."
-
-#: chess.py:284
-msgid "Black wins."
-msgstr "Wygrywają Czarne."
-
-#: chess.py:286
-msgid "White wins."
-msgstr "Wygrywają Białe."
-
-#: chess.py:290
-msgid "White's King is in check."
-msgstr ""
-
-#: chess.py:293
-msgid "Black's King is in check."
-msgstr ""
-
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr "Czekaj na swoją kolej."
-
-#: chess.py:397
-msgid "Please play White."
-msgstr "Graj Białymi."
-
-#: chess.py:399
-msgid "Please play Black."
-msgstr "Graj Czarnymi."
-
-#: chess.py:481
-msgid "Thinking..."
-msgstr "Myśli..."
-
-#: chess.py:509
-msgid "Thinking"
-msgstr "Myśli"
diff --git a/po/tvl.po b/po/tvl.po
deleted file mode 100644
index 1376fc1..0000000
--- a/po/tvl.po
+++ /dev/null
@@ -1,242 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Translate Toolkit 1.7.0\n"
-
-#: activity/activity.info:2
-msgid "SimpleGNUChess"
-msgstr ""
-
-#: GNUChessActivity.py:149 GNUChessActivity.py:190
-msgid "Edit"
-msgstr ""
-
-#: GNUChessActivity.py:156 GNUChessActivity.py:191
-msgid "View"
-msgstr ""
-
-#: GNUChessActivity.py:163
-msgid "Adjust"
-msgstr ""
-
-#: GNUChessActivity.py:171 GNUChessActivity.py:192
-msgid "Custom"
-msgstr ""
-
-#: GNUChessActivity.py:189
-msgid "Play"
-msgstr ""
-
-#: GNUChessActivity.py:200
-msgid "Copy"
-msgstr ""
-
-#: GNUChessActivity.py:206
-msgid "Paste"
-msgstr ""
-
-#: GNUChessActivity.py:212
-msgid "Fullscreen"
-msgstr ""
-
-#: GNUChessActivity.py:218
-msgid "Play game history"
-msgstr ""
-
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
-msgid "Show game history"
-msgstr ""
-
-#: GNUChessActivity.py:228
-msgid "White: "
-msgstr ""
-
-#: GNUChessActivity.py:231
-msgid "White's move"
-msgstr ""
-
-#: GNUChessActivity.py:236
-msgid "Black: "
-msgstr ""
-
-#: GNUChessActivity.py:239
-msgid "Black's move"
-msgstr ""
-
-#: GNUChessActivity.py:246
-msgid "Default pieces"
-msgstr ""
-
-#: GNUChessActivity.py:252
-msgid "Sugar-style pieces"
-msgstr ""
-
-#: GNUChessActivity.py:262
-msgid "Custom pieces"
-msgstr ""
-
-#: GNUChessActivity.py:270
-msgid "Play White"
-msgstr ""
-
-#: GNUChessActivity.py:276
-msgid "Play Black"
-msgstr ""
-
-#: GNUChessActivity.py:286
-msgid "Beginner"
-msgstr ""
-
-#: GNUChessActivity.py:292
-msgid "Expert"
-msgstr ""
-
-#: GNUChessActivity.py:303
-msgid "Play against the computer"
-msgstr ""
-
-#: GNUChessActivity.py:309
-msgid "Play against a person"
-msgstr ""
-
-#: GNUChessActivity.py:320
-msgid "New game"
-msgstr ""
-
-#: GNUChessActivity.py:325
-msgid "Undo"
-msgstr ""
-
-#: GNUChessActivity.py:330
-msgid "Hint"
-msgstr ""
-
-#: GNUChessActivity.py:334 chess.py:250
-msgid "It is White's move."
-msgstr ""
-
-#: GNUChessActivity.py:347
-msgid "White Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:353
-msgid "Black Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:359
-msgid "White Rook"
-msgstr ""
-
-#: GNUChessActivity.py:365
-msgid "Black Rook"
-msgstr ""
-
-#: GNUChessActivity.py:371
-msgid "White Knight"
-msgstr ""
-
-#: GNUChessActivity.py:377
-msgid "Black Knight"
-msgstr ""
-
-#: GNUChessActivity.py:383
-msgid "White Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:389
-msgid "Black Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:395
-msgid "White Queen"
-msgstr ""
-
-#: GNUChessActivity.py:401
-msgid "Black Queen"
-msgstr ""
-
-#: GNUChessActivity.py:407
-msgid "White King"
-msgstr ""
-
-#: GNUChessActivity.py:413
-msgid "Black King"
-msgstr ""
-
-#: GNUChessActivity.py:520
-msgid "Show game board"
-msgstr ""
-
-#: GNUChessActivity.py:773
-msgid "Game in progress."
-msgstr ""
-
-#: GNUChessActivity.py:774
-msgid "Do you want to start a new game?"
-msgstr ""
-
-#: chess.py:192
-msgid "Illegal move"
-msgstr ""
-
-#: chess.py:239 chess.py:462 chess.py:469
-msgid "Check"
-msgstr ""
-
-#: chess.py:241 chess.py:465 chess.py:471
-msgid "Checkmate"
-msgstr ""
-
-#: chess.py:252
-msgid "It is Black's move."
-msgstr ""
-
-#: chess.py:284
-msgid "Black wins."
-msgstr ""
-
-#: chess.py:286
-msgid "White wins."
-msgstr ""
-
-#: chess.py:290
-msgid "White's King is in check."
-msgstr ""
-
-#: chess.py:293
-msgid "Black's King is in check."
-msgstr ""
-
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr ""
-
-#: chess.py:397
-msgid "Please play White."
-msgstr ""
-
-#: chess.py:399
-msgid "Please play Black."
-msgstr ""
-
-#: chess.py:481
-msgid "Thinking..."
-msgstr ""
-
-#: chess.py:509
-msgid "Thinking"
-msgstr ""
diff --git a/po/vi.po b/po/vi.po
deleted file mode 100644
index b24f601..0000000
--- a/po/vi.po
+++ /dev/null
@@ -1,242 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-01 00:32-0400\n"
-"PO-Revision-Date: 2012-08-02 06:25+0200\n"
-"Last-Translator: Chris <cjl@laptop.org>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: vi\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.0.5\n"
-
-#: activity/activity.info:2
-msgid "SimpleGNUChess"
-msgstr ""
-
-#: GNUChessActivity.py:149 GNUChessActivity.py:190
-msgid "Edit"
-msgstr ""
-
-#: GNUChessActivity.py:156 GNUChessActivity.py:191
-msgid "View"
-msgstr "Xem"
-
-#: GNUChessActivity.py:163
-msgid "Adjust"
-msgstr "Điều chỉnh"
-
-#: GNUChessActivity.py:171 GNUChessActivity.py:192
-msgid "Custom"
-msgstr ""
-
-#: GNUChessActivity.py:189
-msgid "Play"
-msgstr ""
-
-#: GNUChessActivity.py:200
-msgid "Copy"
-msgstr "Chép"
-
-#: GNUChessActivity.py:206
-msgid "Paste"
-msgstr "Dán"
-
-#: GNUChessActivity.py:212
-msgid "Fullscreen"
-msgstr "Toàn màn hình"
-
-#: GNUChessActivity.py:218
-msgid "Play game history"
-msgstr ""
-
-#: GNUChessActivity.py:223 GNUChessActivity.py:523
-msgid "Show game history"
-msgstr ""
-
-#: GNUChessActivity.py:228
-msgid "White: "
-msgstr ""
-
-#: GNUChessActivity.py:231
-msgid "White's move"
-msgstr ""
-
-#: GNUChessActivity.py:236
-msgid "Black: "
-msgstr ""
-
-#: GNUChessActivity.py:239
-msgid "Black's move"
-msgstr ""
-
-#: GNUChessActivity.py:246
-msgid "Default pieces"
-msgstr ""
-
-#: GNUChessActivity.py:252
-msgid "Sugar-style pieces"
-msgstr ""
-
-#: GNUChessActivity.py:262
-msgid "Custom pieces"
-msgstr ""
-
-#: GNUChessActivity.py:270
-msgid "Play White"
-msgstr ""
-
-#: GNUChessActivity.py:276
-msgid "Play Black"
-msgstr ""
-
-#: GNUChessActivity.py:286
-msgid "Beginner"
-msgstr ""
-
-#: GNUChessActivity.py:292
-msgid "Expert"
-msgstr ""
-
-#: GNUChessActivity.py:303
-msgid "Play against the computer"
-msgstr ""
-
-#: GNUChessActivity.py:309
-msgid "Play against a person"
-msgstr ""
-
-#: GNUChessActivity.py:320
-msgid "New game"
-msgstr ""
-
-#: GNUChessActivity.py:325
-msgid "Undo"
-msgstr ""
-
-#: GNUChessActivity.py:330
-msgid "Hint"
-msgstr ""
-
-#: GNUChessActivity.py:334 chess.py:250
-msgid "It is White's move."
-msgstr ""
-
-#: GNUChessActivity.py:347
-msgid "White Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:353
-msgid "Black Pawn"
-msgstr ""
-
-#: GNUChessActivity.py:359
-msgid "White Rook"
-msgstr ""
-
-#: GNUChessActivity.py:365
-msgid "Black Rook"
-msgstr ""
-
-#: GNUChessActivity.py:371
-msgid "White Knight"
-msgstr ""
-
-#: GNUChessActivity.py:377
-msgid "Black Knight"
-msgstr ""
-
-#: GNUChessActivity.py:383
-msgid "White Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:389
-msgid "Black Bishop"
-msgstr ""
-
-#: GNUChessActivity.py:395
-msgid "White Queen"
-msgstr ""
-
-#: GNUChessActivity.py:401
-msgid "Black Queen"
-msgstr ""
-
-#: GNUChessActivity.py:407
-msgid "White King"
-msgstr ""
-
-#: GNUChessActivity.py:413
-msgid "Black King"
-msgstr ""
-
-#: GNUChessActivity.py:520
-msgid "Show game board"
-msgstr ""
-
-#: GNUChessActivity.py:773
-msgid "Game in progress."
-msgstr ""
-
-#: GNUChessActivity.py:774
-msgid "Do you want to start a new game?"
-msgstr ""
-
-#: chess.py:192
-msgid "Illegal move"
-msgstr ""
-
-#: chess.py:239 chess.py:462 chess.py:469
-msgid "Check"
-msgstr ""
-
-#: chess.py:241 chess.py:465 chess.py:471
-msgid "Checkmate"
-msgstr ""
-
-#: chess.py:252
-msgid "It is Black's move."
-msgstr ""
-
-#: chess.py:284
-msgid "Black wins."
-msgstr ""
-
-#: chess.py:286
-msgid "White wins."
-msgstr ""
-
-#: chess.py:290
-msgid "White's King is in check."
-msgstr ""
-
-#: chess.py:293
-msgid "Black's King is in check."
-msgstr ""
-
-#: chess.py:390 chess.py:393 chess.py:506
-msgid "Please wait for your turn."
-msgstr ""
-
-#: chess.py:397
-msgid "Please play White."
-msgstr ""
-
-#: chess.py:399
-msgid "Please play Black."
-msgstr ""
-
-#: chess.py:481
-msgid "Thinking..."
-msgstr ""
-
-#: chess.py:509
-msgid "Thinking"
-msgstr ""
diff --git a/setup.py b/setup.py
index e5026ee..8a900da 100755..100644
--- a/setup.py
+++ b/setup.py
@@ -1,32 +1,5 @@
#!/usr/bin/env python
-import os
-import sys
+from sugar3.activity import bundlebuilder
-if len(sys.argv) > 1 and '--no-sugar' == sys.argv[1]:
- # Remove the argument from the stack so we don't cause problems
- # for distutils
- sys.argv.pop(1)
-
- import glob, os.path, string
- from distutils.core import setup
-
- DATA_FILES = [
- ('icons', glob.glob('icons/*')),
- ('images', glob.glob('images/*')),
- ('/usr/share/applications', ['turtleart.desktop'])
- ]
-
- setup (name = 'Turtle Art',
- description = "A LOGO-like tool for teaching programming",
- author = "Walter Bender",
- author_email = "walter.bender@gmail.com",
- version = '0.9.4',
- packages = ['TurtleArt'],
- scripts = ['turtleart'],
- data_files = DATA_FILES,
- )
-else:
- from sugar.activity import bundlebuilder
-
- if __name__ == "__main__":
- bundlebuilder.start()
+if __name__ == "__main__":
+ bundlebuilder.start()
diff --git a/sprites.py b/sprites.py
index 2b8bb55..0ef8dca 100644
--- a/sprites.py
+++ b/sprites.py
@@ -73,9 +73,12 @@ def svg_str_to_pixbuf(svg_string):
pl.close()
pixbuf = pl.get_pixbuf()
return pixbuf
+'''
+## <-----------GTK2---------------->##
'''
+
import pygtk
pygtk.require('2.0')
import gtk
@@ -84,35 +87,35 @@ import pangocairo
import cairo
class Sprites:
- ''' A class for the list of sprites and everything they share in common '''
+ # A class for the list of sprites and everything they share in common #
def __init__(self, widget):
- ''' Initialize an empty array of sprites '''
+ # Initialize an empty array of sprites #
self.widget = widget
self.list = []
self.cr = None
def set_cairo_context(self, cr):
- ''' Cairo context may be set or reset after __init__ '''
+ # Cairo context may be set or reset after __init__ #
self.cr = cr
def get_sprite(self, i):
- ''' Return a sprint from the array '''
+ # Return a sprint from the array #
if i < 0 or i > len(self.list) - 1:
return(None)
else:
return(self.list[i])
def length_of_list(self):
- ''' How many sprites are there? '''
+ # How many sprites are there? #
return(len(self.list))
def append_to_list(self, spr):
- ''' Append a new sprite to the end of the list. '''
+ # Append a new sprite to the end of the list. #
self.list.append(spr)
def insert_in_list(self, spr, i):
- ''' Insert a sprite at position i. '''
+ # Insert a sprite at position i. #
if i < 0:
self.list.insert(0, spr)
elif i > len(self.list) - 1:
@@ -121,12 +124,12 @@ class Sprites:
self.list.insert(i, spr)
def remove_from_list(self, spr):
- ''' Remove a sprite from the list. '''
+ # Remove a sprite from the list. #
if spr in self.list:
self.list.remove(spr)
def find_sprite(self, pos, inverse=False):
- ''' Search based on (x, y) position. Return the 'top/first' one. '''
+ # Search based on (x, y) position. Return the 'top/first' one. #
list = self.list[:]
if not inverse:
list.reverse()
@@ -136,7 +139,7 @@ class Sprites:
return None
def redraw_sprites(self, area=None, cr=None):
- ''' Redraw the sprites that intersect area. '''
+ # Redraw the sprites that intersect area. #
# I think I need to do this to save Cairo some work
if cr is None:
cr = self.cr
@@ -155,10 +158,10 @@ class Sprites:
class Sprite:
- ''' A class for the individual sprites '''
+ # A class for the individual sprites #
def __init__(self, sprites, x, y, image):
- ''' Initialize an individual sprite '''
+ # Initialize an individual sprite #
self._sprites = sprites
self.save_xy = (x, y) # remember initial (x, y) position
self.rect = gtk.gdk.Rectangle(int(x), int(y), 0, 0)
@@ -181,7 +184,7 @@ class Sprite:
self._sprites.append_to_list(self)
def set_image(self, image, i=0, dx=0, dy=0):
- ''' Add an image to the sprite. '''
+ # Add an image to the sprite. #
while len(self.cached_surfaces) < i + 1:
self.cached_surfaces.append(None)
self._dx.append(0)
@@ -215,38 +218,38 @@ class Sprite:
self.cached_surfaces[i] = surface
def move(self, pos):
- ''' Move to new (x, y) position '''
+ # Move to new (x, y) position #
self.inval()
self.rect.x, self.rect.y = int(pos[0]), int(pos[1])
self.inval()
def move_relative(self, pos):
- ''' Move to new (x+dx, y+dy) position '''
+ # Move to new (x+dx, y+dy) position #
self.inval()
self.rect.x += int(pos[0])
self.rect.y += int(pos[1])
self.inval()
def get_xy(self):
- ''' Return current (x, y) position '''
+ # Return current (x, y) position #
return (self.rect.x, self.rect.y)
def get_dimensions(self):
- ''' Return current size '''
+ # Return current size #
return (self.rect.width, self.rect.height)
def get_layer(self):
- ''' Return current layer '''
+ # Return current layer #
return self.layer
def set_shape(self, image, i=0):
- ''' Set the current image associated with the sprite '''
+ # Set the current image associated with the sprite #
self.inval()
self.set_image(image, i)
self.inval()
def set_layer(self, layer=None):
- ''' Set the layer for a sprite '''
+ # Set the layer for a sprite #
self._sprites.remove_from_list(self)
if layer is not None:
self.layer = layer
@@ -259,7 +262,7 @@ class Sprite:
self.inval()
def set_label(self, new_label, i=0):
- ''' Set the label drawn on the sprite '''
+ # Set the label drawn on the sprite #
self._extend_labels_array(i)
if type(new_label) is str or type(new_label) is unicode:
# pango doesn't like nulls
@@ -269,11 +272,11 @@ class Sprite:
self.inval()
def set_margins(self, l=0, t=0, r=0, b=0):
- ''' Set the margins for drawing the label '''
+ # Set the margins for drawing the label #
self._margins = [l, t, r, b]
def _extend_labels_array(self, i):
- ''' Append to the labels attribute list '''
+ # Append to the labels attribute list #
if self._fd is None:
self.set_font('Sans')
if self._color is None:
@@ -286,11 +289,11 @@ class Sprite:
self._vert_align.append(self._vert_align[0])
def set_font(self, font):
- ''' Set the font for a label '''
+ # Set the font for a label #
self._fd = pango.FontDescription(font)
def set_label_color(self, rgb):
- ''' Set the font color for a label '''
+ # Set the font color for a label #
COLORTABLE = {'black': '#000000', 'white': '#FFFFFF',
'red': '#FF0000', 'yellow': '#FFFF00',
'green': '#00FF00', 'cyan': '#00FFFF',
@@ -306,7 +309,7 @@ class Sprite:
def set_label_attributes(self, scale, rescale=True, horiz_align="center",
vert_align="middle", i=0):
- ''' Set the various label attributes '''
+ # Set the various label attributes #
self._extend_labels_array(i)
self._scale[i] = scale
self._rescale[i] = rescale
@@ -314,23 +317,23 @@ class Sprite:
self._vert_align[i] = vert_align
def hide(self):
- ''' Hide a sprite '''
+ # Hide a sprite #
self.inval()
self._sprites.remove_from_list(self)
def restore(self):
- ''' Restore a hidden sprite '''
+ # Restore a hidden sprite #
self.set_layer()
def inval(self):
- ''' Invalidate a region for gtk '''
+ # Invalidate a region for gtk #
self._sprites.widget.queue_draw_area(self.rect.x,
self.rect.y,
self.rect.width,
self.rect.height)
def draw(self, cr=None):
- ''' Draw the sprite (and label) '''
+ # Draw the sprite (and label) #
if cr is None:
print 'sprite.draw: no Cairo context.'
return
@@ -347,7 +350,7 @@ class Sprite:
self.draw_label(cr)
def hit(self, pos):
- ''' Is (x, y) on top of the sprite? '''
+ # Is (x, y) on top of the sprite? #
x, y = pos
if x < self.rect.x:
return False
@@ -360,7 +363,7 @@ class Sprite:
return True
def draw_label(self, cr):
- ''' Draw the label based on its attributes '''
+ # Draw the label based on its attributes #
# Create a pangocairo context
cr = pangocairo.CairoContext(cr)
my_width = self.rect.width - self._margins[0] - self._margins[2]
@@ -409,7 +412,7 @@ class Sprite:
cr.restore()
def label_width(self):
- ''' Calculate the width of a label '''
+ # Calculate the width of a label #
cr = pangocairo.CairoContext(self._sprites.cr)
if cr is not None:
max = 0
@@ -426,19 +429,19 @@ class Sprite:
return self.rect.width
def label_safe_width(self):
- ''' Return maximum width for a label '''
+ # Return maximum width for a label #
return self.rect.width - self._margins[0] - self._margins[2]
def label_safe_height(self):
- ''' Return maximum height for a label '''
+ # Return maximum height for a label #
return self.rect.height - self._margins[1] - self._margins[3]
def label_left_top(self):
- ''' Return the upper-left corner of the label safe zone '''
+ # Return the upper-left corner of the label safe zone #
return(self._margins[0], self._margins[1])
def get_pixel(self, pos, i=0):
- ''' Return the pixel at (x, y) '''
+ # Return the pixel at (x, y) #
x = int(pos[0] - self.rect.x)
y = int(pos[1] - self.rect.y)
if x < 0 or x > (self.rect.width - 1) or \
@@ -457,3 +460,393 @@ class Sprite:
pixels = cs.get_data()
return (ord(pixels[2]), ord(pixels[1]), ord(pixels[0]), 0)
+'''
+
+#<-----------------------GTK3----------->#
+import gi
+from gi.repository import Gtk, GdkPixbuf, Gdk
+from gi.repository import Pango, PangoCairo
+import cairo
+
+
+class Sprites:
+ ''' A class for the list of sprites and everything they share in common '''
+
+ def __init__(self, widget):
+ ''' Initialize an empty array of sprites '''
+ self.cr = None
+ self.widget = widget
+ self.list = []
+
+ def set_cairo_context(self, cr):
+ ''' Cairo context may be set or reset after __init__ '''
+ self.cr = cr
+
+ def get_sprite(self, i):
+ ''' Return a sprint from the array '''
+ if i < 0 or i > len(self.list)-1:
+ return(None)
+ else:
+ return(self.list[i])
+
+ def length_of_list(self):
+ ''' How many sprites are there? '''
+ return(len(self.list))
+
+ def append_to_list(self, spr):
+ ''' Append a new sprite to the end of the list. '''
+ self.list.append(spr)
+
+ def insert_in_list(self, spr, i):
+ ''' Insert a sprite at position i. '''
+ if i < 0:
+ self.list.insert(0, spr)
+ elif i > len(self.list) - 1:
+ self.list.append(spr)
+ else:
+ self.list.insert(i, spr)
+
+ def remove_from_list(self, spr):
+ ''' Remove a sprite from the list. '''
+ if spr in self.list:
+ self.list.remove(spr)
+
+ def find_sprite(self, pos):
+ ''' Search based on (x, y) position. Return the 'top/first' one. '''
+ list = self.list[:]
+ list.reverse()
+ for spr in list:
+ if spr.hit(pos):
+ return spr
+ return None
+
+ def redraw_sprites(self, area=None, cr=None):
+ ''' Redraw the sprites that intersect area. '''
+ # I think I need to do this to save Cairo some work
+ if cr is None:
+ cr = self.cr
+ else:
+ self.cr = cr
+ if cr is None:
+ print 'sprites.redraw_sprites: no Cairo context'
+ return
+ for spr in self.list:
+ if area == None:
+ spr.draw(cr=cr)
+ else:
+ intersection = spr.rect.intersect(area)
+ if intersection.width > 0 or intersection.height > 0:
+ spr.draw(cr=cr)
+
+
+class Sprite:
+ ''' A class for the individual sprites '''
+
+ def __init__(self, sprites, x, y, image):
+ ''' Initialize an individual sprite '''
+ self._sprites = sprites
+ self.save_xy = (x, y) # remember initial (x, y) position
+ self.rect = [int(x), int(y), 0, 0]
+ self._scale = [12]
+ self._rescale = [True]
+ self._horiz_align = ["center"]
+ self._vert_align = ["middle"]
+ self._x_pos = [None]
+ self._y_pos = [None]
+ self._fd = None
+ self._bold = False
+ self._italic = False
+ self._color = None
+ self._margins = [0, 0, 0, 0]
+ self.layer = 100
+ self.labels = []
+ self.images = []
+ self._dx = [] # image offsets
+ self._dy = []
+ self.type = None
+ self.set_image(image)
+ self._sprites.append_to_list(self)
+
+ def set_image(self, image, i=0, dx=0, dy=0):
+ ''' Add an image to the sprite. '''
+ while len(self.images) < i + 1:
+ self.images.append(None)
+ self._dx.append(0)
+ self._dy.append(0)
+ self.images[i] = image
+ self._dx[i] = dx
+ self._dy[i] = dy
+ if hasattr(self.images[i], 'get_width'):
+ w = self.images[i].get_width()
+ h = self.images[i].get_height()
+ else:
+ w, h = self.images[i].get_size()
+ if i == 0: # Always reset width and height when base image changes.
+ self.rect[2] = w + dx
+ self.rect[3] = h + dy
+ else:
+ if w + dx > self.rect[2]:
+ self.rect[2] = w + dx
+ if h + dy > self.rect[3]:
+ self.rect[3] = h + dy
+
+ def move(self, pos):
+ ''' Move to new (x, y) position '''
+ self.inval()
+ self.rect[0], self.rect[1] = int(pos[0]), int(pos[1])
+ self.inval()
+
+ def move_relative(self, pos):
+ ''' Move to new (x+dx, y+dy) position '''
+ self.inval()
+ self.rect[0] += int(pos[0])
+ self.rect[1] += int(pos[1])
+ self.inval()
+
+ def get_xy(self):
+ ''' Return current (x, y) position '''
+ return (self.rect[0], self.rect[1])
+
+ def get_dimensions(self):
+ ''' Return current size '''
+ return (self.rect[2], self.rect[3])
+
+ def get_layer(self):
+ ''' Return current layer '''
+ return self.layer
+
+ def set_shape(self, image, i=0):
+ ''' Set the current image associated with the sprite '''
+ self.inval()
+ self.set_image(image, i)
+ self.inval()
+
+ def set_layer(self, layer=None):
+ ''' Set the layer for a sprite '''
+ self._sprites.remove_from_list(self)
+ if layer is not None:
+ self.layer = layer
+ for i in range(self._sprites.length_of_list()):
+ if self.layer < self._sprites.get_sprite(i).layer:
+ self._sprites.insert_in_list(self, i)
+ self.inval()
+ return
+ self._sprites.append_to_list(self)
+ self.inval()
+
+ def set_label(self, new_label, i=0):
+ ''' Set the label drawn on the sprite '''
+ self._extend_labels_array(i)
+ if type(new_label) is str or type(new_label) is unicode:
+ # pango doesn't like nulls
+ self.labels[i] = new_label.replace("\0", " ")
+ else:
+ self.labels[i] = str(new_label)
+ self.inval()
+
+ def set_margins(self, l=0, t=0, r=0, b=0):
+ ''' Set the margins for drawing the label '''
+ self._margins = [l, t, r, b]
+
+ def _extend_labels_array(self, i):
+ ''' Append to the labels attribute list '''
+ if self._fd is None:
+ self.set_font('Sans')
+ if self._color is None:
+ self._color = (0., 0., 0.)
+ while len(self.labels) < i + 1:
+ self.labels.append(" ")
+ self._scale.append(self._scale[0])
+ self._rescale.append(self._rescale[0])
+ self._horiz_align.append(self._horiz_align[0])
+ self._vert_align.append(self._vert_align[0])
+ self._x_pos.append(self._x_pos[0])
+ self._y_pos.append(self._y_pos[0])
+
+ def set_font(self, font):
+ ''' Set the font for a label '''
+ self._fd = Pango.FontDescription(font)
+
+ def set_label_color(self, rgb):
+ ''' Set the font color for a label '''
+ COLORTABLE = {'black': '#000000', 'white': '#FFFFFF',
+ 'red': '#FF0000', 'yellow': '#FFFF00',
+ 'green': '#00FF00', 'cyan': '#00FFFF',
+ 'blue': '#0000FF', 'purple': '#FF00FF',
+ 'gray': '#808080'}
+ if rgb.lower() in COLORTABLE:
+ rgb = COLORTABLE[rgb.lower()]
+ # Convert from '#RRGGBB' to floats
+ self._color = (int('0x' + rgb[1:3], 16) / 256.,
+ int('0x' + rgb[3:5], 16) / 256.,
+ int('0x' + rgb[5:7], 16) / 256.)
+ return
+
+ def set_label_attributes(self, scale, rescale=True, horiz_align="center",
+ vert_align="middle", x_pos=None, y_pos=None, i=0):
+ ''' Set the various label attributes '''
+ self._extend_labels_array(i)
+ self._scale[i] = scale
+ self._rescale[i] = rescale
+ self._horiz_align[i] = horiz_align
+ self._vert_align[i] = vert_align
+ self._x_pos[i] = x_pos
+ self._y_pos[i] = y_pos
+
+ def hide(self):
+ ''' Hide a sprite '''
+ self.inval()
+ self._sprites.remove_from_list(self)
+
+ def restore(self):
+ ''' Restore a hidden sprite '''
+ self.set_layer()
+
+ def inval(self):
+ ''' Invalidate a region for gtk '''
+ # self._sprites.window.invalidate_rect(self.rect, False)
+ self._sprites.widget.queue_draw_area(self.rect[0],
+ self.rect[1],
+ self.rect[2],
+ self.rect[3])
+
+ def draw(self, cr=None):
+ ''' Draw the sprite (and label) '''
+ if cr is None:
+ cr = self._sprites.cr
+ if cr is None:
+ print 'sprite.draw: no Cairo context.'
+ return
+ for i, img in enumerate(self.images):
+ if isinstance(img, GdkPixbuf.Pixbuf):
+ Gdk.cairo_set_source_pixbuf(cr, img,
+ self.rect[0] + self._dx[i],
+ self.rect[1] + self._dy[i])
+ cr.rectangle(self.rect[0] + self._dx[i],
+ self.rect[1] + self._dy[i],
+ self.rect[2],
+ self.rect[3])
+ cr.fill()
+ elif type(img) == cairo.ImageSurface:
+ cr.set_source_surface(img, self.rect[0] + self._dx[i],
+ self.rect[1] + self._dy[i])
+ cr.rectangle(self.rect[0] + self._dx[i],
+ self.rect[1] + self._dy[i],
+ self.rect[2],
+ self.rect[3])
+ cr.fill()
+ else:
+ print 'sprite.draw: source not a pixbuf (%s)' % (type(img))
+ if len(self.labels) > 0:
+ self.draw_label(cr)
+
+ def hit(self, pos):
+ ''' Is (x, y) on top of the sprite? '''
+ x, y = pos
+ if x < self.rect[0]:
+ return False
+ if x > self.rect[0] + self.rect[2]:
+ return False
+ if y < self.rect[1]:
+ return False
+ if y > self.rect[1] + self.rect[3]:
+ return False
+ return True
+
+ def draw_label(self, cr):
+ ''' Draw the label based on its attributes '''
+ my_width = self.rect[2] - self._margins[0] - self._margins[2]
+ if my_width < 0:
+ my_width = 0
+ my_height = self.rect[3] - self._margins[1] - self._margins[3]
+ for i in range(len(self.labels)):
+ pl = PangoCairo.create_layout(cr)
+ pl.set_text(str(self.labels[i]), -1)
+ self._fd.set_size(int(self._scale[i] * Pango.SCALE))
+ pl.set_font_description(self._fd)
+ w = pl.get_size()[0] / Pango.SCALE
+ if w > my_width:
+ if self._rescale[i]:
+ self._fd.set_size(
+ int(self._scale[i] * Pango.SCALE * my_width / w))
+ pl.set_font_description(self._fd)
+ w = pl.get_size()[0] / Pango.SCALE
+ else:
+ j = len(self.labels[i]) - 1
+ while(w > my_width and j > 0):
+ pl.set_text(
+ "…" + self.labels[i][len(self.labels[i]) - j:], -1)
+ self._fd.set_size(int(self._scale[i] * Pango.SCALE))
+ pl.set_font_description(self._fd)
+ w = pl.get_size()[0] / Pango.SCALE
+ j -= 1
+ if self._x_pos[i] is not None:
+ x = int(self.rect[0] + self._x_pos[i])
+ elif self._horiz_align[i] == "center":
+ x = int(self.rect[0] + self._margins[0] + (my_width - w) / 2)
+ elif self._horiz_align[i] == 'left':
+ x = int(self.rect[0] + self._margins[0])
+ else: # right
+ x = int(self.rect[0] + self.rect[2] - w - self._margins[2])
+ h = pl.get_size()[1] / Pango.SCALE
+ if self._y_pos[i] is not None:
+ y = int(self.rect[1] + self._y_pos[i])
+ elif self._vert_align[i] == "middle":
+ y = int(self.rect[1] + self._margins[1] + (my_height - h) / 2)
+ elif self._vert_align[i] == "top":
+ y = int(self.rect[1] + self._margins[1])
+ else: # bottom
+ y = int(self.rect[1] + self.rect[3] - h - self._margins[3])
+ cr.save()
+ cr.translate(x, y)
+ cr.set_source_rgb(self._color[0], self._color[1], self._color[2])
+ PangoCairo.update_layout(cr, pl)
+ PangoCairo.show_layout(cr, pl)
+ cr.restore()
+
+ def label_width(self, cr=None):
+ ''' Calculate the width of a label '''
+ if cr is None:
+ cr = self._sprites.cr
+ max = 0
+ for i in range(len(self.labels)):
+ pl = PangoCairo.create_layout(cr)
+ pl.set_text(str(self.labels[i]), -1)
+ self._fd.set_size(int(self._scale[i] * Pango.SCALE))
+ pl.set_font_description(self._fd)
+ w = pl.get_size()[0] / Pango.SCALE
+ if w > max:
+ max = w
+ return max
+
+ def label_safe_width(self):
+ ''' Return maximum width for a label '''
+ return self.rect[2] - self._margins[0] - self._margins[2]
+
+ def label_safe_height(self):
+ ''' Return maximum height for a label '''
+ return self.rect[3] - self._margins[1] - self._margins[3]
+
+ def label_left_top(self):
+ ''' Return the upper-left corner of the label safe zone '''
+ return(self._margins[0], self._margins[1])
+
+ def get_pixel(self, pos, i=0):
+ ''' Return the pixl at (x, y) '''
+ x, y = pos
+ x = x - self.rect[0]
+ y = y - self.rect[1]
+ if y > self.images[i].get_height() - 1:
+ return(-1, -1, -1, -1)
+ try:
+ array = self.images[i].get_pixels()
+ if array is not None:
+ offset = (y * self.images[i].get_width() + x) * 4
+ r, g, b, a = ord(array[offset]), ord(array[offset + 1]),\
+ ord(array[offset + 2]), ord(array[offset + 3])
+ return(r, g, b, a)
+ else:
+ return(-1, -1, -1, -1)
+ except IndexError:
+ print "Index Error: %d %d" % (len(array), offset)
+ return(-1, -1, -1, -1)
diff --git a/toolbar_utils.py b/toolbar_utils.py
index cd5538d..03f5461 100644
--- a/toolbar_utils.py
+++ b/toolbar_utils.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Walter Bender
-
+# Copyright (c) 2012, Ignacio Rodriguez
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@@ -10,13 +10,12 @@
# along with this library; if not, write to the Free Software
# Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
+from gi.repository import Gtk
-import gtk
-
-from sugar.graphics.radiotoolbutton import RadioToolButton
-from sugar.graphics.toolbutton import ToolButton
-from sugar.graphics.combobox import ComboBox
-from sugar.graphics.toolcombobox import ToolComboBox
+from sugar3.graphics.radiotoolbutton import RadioToolButton
+from sugar3.graphics.toolbutton import ToolButton
+from sugar3.graphics.combobox import ComboBox
+from sugar3.graphics.toolcombobox import ToolComboBox
def combo_factory(combo_array, toolbar, callback, cb_arg=None,
@@ -32,7 +31,7 @@ def combo_factory(combo_array, toolbar, callback, cb_arg=None,
for i, selection in enumerate(combo_array):
combo.append_item(i, selection, None)
combo.show()
- toolitem = gtk.ToolItem()
+ toolitem = Gtk.ToolItem()
toolitem.add(combo)
if hasattr(toolbar, 'insert'): # the main toolbar
toolbar.insert(toolitem, -1)
@@ -46,13 +45,13 @@ def combo_factory(combo_array, toolbar, callback, cb_arg=None,
def entry_factory(default_string, toolbar, tooltip=None, max=3):
''' Factory for adding a text box to a toolbar '''
- entry = gtk.Entry()
+ entry = Gtk.Entry()
entry.set_text(default_string)
if tooltip is not None and hasattr(entry, 'set_tooltip_text'):
entry.set_tooltip_text(tooltip)
entry.set_width_chars(max)
entry.show()
- toolitem = gtk.ToolItem()
+ toolitem = Gtk.ToolItem()
toolitem.add(entry)
if hasattr(toolbar, 'insert'): # the main toolbar
toolbar.insert(toolitem, -1)
@@ -70,8 +69,7 @@ def button_factory(icon_name, toolbar, callback, cb_arg=None, tooltip=None,
button.set_tooltip(tooltip)
button.props.sensitive = True
if accelerator is not None:
- if hasattr(button.props, 'accelerator'):
- button.props.accelerator = accelerator
+ button.props.accelerator = accelerator
if cb_arg is not None:
button.connect('clicked', callback, cb_arg)
else:
@@ -88,7 +86,7 @@ def radio_factory(name, toolbar, callback, cb_arg=None, tooltip=None,
group=None):
''' Add a radio button to a toolbar '''
button = RadioToolButton(group=group)
- button.set_named_icon(name)
+ button.set_icon_name(name)
if callback is not None:
if cb_arg is None:
button.connect('clicked', callback)
@@ -106,12 +104,12 @@ def radio_factory(name, toolbar, callback, cb_arg=None, tooltip=None,
def label_factory(toolbar, label_text, width=None):
''' Factory for adding a label to a toolbar '''
- label = gtk.Label(label_text)
+ label = Gtk.Label(label_text)
label.set_line_wrap(True)
if width is not None:
label.set_size_request(width, -1) # doesn't work on XOs
label.show()
- toolitem = gtk.ToolItem()
+ toolitem = Gtk.ToolItem()
toolitem.add(label)
if hasattr(toolbar, 'insert'): # the main toolbar
toolbar.insert(toolitem, -1)
@@ -123,7 +121,7 @@ def label_factory(toolbar, label_text, width=None):
def separator_factory(toolbar, expand=False, visible=True):
''' add a separator to a toolbar '''
- separator = gtk.SeparatorToolItem()
+ separator = Gtk.SeparatorToolItem()
separator.props.draw = visible
separator.set_expand(expand)
if hasattr(toolbar, 'insert'): # the main toolbar
@@ -135,9 +133,9 @@ def separator_factory(toolbar, expand=False, visible=True):
def image_factory(image, toolbar, tooltip=None):
''' Add an image to the toolbar '''
- img = gtk.Image()
+ img = Gtk.Image()
img.set_from_pixbuf(image)
- img_tool = gtk.ToolItem()
+ img_tool = Gtk.ToolItem()
img_tool.add(img)
if tooltip is not None:
img.set_tooltip_text(tooltip)
@@ -150,12 +148,12 @@ def image_factory(image, toolbar, tooltip=None):
def spin_factory(default, min, max, callback, toolbar):
- spin_adj = gtk.Adjustment(default, min, max, 1, 32, 0)
- spin = gtk.SpinButton(spin_adj, 0, 0)
+ spin_adj = Gtk.Adjustment(default, min, max, 1, 32, 0)
+ spin = Gtk.SpinButton(spin_adj, 0, 0)
spin_id = spin.connect('value-changed', callback)
spin.set_numeric(True)
spin.show()
- toolitem = gtk.ToolItem()
+ toolitem = Gtk.ToolItem()
toolitem.add(spin)
if hasattr(toolbar, 'insert'): # the main toolbar
toolbar.insert(toolitem, -1)
diff --git a/utils.py b/utils.py
index 285e6a7..766ed2d 100644
--- a/utils.py
+++ b/utils.py
@@ -1,4 +1,5 @@
#Copyright (c) 2011 Walter Bender
+#Copyright (c) 2012 Ignacio Rodriguez
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -10,7 +11,7 @@
# Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
import os
-import gtk
+from gi.repository import GdkPixbuf
import subprocess
from StringIO import StringIO
try:
@@ -134,6 +135,6 @@ def base64_to_pixbuf(activity, data, width=55, height=55):
''' Convert base64-encoded data to a pixbuf '''
png_file = os.path.join(get_path(activity, 'instance'), 'imagetmp.png')
base64_to_file(activity, data, png_file)
- pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(png_file, width, height)
+ pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(png_file, width, height)
os.remove(png_file)
return pixbuf