From 585e719ae50ad4d079f4b6f6b710b1a0d455ed6f Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 16 Sep 2014 19:18:43 +0100 Subject: [PATCH] Cleanup --- source/carla | 6 ++--- source/carla-patchbay | 6 ++--- source/carla-rack | 6 ++--- source/carla_host.py | 2 +- .../native-plugins/resources/carla-plugin | 22 +++++++++---------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/source/carla b/source/carla index d2fea3a2d..83ff853df 100755 --- a/source/carla +++ b/source/carla @@ -326,7 +326,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Create GUI - gCarla.gui = CarlaHostW(host) + gui = CarlaHostW(host) # ------------------------------------------------------------- # Load project file if set @@ -339,12 +339,12 @@ if __name__ == '__main__': if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): pass elif os.path.exists(arg): - gCarla.gui.loadProjectLater(arg) + gui.loadProjectLater(arg) # ------------------------------------------------------------- # Show GUI - gCarla.gui.show() + gui.show() # ------------------------------------------------------------- # App-Loop diff --git a/source/carla-patchbay b/source/carla-patchbay index d4bb8ecd2..8adc2e6fb 100755 --- a/source/carla-patchbay +++ b/source/carla-patchbay @@ -70,7 +70,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Create GUI - gCarla.gui = CarlaHostW(host) + gui = CarlaHostW(host) # ------------------------------------------------------------- # Load project file if set @@ -83,12 +83,12 @@ if __name__ == '__main__': if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): pass elif os.path.exists(arg): - gCarla.gui.loadProjectLater(arg) + gui.loadProjectLater(arg) # ------------------------------------------------------------- # Show GUI - gCarla.gui.show() + gui.show() # ------------------------------------------------------------- # App-Loop diff --git a/source/carla-rack b/source/carla-rack index 8106e8c04..151f37811 100755 --- a/source/carla-rack +++ b/source/carla-rack @@ -70,7 +70,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Create GUI - gCarla.gui = CarlaHostW(host) + gui = CarlaHostW(host) # ------------------------------------------------------------- # Load project file if set @@ -83,12 +83,12 @@ if __name__ == '__main__': if arg.startswith("--with-appname=") or arg.startswith("--with-libprefix="): pass elif os.path.exists(arg): - gCarla.gui.loadProjectLater(arg) + gui.loadProjectLater(arg) # ------------------------------------------------------------- # Show GUI - gCarla.gui.show() + gui.show() # ------------------------------------------------------------- # App-Loop diff --git a/source/carla_host.py b/source/carla_host.py index fd600e31a..bfdc7a6cc 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -104,13 +104,13 @@ class HostWindow(QMainWindow): self.host = host self.ui = ui_carla_host.Ui_CarlaHostW() self.ui.setupUi(self) + gCarla.gui = self if False: # kdevelop likes this :) host = CarlaHostMeta() self.host = host self.fContainer = HostWidgetMeta(self, host) - gCarla.gui = self # ---------------------------------------------------------------------------------------------------- # Internal stuff diff --git a/source/modules/native-plugins/resources/carla-plugin b/source/modules/native-plugins/resources/carla-plugin index c9b4aab1f..93ea15b15 100755 --- a/source/modules/native-plugins/resources/carla-plugin +++ b/source/modules/native-plugins/resources/carla-plugin @@ -335,7 +335,7 @@ class CarlaMiniW(ExternalUI, HostWindow): # Embed plugin UI if LINUX and not config_UseQt5: - from PyQt4.QtGui import QLabel, QHBoxLayout, QX11EmbedWidget + from PyQt4.QtGui import QHBoxLayout, QX11EmbedWidget class CarlaEmbedW(QX11EmbedWidget): def __init__(self, host, winId): @@ -349,18 +349,18 @@ if LINUX and not config_UseQt5: self.fLayout.setSpacing(0) 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.embedInto(winId)