From b049e6d40311a3fa6db4be85e10800285cbf3a51 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 8 Feb 2015 09:03:23 +0000 Subject: [PATCH] Misc --- source/widgets/racklistwidget.py | 36 +++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/source/widgets/racklistwidget.py b/source/widgets/racklistwidget.py index a872a77c9..b8809882e 100644 --- a/source/widgets/racklistwidget.py +++ b/source/widgets/racklistwidget.py @@ -103,9 +103,6 @@ class RackListItem(QListWidgetItem): widget.deleteLater() del widget - def isCompacted(self): - return self.fOptions['compact'] - def getEditDialog(self): if self.fWidget is None: return None @@ -118,6 +115,12 @@ class RackListItem(QListWidgetItem): def getWidget(self): return self.fWidget + def isCompacted(self): + return self.fOptions['compact'] + + def isUsingSkins(self): + return self.fOptions['useSkins'] + # -------------------------------------------------------------------------------------------------------- def setPluginId(self, pluginId): @@ -132,6 +135,11 @@ class RackListItem(QListWidgetItem): QListWidgetItem.setSelected(self, select) + # -------------------------------------------------------------------------------------------------------- + + def setCompacted(self, compact): + self.fOptions['compact'] = compact + def setUsingSkins(self, useSkins): self.fOptions['useSkins'] = useSkins @@ -170,12 +178,12 @@ class RackListWidget(QListWidget): exts = gCarla.utils.get_supported_file_extensions().split(";") - exts.append(".dll") + #exts.append(".dll") - if MACOS: - exts.append(".dylib") - if not WINDOWS: - exts.append(".so") + #if MACOS: + #exts.append(".dylib") + #if not WINDOWS: + #exts.append(".so") self.fSupportedExtensions = tuple(i.replace("*","").lower() for i in exts) self.fLastSelectedItem = None @@ -215,13 +223,13 @@ class RackListWidget(QListWidget): def isDragUrlValid(self, url): filename = url.toLocalFile() - if os.path.isdir(filename): - if os.path.exists(os.path.join(filename, "manifest.ttl")): - return True - if MACOS and filename.lower().endswith((".vst", ".vst3")): - return True + #if os.path.isdir(filename): + #if os.path.exists(os.path.join(filename, "manifest.ttl")): + #return True + #if MACOS and filename.lower().endswith((".vst", ".vst3")): + #return True - elif os.path.isfile(filename): + if os.path.isfile(filename): if filename.lower().endswith(self.fSupportedExtensions): return True