Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gnome-terminal option in gbuilder configuration UI #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions frontend/src/gbuilder/Core/Attachable.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ 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 +"\""
else:
if self.device_type == "yRouter":
command += "rxvt -T \"" + window_name + "\" -e " + screen_yrouter
else:
command += "rxvt -T \"" + window_name + "\" -e " + base + screen

self.shell = subprocess.Popen(str(command), shell=True)
2 changes: 1 addition & 1 deletion frontend/src/gbuilder/Core/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/gbuilder/UI/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: ")))
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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()
Expand Down