diff --git a/source/carla-patchbay b/source/carla-patchbay new file mode 100755 index 000000000..6799c6779 --- /dev/null +++ b/source/carla-patchbay @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Carla plugin host +# Copyright (C) 2011-2013 Filipe Coelho +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For a full copy of the GNU General Public License see the GPL.txt file + +# ------------------------------------------------------------------------------------------------------------ +# Imports (Custom Stuff) + +from carla_host import * +from carla_patchbay import CarlaPatchbayW + +# ------------------------------------------------------------------------------------------------------------ +# Main Window + +class CarlaHostW(HostWindow): + def __init__(self, parent=None): + HostWindow.__init__(self, parent) + + self.fContainer = CarlaPatchbayW(self) + self.setCentralWidget(self.fContainer) + +# ------------------------------------------------------------------------------------------------------------ +# Main + +if __name__ == '__main__': + # ------------------------------------------------------------- + # App initialization + + app = CarlaApplication() + + # ------------------------------------------------------------- + # Set-up custom signal handling + + setUpSignals() + + # ------------------------------------------------------------- + # Read CLI args + + appName = os.path.basename(__file__) if ("__file__" in dir() and os.path.dirname(__file__) in PATH) else sys.argv[0] + libPrefix = None + projectFilename = None + + argv = app.arguments() + argc = len(argv) + + for i in range(argc): + if i == 0: continue + argument = argv[i] + + if argument.startswith("--with-appname="): + appName = os.path.basename(argument.replace("--with-appname=", "")) + + elif argument.startswith("--with-libprefix="): + libPrefix = argument.replace("--with-libprefix=", "") + + elif os.path.exists(argument): + projectFilename = argument + + # ------------------------------------------------------------- + # Init host backend + + initHost(appName, libPrefix) + + # ------------------------------------------------------------- + # Create GUI + + Carla.gui = CarlaHostW() + + # ------------------------------------------------------------- + # Load project file if set + + if projectFilename is not None: + Carla.gui.loadProjectLater(projectFilename) + + # ------------------------------------------------------------- + # Show GUI + + Carla.gui.show() + + # ------------------------------------------------------------- + # App-Loop + + sys.exit(app.exec_()) diff --git a/source/carla-mini b/source/carla-rack similarity index 95% rename from source/carla-mini rename to source/carla-rack index b38ccc7cf..137e89258 100755 --- a/source/carla-mini +++ b/source/carla-rack @@ -21,17 +21,15 @@ from carla_host import * from carla_rack import CarlaRackW -from carla_patchbay import CarlaPatchbayW # ------------------------------------------------------------------------------------------------------------ # Main Window -class CarlaMiniW(HostWindow): +class CarlaHostW(HostWindow): def __init__(self, parent=None): HostWindow.__init__(self, parent) self.fContainer = CarlaRackW(self) - #self.fContainer = CarlaPatchbayW(self) self.setCentralWidget(self.fContainer) # ------------------------------------------------------------------------------------------------------------ @@ -79,7 +77,7 @@ if __name__ == '__main__': # ------------------------------------------------------------- # Create GUI - Carla.gui = CarlaMiniW() + Carla.gui = CarlaHostW() # ------------------------------------------------------------- # Load project file if set diff --git a/source/carla_style.py b/source/carla_style.py index 8192849db..b3bfeb9c9 100644 --- a/source/carla_style.py +++ b/source/carla_style.py @@ -35,11 +35,6 @@ from carla_shared import * # ------------------------------------------------------------------------------------------------------------ class CarlaApplication(object): - # Colors - COLOR_SYSTEM = 0 - COLOR_BLACK = 1 - COLOR_BLUE = 1 - def __init__(self, appName = "Carla"): object.__init__(self) @@ -181,7 +176,6 @@ class CarlaApplication(object): self.fPalBlue.setColor(QPalette.Inactive, QPalette.LinkVisited, QColor(64, 128, 255)) self.loadSettings() - print("TESTING", self.fApp.style().objectName()) def loadSettings(self): settings = QSettings() @@ -189,17 +183,14 @@ class CarlaApplication(object): useProTheme = settings.value("Main/UseProTheme", True, type=bool) if useProTheme: - print("USING PRO THEME") self.fApp.setStyle("carla") - proThemeColor = settings.value("Main/ProThemeColor", "Black", type=str) + proThemeColor = settings.value("Main/ProThemeColor", "Black", type=str).lower() - if proThemeColor.lower() == "black": - print("USING PRO AND BLACK THEME") + if proThemeColor == "black": self.fApp.setPalette(self.fPalBlack) - elif proThemeColor.lower() == "blue": - print("USING PRO AND BLUE THEME") + elif proThemeColor == "blue": self.fApp.setPalette(self.fPalBlue) def arguments(self):