Fix omitted renaming pyuic => pytquic.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/10/head
Slávek Banko 2 years ago
parent cddd660ca4
commit 69c48c09a4
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -35,7 +35,7 @@ FALSE = 0
TRUE = not FALSE
addApp = TRUE
addImport = TRUE
pyuicPath = "pyuic"
pytquicPath = "pytquic"
filename = ""
i18nFunc = FALSE
@ -47,7 +47,7 @@ def getOptions ():
opterr = 0
shortOptions = 'aip:'
longOptions = ['noapp', 'noimport', 'pyuic=', 'usetdei18n']
longOptions = ['noapp', 'noimport', 'pytquic=', 'usetdei18n']
try:
optlist, args = getopt.getopt (sys.argv [1:], shortOptions, longOptions)
@ -64,7 +64,7 @@ def getOptions ():
Options:
-a, --noapp Don't add TDEApplication code
-i, --noimport Don't add tdecore, tdeui import statements
-p, --pyuic Path to pyuic program
-p, --pytquic Path to pytquic program
--usetdei18n Adds TDEs default i18n functions to your Python TDE ui file
""")
return FALSE
@ -73,7 +73,7 @@ def getOptions ():
return checkOptions (optlist)
def checkOptions (optlist):
global addApp, addImport, pyuicPath, i18nFunc
global addApp, addImport, pytquicPath, i18nFunc
for pair in optlist:
if (pair [0] == '--noapp') or (pair [0] == '-a'):
@ -82,8 +82,8 @@ def checkOptions (optlist):
elif (pair [0] == '--noimport') or (pair [0] == '-i'):
addImport = FALSE
elif (pair [0] == '--pyuic') or (pair [0] == '-p'):
pyuicPath = pair [1]
elif (pair [0] == '--pytquic') or (pair [0] == '-p'):
pytquicPath = pair [1]
if (pair [0] == '--usetdei18n'):
i18nFunc=TRUE
@ -109,7 +109,7 @@ def addapp (indent, n):
n.write (indent + 'TDECmdLineArgs.init (sys.argv, appname, description, version)\n')
n.write (indent + 'a = TDEApplication ()\n\n')
def doPyuic ():
def doPytquic ():
fn = os.path.splitext (os.path.basename(filename)) [0] + '.py'
opts = ""
@ -123,8 +123,8 @@ def doPyuic ():
opts = opts + ' -o '
if os.system (pyuicPath + opts + fn + ' ' + filename) != 0:
print(pyuicPath + opts + fn + ' ' + filename + " failed")
if os.system (pytquicPath + opts + fn + ' ' + filename) != 0:
print(pytquicPath + opts + fn + ' ' + filename + " failed")
sys.exit (-1)
if addApp or addImport:
@ -160,4 +160,4 @@ def doPyuic ():
# --------- main ----------
getOptions ()
doPyuic ()
doPytquic ()

@ -2,8 +2,7 @@
# Form implementation generated from reading ui file 'qxembedexample.ui'
#
# Created: Thu Apr 29 02:17:37 2004
# by: The PyTQt User Interface Compiler (pyuic) 3.11
# Created by: The PyTQt User Interface Compiler (pytquic) 3.18.1
#
# WARNING! All changes made in this file will be lost!
@ -47,7 +46,7 @@ class QXEmbedExample(TQWidget):
self.textLabel1 = TQLabel(self.tab,"textLabel1")
tabLayout.addWidget(self.textLabel1)
self.mainTabs.insertTab(self.tab,TQString(""))
self.mainTabs.insertTab(self.tab,TQString.fromUtf8(""))
QXEmbedExampleLayout.addWidget(self.mainTabs)
self.languageChange()

@ -11,7 +11,7 @@ from tdecore import KWin, KWinModule
from tdeui import KComboBox, TDEMainWindow, KPushButton, QXEmbed
## add the missing items to the pyuic-generated module
## add the missing items to the pytquic-generated module
import qxembedexample
qxembedexample.KComboBox = KComboBox
qxembedexample.KPushButton = KPushButton
@ -43,7 +43,7 @@ def getWindow(pid):
class ExampleForm(QXEmbedExample):
""" wraps the pyuic generated form class with our behavior
""" wraps the pyqtuic generated form class with our behavior
"""
def __init__(self, parent):

Loading…
Cancel
Save