From ca7244c7b0fdd76accf2bb999e016b8a1f3047c3 Mon Sep 17 00:00:00 2001 From: Ivan Arredondo Date: Fri, 16 Jun 2017 10:52:25 -0700 Subject: [PATCH 1/2] Add gnome-terminal option --- frontend/src/gbuilder/Core/Attachable.py | 16 ++++++++++++---- frontend/src/gbuilder/Core/globals.py | 2 +- frontend/src/gbuilder/UI/Configuration.py | 4 ++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/gbuilder/Core/Attachable.py b/frontend/src/gbuilder/Core/Attachable.py index 05b7f04..3e7b2dd 100644 --- a/frontend/src/gbuilder/Core/Attachable.py +++ b/frontend/src/gbuilder/Core/Attachable.py @@ -56,9 +56,17 @@ def attach(self): command += base command += " -m \"" + startpath + "\"" else: - if self.device_type == "yRouter": - command += "rxvt -T \"" + window_name + "\" -e " + screen_yrouter - else: - command += "rxvt -T \"" + window_name + "\" -e " + base + screen + if options["gnome"] == True: + if self.device_type == "yRouter": + command += "gnome-terminal -e " + "\"" + screen_yrouter + "\"" + else: + command += "gnome-terminal -e " +"\"" + base + screen +"\"" + print "got here" + else: + if self.device_type == "yRouter": + command += "rxvt -T \"" + window_name + "\" -e " + screen_yrouter + else: + command += "rxvt -T \"" + window_name + "\" -e " + base + screen + print "got here" self.shell = subprocess.Popen(str(command), shell=True) diff --git a/frontend/src/gbuilder/Core/globals.py b/frontend/src/gbuilder/Core/globals.py index f52d867..8afd9dc 100644 --- a/frontend/src/gbuilder/Core/globals.py +++ b/frontend/src/gbuilder/Core/globals.py @@ -29,7 +29,7 @@ "server":"localhost", "session":"GINI", "autoconnect":True, "localPort":"10001", "remotePort":"10000", "restore":True, - "moveAlert":True, "wserver":"192.168.54.121", "wlocalPort":"60001","wremotePort":"60000"} + "moveAlert":True, "wserver":"192.168.54.121", "wlocalPort":"60001","wremotePort":"60000", "gnome":False} mainWidgets = {"app":None, "main":None, diff --git a/frontend/src/gbuilder/UI/Configuration.py b/frontend/src/gbuilder/UI/Configuration.py index 3bcc4f2..d74f206 100644 --- a/frontend/src/gbuilder/UI/Configuration.py +++ b/frontend/src/gbuilder/UI/Configuration.py @@ -289,6 +289,7 @@ def __init__(self, parent=None): uiLayout.addWidget(self.systrayCheckBox) uiLayout.addWidget(self.restoreLayoutCheckBox) uiLayout.addWidget(self.moveAlertCheckBox) + uiLayout.addWidget(self.gnomeTerminalCheckBox) uiLayout.addWidget(QtGui.QLabel(self.tr("Grid Color: "))) uiLayout.addLayout(gridLayout) uiLayout.addWidget(QtGui.QLabel(self.tr("Background: "))) @@ -326,6 +327,7 @@ def createUICheckboxes(self): self.gridCheckBox = QtGui.QCheckBox(self.tr("Show grid")) self.moveAlertCheckBox = QtGui.QCheckBox(self.tr("Alert on Move (when started)")) self.restoreLayoutCheckBox = QtGui.QCheckBox(self.tr("Remember and restore layout")) + self.gnomeTerminalCheckBox = QtGui.QCheckBox(self.tr("Use Gnome-Terminal")) def createBrowsables(self): """ @@ -427,6 +429,7 @@ def updateSettings(self): self.smoothingCheckBox.setChecked(options["smoothing"]) self.systrayCheckBox.setChecked(options["systray"]) self.restoreLayoutCheckBox.setChecked(options["restore"]) + self.gnomeTerminalCheckBox.setChecked(options["gnome"]) self.gridLine.setText(options["gridColor"]) self.backgroundLine.setText(options["background"]) @@ -477,6 +480,7 @@ def saveOptions(self): options["systray"] = self.systrayCheckBox.isChecked() options["restore"] = self.restoreLayoutCheckBox.isChecked() options["moveAlert"] = self.moveAlertCheckBox.isChecked() + options["gnome"] = self.gnomeTerminalCheckBox.isChecked() options["gridColor"] = self.gridLine.text() options["background"] = self.backgroundLine.text() From 51ff6b9588e5a5370675ef0b98543b3d06ddb0ed Mon Sep 17 00:00:00 2001 From: Ivan Arredondo Date: Fri, 16 Jun 2017 10:57:24 -0700 Subject: [PATCH 2/2] clean up print statements --- frontend/src/gbuilder/Core/Attachable.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/gbuilder/Core/Attachable.py b/frontend/src/gbuilder/Core/Attachable.py index 3e7b2dd..dee96e8 100644 --- a/frontend/src/gbuilder/Core/Attachable.py +++ b/frontend/src/gbuilder/Core/Attachable.py @@ -61,12 +61,10 @@ def attach(self): command += "gnome-terminal -e " + "\"" + screen_yrouter + "\"" else: command += "gnome-terminal -e " +"\"" + base + screen +"\"" - print "got here" else: if self.device_type == "yRouter": command += "rxvt -T \"" + window_name + "\" -e " + screen_yrouter else: command += "rxvt -T \"" + window_name + "\" -e " + base + screen - print "got here" self.shell = subprocess.Popen(str(command), shell=True)