|
3 | 3 | except: |
4 | 4 | pass |
5 | 5 |
|
6 | | -try: |
7 | | - from PyQt4 import QtCore, QtGui |
8 | | - from PyQt4.QtCore import * |
9 | | - from PyQt4.QtGui import * |
10 | | -except Exception as err: |
11 | | - print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).' |
12 | | - print 'Error message:', err |
13 | | - sys.exit() |
14 | | - |
15 | | -try: |
16 | | - _encoding = QtGui.QApplication.UnicodeUTF8 |
17 | | -except AttributeError: |
18 | | - print 'QtGui.QApplication.UnicodeUTF8 error:', err |
19 | | - |
20 | | -def _translate(context, text): |
21 | | - return QtGui.QApplication.translate(context, text) |
22 | | - |
23 | 6 | withMessagingMenu = False |
24 | 7 | try: |
25 | 8 | from gi.repository import MessagingMenu |
@@ -47,6 +30,23 @@ def _translate(context, text): |
47 | 30 | import pickle |
48 | 31 | import platform |
49 | 32 |
|
| 33 | +try: |
| 34 | + from PyQt4 import QtCore, QtGui |
| 35 | + from PyQt4.QtCore import * |
| 36 | + from PyQt4.QtGui import * |
| 37 | +except Exception as err: |
| 38 | + print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).' |
| 39 | + print 'Error message:', err |
| 40 | + sys.exit() |
| 41 | + |
| 42 | +try: |
| 43 | + _encoding = QtGui.QApplication.UnicodeUTF8 |
| 44 | +except AttributeError: |
| 45 | + print 'QtGui.QApplication.UnicodeUTF8 error:', err |
| 46 | + |
| 47 | +def _translate(context, text): |
| 48 | + return QtGui.QApplication.translate(context, text) |
| 49 | + |
50 | 50 |
|
51 | 51 | class MyForm(QtGui.QMainWindow): |
52 | 52 |
|
|
0 commit comments