Browse Source

Misc

tags/1.9.6
falkTX 9 years ago
parent
commit
b049e6d403
1 changed files with 22 additions and 14 deletions
  1. +22
    -14
      source/widgets/racklistwidget.py

+ 22
- 14
source/widgets/racklistwidget.py View File

@@ -103,9 +103,6 @@ class RackListItem(QListWidgetItem):
widget.deleteLater() widget.deleteLater()
del widget del widget


def isCompacted(self):
return self.fOptions['compact']

def getEditDialog(self): def getEditDialog(self):
if self.fWidget is None: if self.fWidget is None:
return None return None
@@ -118,6 +115,12 @@ class RackListItem(QListWidgetItem):
def getWidget(self): def getWidget(self):
return self.fWidget return self.fWidget


def isCompacted(self):
return self.fOptions['compact']

def isUsingSkins(self):
return self.fOptions['useSkins']

# -------------------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------------------


def setPluginId(self, pluginId): def setPluginId(self, pluginId):
@@ -132,6 +135,11 @@ class RackListItem(QListWidgetItem):


QListWidgetItem.setSelected(self, select) QListWidgetItem.setSelected(self, select)


# --------------------------------------------------------------------------------------------------------

def setCompacted(self, compact):
self.fOptions['compact'] = compact

def setUsingSkins(self, useSkins): def setUsingSkins(self, useSkins):
self.fOptions['useSkins'] = useSkins self.fOptions['useSkins'] = useSkins


@@ -170,12 +178,12 @@ class RackListWidget(QListWidget):


exts = gCarla.utils.get_supported_file_extensions().split(";") 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.fSupportedExtensions = tuple(i.replace("*","").lower() for i in exts)
self.fLastSelectedItem = None self.fLastSelectedItem = None
@@ -215,13 +223,13 @@ class RackListWidget(QListWidget):
def isDragUrlValid(self, url): def isDragUrlValid(self, url):
filename = url.toLocalFile() 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): if filename.lower().endswith(self.fSupportedExtensions):
return True return True




Loading…
Cancel
Save