|
|
|
@ -13,13 +13,19 @@ sys.setdefaultencoding("utf-8")
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
setLocalTranslate('console_gui',sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
class Application(QtGui.QApplication):
|
|
|
|
|
def __init__(self, argv):
|
|
|
|
|
QtGui.QApplication.__init__(self, argv)
|
|
|
|
|
self.installEventFilter(self)
|
|
|
|
|
import signal
|
|
|
|
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
|
|
|
|
|
|
|
|
|
def event(self, e):
|
|
|
|
|
return QtGui.QApplication.event(self, e)
|
|
|
|
|
#KeyboardInterrupt
|
|
|
|
|
#def sigint_handler(*args):
|
|
|
|
|
# """Handler for the SIGINT signal."""
|
|
|
|
|
# sys.stderr.write('\r')
|
|
|
|
|
# from PySide.QtGui import QMessageBox
|
|
|
|
|
# if QMessageBox.question(None, '', "Are you sure you want to quit?",
|
|
|
|
|
# QMessageBox.Yes | QMessageBox.No,
|
|
|
|
|
# QMessageBox.No) == QMessageBox.Yes:
|
|
|
|
|
# QtGui.QApplication.quit()
|
|
|
|
|
#signal.signal(signal.SIGINT, sigint_handler)
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
from calculate.consolegui.application.ConnectionTabs import ToolTabWidget,\
|
|
|
|
@ -65,7 +71,7 @@ def main():
|
|
|
|
|
except dbus.DBusException:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
app = Application(sys.argv)
|
|
|
|
|
app = QtGui.QApplication(sys.argv)
|
|
|
|
|
|
|
|
|
|
second = False
|
|
|
|
|
for run_commands in filter(lambda x:'cl-console-gui' in x[0],getRunProc()):
|
|
|
|
|