1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
This commit is contained in:
Shlomi Fish 2017-04-17 12:23:57 +03:00
parent 389143ec23
commit 0876e08547
3 changed files with 10 additions and 16 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*- # -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------## # ---------------------------------------------------------------------------
# #
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2003 Mt. Hood Playing Card Co.
@ -19,7 +19,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# ---------------------------------------------------------------------------## # ---------------------------------------------------------------------------
# imports # imports
@ -112,22 +112,20 @@ class _TwoImageCard(_HideableCard):
if not self.face_up: if not self.face_up:
self.__back.hide() self.__back.hide()
self.__face.show() self.__face.show()
##self.tkraise(unhide) # self.tkraise(unhide)
self.face_up = 1 self.face_up = 1
def showBack(self, unhide=1): def showBack(self, unhide=1):
if self.face_up: if self.face_up:
self.__face.hide() self.__face.hide()
self.__back.show() self.__back.show()
##self.tkraise(unhide) # self.tkraise(unhide)
self.face_up = 0 self.face_up = 0
def updateCardBackground(self, image): def updateCardBackground(self, image):
self.__back.config(image=image) self.__back.config(image=image)
# choose the implementation # choose the implementation
Card = _TwoImageCard Card = _TwoImageCard
#Card = _OneImageCard # FIXME: this implementation lost any cards (bug?) # Card = _OneImageCard # FIXME this implementation lost any cards (bug?)

View file

@ -24,9 +24,9 @@
__all__ = ['ColorsDialog'] __all__ = ['ColorsDialog']
# imports # imports
from pysollib.mygettext import _, n_ from pysollib.mygettext import _
## import os, sys # import os, sys
import gtk, gobject, pango import gtk
import gtk.glade import gtk.glade
from gtk import gdk from gtk import gdk
@ -77,7 +77,6 @@ class ColorsDialog:
dialog.destroy() dialog.destroy()
def _setColor(self, name, color): def _setColor(self, name, color):
label = self.widgets_tree.get_widget(name+'_label') label = self.widgets_tree.get_widget(name+'_label')
eventbox = self.widgets_tree.get_widget(name+'_eventbox') eventbox = self.widgets_tree.get_widget(name+'_eventbox')
@ -85,7 +84,6 @@ class ColorsDialog:
label.set_data('user_data', color) label.set_data('user_data', color)
label.set_text(color) label.set_text(color)
def _changeColor(self, w, name): def _changeColor(self, w, name):
label = self.widgets_tree.get_widget(name+'_label') label = self.widgets_tree.get_widget(name+'_label')
color = label.get_data('user_data') color = label.get_data('user_data')
@ -101,7 +99,6 @@ class ColorsDialog:
self._setColor(name, c) self._setColor(name, c)
dialog.destroy() dialog.destroy()
def _translateLabels(self): def _translateLabels(self):
for n in ( for n in (
'label31', 'label31',
@ -120,7 +117,6 @@ class ColorsDialog:
'label52', 'label52',
'label53', 'label53',
'label79', 'label79',
): ):
w = self.widgets_tree.get_widget(n) w = self.widgets_tree.get_widget(n)
w.set_text(_(w.get_text())) w.set_text(_(w.get_text()))

View file

@ -10,7 +10,7 @@ use String::ShellQuote qw/ shell_quote /;
# my $cmd = shell_quote( 'flake8', '.' ); # my $cmd = shell_quote( 'flake8', '.' );
my $cmd = shell_quote( 'flake8', my $cmd = shell_quote( 'flake8',
grep { not($_ eq './pysollib/pysoltk.py') } glob('./pysollib/*.py ./pysollib/[cm]*/*.py') ); grep { not($_ eq './pysollib/pysoltk.py') } glob('./pysollib/*.py ./pysollib/[cm]*/*.py ./pysollib/pysolgtk/[a-c]*.py') );
# TEST # TEST
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." ); eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );