@@ -326,7 +326,7 @@ if __name__ == '__main__': | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Create GUI | # Create GUI | ||||
gCarla.gui = CarlaHostW(host) | |||||
gui = CarlaHostW(host) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Load project file if set | # Load project file if set | ||||
@@ -339,12 +339,12 @@ if __name__ == '__main__': | |||||
if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): | if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): | ||||
pass | pass | ||||
elif os.path.exists(arg): | elif os.path.exists(arg): | ||||
gCarla.gui.loadProjectLater(arg) | |||||
gui.loadProjectLater(arg) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Show GUI | # Show GUI | ||||
gCarla.gui.show() | |||||
gui.show() | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# App-Loop | # App-Loop | ||||
@@ -70,7 +70,7 @@ if __name__ == '__main__': | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Create GUI | # Create GUI | ||||
gCarla.gui = CarlaHostW(host) | |||||
gui = CarlaHostW(host) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Load project file if set | # Load project file if set | ||||
@@ -83,12 +83,12 @@ if __name__ == '__main__': | |||||
if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): | if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): | ||||
pass | pass | ||||
elif os.path.exists(arg): | elif os.path.exists(arg): | ||||
gCarla.gui.loadProjectLater(arg) | |||||
gui.loadProjectLater(arg) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Show GUI | # Show GUI | ||||
gCarla.gui.show() | |||||
gui.show() | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# App-Loop | # App-Loop | ||||
@@ -70,7 +70,7 @@ if __name__ == '__main__': | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Create GUI | # Create GUI | ||||
gCarla.gui = CarlaHostW(host) | |||||
gui = CarlaHostW(host) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Load project file if set | # Load project file if set | ||||
@@ -83,12 +83,12 @@ if __name__ == '__main__': | |||||
if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): | if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): | ||||
pass | pass | ||||
elif os.path.exists(arg): | elif os.path.exists(arg): | ||||
gCarla.gui.loadProjectLater(arg) | |||||
gui.loadProjectLater(arg) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Show GUI | # Show GUI | ||||
gCarla.gui.show() | |||||
gui.show() | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# App-Loop | # App-Loop | ||||
@@ -104,13 +104,13 @@ class HostWindow(QMainWindow): | |||||
self.host = host | self.host = host | ||||
self.ui = ui_carla_host.Ui_CarlaHostW() | self.ui = ui_carla_host.Ui_CarlaHostW() | ||||
self.ui.setupUi(self) | self.ui.setupUi(self) | ||||
gCarla.gui = self | |||||
if False: | if False: | ||||
# kdevelop likes this :) | # kdevelop likes this :) | ||||
host = CarlaHostMeta() | host = CarlaHostMeta() | ||||
self.host = host | self.host = host | ||||
self.fContainer = HostWidgetMeta(self, host) | self.fContainer = HostWidgetMeta(self, host) | ||||
gCarla.gui = self | |||||
# ---------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------- | ||||
# Internal stuff | # Internal stuff | ||||
@@ -335,7 +335,7 @@ class CarlaMiniW(ExternalUI, HostWindow): | |||||
# Embed plugin UI | # Embed plugin UI | ||||
if LINUX and not config_UseQt5: | if LINUX and not config_UseQt5: | ||||
from PyQt4.QtGui import QLabel, QHBoxLayout, QX11EmbedWidget | |||||
from PyQt4.QtGui import QHBoxLayout, QX11EmbedWidget | |||||
class CarlaEmbedW(QX11EmbedWidget): | class CarlaEmbedW(QX11EmbedWidget): | ||||
def __init__(self, host, winId): | def __init__(self, host, winId): | ||||
@@ -349,18 +349,18 @@ if LINUX and not config_UseQt5: | |||||
self.fLayout.setSpacing(0) | self.fLayout.setSpacing(0) | ||||
self.setLayout(self.fLayout) | self.setLayout(self.fLayout) | ||||
gCarla.gui = CarlaMiniW(host, self) | |||||
gCarla.gui.hide() | |||||
gui = CarlaMiniW(host, self) | |||||
gui.hide() | |||||
gCarla.gui.ui.act_file_quit.setEnabled(False) | |||||
gCarla.gui.ui.menu_File.setEnabled(False) | |||||
gCarla.gui.ui.menu_File.setVisible(False) | |||||
#menuBar = gCarla.gui.menuBar() | |||||
#menuBar.removeAction(gCarla.gui.ui.menu_File.menuAction()) | |||||
gui.ui.act_file_quit.setEnabled(False) | |||||
gui.ui.menu_File.setEnabled(False) | |||||
gui.ui.menu_File.setVisible(False) | |||||
#menuBar = gui.menuBar() | |||||
#menuBar.removeAction(gui.ui.menu_File.menuAction()) | |||||
self.addWidget(gCarla.gui.menuBar()) | |||||
self.addWidget(gCarla.gui.ui.toolBar) | |||||
self.addWidget(gCarla.gui.centralWidget()) | |||||
self.addWidget(gui.menuBar()) | |||||
self.addWidget(gui.ui.toolBar) | |||||
self.addWidget(gui.centralWidget()) | |||||
self.setFixedSize(740, 512) | self.setFixedSize(740, 512) | ||||
self.embedInto(winId) | self.embedInto(winId) | ||||