Browse Source

Carla: Properly open new dialogs under main window

tags/v0.9.0
falkTX 13 years ago
parent
commit
1654f47660
2 changed files with 17 additions and 9 deletions
  1. +4
    -4
      c++/carla-includes/carla_lv2.h
  2. +13
    -5
      src/shared_carla.py

+ 4
- 4
c++/carla-includes/carla_lv2.h View File

@@ -608,7 +608,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI URI)
else if (strncmp(designation, LV2_PORT_GROUPS_PREFIX, strlen(LV2_PORT_GROUPS_PREFIX)) == 0)
pass();
else
qWarning("lv2_rdf_new(%s) - got unknown Port Designation '%s'", URI, designation);
qWarning("lv2_rdf_new(\"%s\") - got unknown Port Designation '%s'", URI, designation);
}
}

@@ -642,7 +642,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI URI)
else if (strcmp(midiMapType, LV2_MIDI_Map__NRPN) == 0)
rdf_port->MidiMap.Type = LV2_PORT_MIDI_MAP_NRPN;
else
qWarning("lv2_rdf_new(%s) - got unknown Port Midi Map type '%s'", URI, midiMapType);
qWarning("lv2_rdf_new(\"%s\") - got unknown Port Midi Map type '%s'", URI, midiMapType);

rdf_port->MidiMap.Number = midiMapNumberNodes.get_first().as_int();
}
@@ -738,7 +738,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI URI)
else if (strcmp(unitType, LV2_UNITS__semitone12TET) == 0)
rdf_port->Unit.Type = LV2_UNIT_SEMITONE;
else
qWarning("lv2_rdf_new(%s) - got unknown Unit type '%s'", URI, unitType);
qWarning("lv2_rdf_new(\"%s\") - got unknown Unit type '%s'", URI, unitType);
}

Lilv::Nodes unitNameNodes(lilvPort.get_value(Lv2World.unit_name));
@@ -981,7 +981,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI URI)
else if (lilvUI.is_a(Lv2World.ui_external_old))
rdf_ui->Type = LV2_UI_OLD_EXTERNAL;
else
qWarning("lv2_rdf_new(%s) - got unknown UI type '%s'", URI, lilvUI.get_uri().as_uri());
qWarning("lv2_rdf_new(\"%s\") - got unknown UI type '%s'", URI, lilvUI.get_uri().as_uri());
}

// --------------------------------------


+ 13
- 5
src/shared_carla.py View File

@@ -556,8 +556,9 @@ class PluginEdit(QDialog, ui_carla_edit.Ui_PluginEdit):
QDialog.__init__(self, parent)
self.setupUi(self)

self.m_geometry = None
self.m_pluginId = pluginId
self.m_firstShow = True
self.m_geometry = None
self.m_pluginId = pluginId
self.m_pluginInfo = None

self.m_parameterCount = 0
@@ -996,7 +997,10 @@ class PluginEdit(QDialog, ui_carla_edit.Ui_PluginEdit):

def setVisible(self, yesNo):
if yesNo:
if self.m_geometry and not self.m_geometry.isNull():
if self.m_firstShow:
self.m_firstShow = False
self.restoreGeometry("")
elif self.m_geometry and not self.m_geometry.isNull():
self.restoreGeometry(self.m_geometry)
else:
self.m_geometry = self.saveGeometry()
@@ -1979,6 +1983,7 @@ class PluginGUI(QDialog):
def __init__(self, parent, pluginName, resizable):
QDialog.__init__(self, parent)

self.m_firstShow = True
self.m_geometry = None
self.m_resizable = resizable

@@ -1988,7 +1993,7 @@ class PluginGUI(QDialog):
self.setNewSize(50, 50)
self.setWindowTitle("%s (GUI)" % pluginName)

if (WINDOWS and not resizable):
if WINDOWS and not resizable:
self.setWindowFlags(self.windowFlags() | Qt.MSWindowsFixedSizeDialogHint)

self.connect(self, SIGNAL("finished(int)"), SLOT("slot_finished()"))
@@ -2006,7 +2011,10 @@ class PluginGUI(QDialog):

def setVisible(self, yesNo):
if yesNo:
if self.m_geometry and not self.m_geometry.isNull():
if self.m_firstShow:
self.m_firstShow = False
self.restoreGeometry("")
elif self.m_geometry and not self.m_geometry.isNull():
self.restoreGeometry(self.m_geometry)
else:
self.m_geometry = self.saveGeometry()


Loading…
Cancel
Save