~ubuntu-branches/ubuntu/precise/pynagram/precise

« back to all changes in this revision

Viewing changes to pynagram/gui/gui.py

  • Committer: Bazaar Package Importer
  • Author(s): Umang Varma
  • Date: 2011-06-19 21:07:59 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110619210759-9o3nwnbv8xo6reiv
Tags: 1.0.1-1
* New upstream release:
      + support wordlists in capital letters (LP: #786415)
      + stopped using deprecated pyqt signal
* Transitioned from python-support to dh_python2 
* Bumped to Standards-Version 3.9.2.
* Switched to source format 3.0 (quilt)
* Removed absolute path in pynagram.desktop

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
#     gui.py
4
4
#
5
 
#     Copyright (c) 2009, 2010 Umang Varma <umang.me@gmail.com>.
 
5
#     Copyright (c) 2009, 2010, 2011 Umang Varma <umang.me@gmail.com>.
6
6
#
7
7
#     This file is part of Pynagram
8
8
#
147
147
        self.setWindowIcon(self.wind_icon)
148
148
        #
149
149
        QtCore.QObject.connect(self.ui.actionSolve, \
150
 
                    QtCore.SIGNAL("activated()"), self.actionSolve_activate)
 
150
                    QtCore.SIGNAL("triggered()"), self.actionSolve_activate)
151
151
        QtCore.QObject.connect(self.ui.actionNew, \
152
 
                        QtCore.SIGNAL("activated()"), self.actionNew_activate)
 
152
                        QtCore.SIGNAL("triggered()"), self.actionNew_activate)
153
153
        QtCore.QObject.connect(self.ui.actionAbout, \
154
 
                    QtCore.SIGNAL("activated()"), self.actionAbout_activate)
 
154
                    QtCore.SIGNAL("triggered()"), self.actionAbout_activate)
155
155
        QtCore.QObject.connect(self.ui.actionWordlists, \
156
 
                QtCore.SIGNAL("activated()"), self.actionWordlists_activate)
 
156
                QtCore.SIGNAL("triggered()"), self.actionWordlists_activate)
157
157
        QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), \
158
158
                                                    self.__update_status_bar)
159
159
        QtCore.QObject.connect(self.shuffle_timer, QtCore.SIGNAL("timeout()"),\
203
203
            self.solved = True
204
204
        per_column = len(a_words)/5 + 1
205
205
        for x in xrange(0, 5):
206
 
            words = [((self.pynagram.words[word] or self.solved) and  word) \
 
206
            words = [((self.pynagram.words[word] or self.solved) and word) \
207
207
                or "_ " * len(word) for word in \
208
208
                        a_words[x*per_column:(x+1)*per_column]]
209
209
            getattr(self.ui, "l_solved_" + str(x+1)).setText(\