Browse Source

Limit some UI strings so layout doesn't get messy

tags/1.9.4
falkTX 11 years ago
parent
commit
8afa2f87e4
2 changed files with 14 additions and 7 deletions
  1. +1
    -1
      resources/ui/carla_edit.ui
  2. +13
    -6
      source/carla_shared.py

+ 1
- 1
resources/ui/carla_edit.ui View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>672</width> <width>672</width>
<height>541</height>
<height>553</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">


+ 13
- 6
source/carla_shared.py View File

@@ -1667,13 +1667,17 @@ class PluginEdit(QDialog):
} }


for j in range(paramInfo['scalePointCount']): for j in range(paramInfo['scalePointCount']):
scalePointInfo = Carla.host.get_parameter_scalepoint_info(self.fPluginId, i, j)
scalePointInfo = Carla.host.get_parameter_scalepoint_info(self.fPluginId, i, j)
scalePointLabel = cString(scalePointInfo['label'])
scalePointLabel = scalePointLabel[:50] + (scalePointLabel[50:] and "...")


parameter['scalePoints'].append({ parameter['scalePoints'].append({
'value': scalePointInfo['value'], 'value': scalePointInfo['value'],
'label': cString(scalePointInfo['label']) 'label': cString(scalePointInfo['label'])
}) })


parameter['name'] = parameter['name'][:30] + (parameter['name'][30:] and "...")

# ----------------------------------------------------------------- # -----------------------------------------------------------------
# Get width values, in packs of 10 # Get width values, in packs of 10


@@ -1762,6 +1766,7 @@ class PluginEdit(QDialog):


for i in range(programCount): for i in range(programCount):
pName = cString(Carla.host.get_program_name(self.fPluginId, i)) pName = cString(Carla.host.get_program_name(self.fPluginId, i))
pName = pName[:40] + (pName[40:] and "...")
self.ui.cb_programs.addItem(pName) self.ui.cb_programs.addItem(pName)


self.fCurrentProgram = Carla.host.get_current_program_index(self.fPluginId) self.fCurrentProgram = Carla.host.get_current_program_index(self.fPluginId)
@@ -1783,11 +1788,13 @@ class PluginEdit(QDialog):
self.ui.cb_midi_programs.setEnabled(True) self.ui.cb_midi_programs.setEnabled(True)


for i in range(midiProgramCount): for i in range(midiProgramCount):
mpData = Carla.host.get_midi_program_data(self.fPluginId, i)
mpBank = int(mpData['bank'])
mpProg = int(mpData['program'])
mpLabel = cString(mpData['name'])
self.ui.cb_midi_programs.addItem("%03i:%03i - %s" % (mpBank, mpProg, mpLabel))
mpData = Carla.host.get_midi_program_data(self.fPluginId, i)
mpBank = int(mpData['bank'])
mpProg = int(mpData['program'])
mpName = cString(mpData['name'])
mpName = mpName[:40] + (mpName[40:] and "...")

self.ui.cb_midi_programs.addItem("%03i:%03i - %s" % (mpBank, mpProg, mpName))


self.fCurrentMidiProgram = Carla.host.get_current_midi_program_index(self.fPluginId) self.fCurrentMidiProgram = Carla.host.get_current_midi_program_index(self.fPluginId)
self.ui.cb_midi_programs.setCurrentIndex(self.fCurrentMidiProgram) self.ui.cb_midi_programs.setCurrentIndex(self.fCurrentMidiProgram)


Loading…
Cancel
Save