From da425efa84bda5284894ef05c8312517058f9c66 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 13 Feb 2014 11:59:37 +0000 Subject: [PATCH] Cleanup --- source/carla-plugin | 5 ----- source/carla_style.py | 6 ++++++ source/modules/native-plugins/resources/bigmeter-ui | 8 +------- source/modules/native-plugins/resources/notes-ui | 12 ++++-------- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/source/carla-plugin b/source/carla-plugin index 9c684f2cc..40b66a79a 100755 --- a/source/carla-plugin +++ b/source/carla-plugin @@ -16,11 +16,6 @@ # # For a full copy of the GNU General Public License see the GPL.txt file -# ------------------------------------------------------------------------------------------------------------ -# Imports (Global) - -from time import sleep - # ------------------------------------------------------------------------------------------------------------ # Imports (Custom Stuff) diff --git a/source/carla_style.py b/source/carla_style.py index 771dc5e15..7a7bfe815 100644 --- a/source/carla_style.py +++ b/source/carla_style.py @@ -27,6 +27,9 @@ from PyQt4.QtGui import QApplication, QColor, QPalette from carla_shared import * +# Make sure resources are good +import resources_rc + # ------------------------------------------------------------------------------------------------------------ class CarlaApplication(object): @@ -204,6 +207,9 @@ class CarlaApplication(object): def exec_(self): return self.fApp.exec_() + def exit_exec(self): + return sys.exit(self.fApp.exec_()) + def getApp(self): return self.fApp diff --git a/source/modules/native-plugins/resources/bigmeter-ui b/source/modules/native-plugins/resources/bigmeter-ui index e16216a3d..3f892345f 100755 --- a/source/modules/native-plugins/resources/bigmeter-ui +++ b/source/modules/native-plugins/resources/bigmeter-ui @@ -16,11 +16,6 @@ # # For a full copy of the GNU General Public License see the doc/GPL.txt file. -# ------------------------------------------------------------------------------------------------------------ -# Imports (Global) - -from sys import exit - # ----------------------------------------------------------------------- # Imports (ExternalUI) @@ -88,7 +83,6 @@ class DistrhoUIBigMeter(DigitalPeakMeter, ExternalUI): def timerEvent(self, event): if event.timerId() == self.fIdleTimer and not self.idleExternalUI(): self.d_uiQuit() - DigitalPeakMeter.timerEvent(self, event) def closeEvent(self, event): @@ -100,4 +94,4 @@ if __name__ == '__main__': app = CarlaApplication("BigMeter") #app... gui = DistrhoUIBigMeter() - exit(app.exec_()) + app.exit_exec() diff --git a/source/modules/native-plugins/resources/notes-ui b/source/modules/native-plugins/resources/notes-ui index d67de1459..7d1a55293 100755 --- a/source/modules/native-plugins/resources/notes-ui +++ b/source/modules/native-plugins/resources/notes-ui @@ -1,8 +1,8 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# DISTRHO Notes Plugin -# Copyright (C) 2012-2013 Filipe Coelho +# Carla Native Plugins +# Copyright (C) 2012-2014 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 @@ -14,14 +14,12 @@ # 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 +# For a full copy of the GNU General Public License see the doc/GPL.txt file. # ------------------------------------------------------------------------------------------------------------ # Imports (Global) from numpy import rint -from sys import argv, exit - from PyQt4.QtCore import pyqtSlot from PyQt4.QtGui import QApplication, QGridLayout, QLabel, QPushButton, QTextEdit, QWidget @@ -32,8 +30,6 @@ from carla_style import CarlaApplication from externalui import ExternalUI from paramspinbox import ParamSpinBox -import resources_rc - # ----------------------------------------------------------------------- # External UI @@ -231,4 +227,4 @@ if __name__ == '__main__': app = CarlaApplication("Notes") #app... gui = DistrhoUINotes() - exit(app.exec_()) + app.exit_exec()