|
|
|
@ -46,6 +46,7 @@ class SelectedMethodWgt(QtGui.QWidget):
|
|
|
|
|
self.VarsGui.flIniFile()
|
|
|
|
|
|
|
|
|
|
self.ClientObj = ApiClient(app, self)
|
|
|
|
|
self.port = args.port or self.VarsGui.GetInteger('core.cl_core_port')
|
|
|
|
|
self.MethodWidget = self.ClientObj.MainWidget
|
|
|
|
|
self.MethodWidget.topmenu.hide()
|
|
|
|
|
layout = QtGui.QHBoxLayout(self)
|
|
|
|
@ -78,7 +79,7 @@ class SelectedMethodWgt(QtGui.QWidget):
|
|
|
|
|
self.show()
|
|
|
|
|
|
|
|
|
|
def connect(self):
|
|
|
|
|
self.MethodWidget.connect_to_localhost(self.args.host, self.args.port)
|
|
|
|
|
self.MethodWidget.connect_to_localhost(self.args.host, self.port)
|
|
|
|
|
if not self.ClientObj.client:
|
|
|
|
|
return 1
|
|
|
|
|
self.ClientObj.sid = get_sid(self.ClientObj.client)
|
|
|
|
@ -226,7 +227,7 @@ def parse():
|
|
|
|
|
'--method', type=str, dest='method',
|
|
|
|
|
help=_('call method'))
|
|
|
|
|
parser.add_argument(
|
|
|
|
|
'-p', '--port', type=int, default = '8888', dest='port',
|
|
|
|
|
'-p', '--port', type=int, dest='port',
|
|
|
|
|
help=_('port number'))
|
|
|
|
|
parser.add_argument(
|
|
|
|
|
'--host', type=str, default = 'localhost', dest='host',
|
|
|
|
@ -343,6 +344,8 @@ class ToolTabWidget(QtGui.QTabWidget):
|
|
|
|
|
|
|
|
|
|
if not host or host == 'localhost':
|
|
|
|
|
host = '127.0.0.1'
|
|
|
|
|
if not port:
|
|
|
|
|
port = self.VarsGui.GetInteger('core.cl_core_port')
|
|
|
|
|
self.FirstWidget.connect_to_localhost(host, port)
|
|
|
|
|
if self.FirstWidget.ClientObj.client:
|
|
|
|
|
if host in ['127.0.0.1', 'localhost']:
|
|
|
|
|