summaryrefslogtreecommitdiffstats
path: root/src/gui/PropertiesWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/PropertiesWindow.cpp')
-rw-r--r--src/gui/PropertiesWindow.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index 0ae2709d..09474027 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -449,16 +449,16 @@ PropertiesWindow::get_value(LV2_URID type, Gtk::Widget* value_widget)
if (check) {
return _app->forge().make(check->get_active());
}
- } else if (type == forge.URI) {
+ } else if (type == forge.URI || type == forge.URID) {
URIEntry* uri_entry = dynamic_cast<URIEntry*>(value_widget);
if (uri_entry) {
- return _app->forge().alloc_uri(uri_entry->get_text());
- }
- } else if (type == forge.URID) {
- URIEntry* uri_entry = dynamic_cast<URIEntry*>(value_widget);
- if (uri_entry) {
- return _app->forge().make_urid(
- _app->world()->uri_map().map_uri(uri_entry->get_text()));
+ if (Raul::URI::is_valid(uri_entry->get_text())) {
+ return _app->forge().make_urid(
+ _app->world()->uri_map().map_uri(uri_entry->get_text()));
+ } else {
+ _app->log().error(fmt("Invalid URI <%1%>\n\n")
+ % uri_entry->get_text());
+ }
}
} else if (type == forge.String) {
Gtk::Entry* entry = dynamic_cast<Gtk::Entry*>(value_widget);
@@ -467,11 +467,6 @@ PropertiesWindow::get_value(LV2_URID type, Gtk::Widget* value_widget)
}
}
- URIEntry* uri_entry = dynamic_cast<URIEntry*>(value_widget);
- if (uri_entry) {
- return _app->forge().alloc_uri(uri_entry->get_text());
- }
-
return Atom();
}