summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp2
-rw-r--r--src/gui/BreadCrumbs.cpp5
-rw-r--r--src/gui/PatchPortModule.cpp5
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index f9f47ddf..a815c6e7 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -376,7 +376,7 @@ App::icon_from_path(const string& path, int size)
buf->add_destroy_notify_callback(
new IconDestroyNotification(*this, make_pair(path, size)),
&App::icon_destroyed);
- } catch (Glib::Error e) {
+ } catch (const Glib::Error& e) {
warn << "Error loading icon: " << e.what() << endl;
}
return buf;
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index adc9526d..c6c776d5 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -62,8 +62,7 @@ BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
_enable_signal = false;
// Moving to a path we already contain, just switch the active button
- if (_breadcrumbs.size() > 0 && (path.is_parent_of(_full_path) || path == _full_path)) {
-
+ if (!_breadcrumbs.empty() && (path.is_parent_of(_full_path) || path == _full_path)) {
for (std::list<BreadCrumb*>::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) {
if ((*i)->path() == path) {
(*i)->set_active(true);
@@ -82,7 +81,7 @@ BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
_enable_signal = old_enable_signal;
// Moving to a child of the full path, just append crumbs (preserve view cache)
- } else if (_breadcrumbs.size() > 0 && (path.is_child_of(_full_path))) {
+ } else if (!_breadcrumbs.empty() && path.is_child_of(_full_path)) {
string suffix = path.substr(_full_path.length());
while (suffix.length() > 0) {
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index e716a12d..3c04d29e 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -119,10 +119,11 @@ PatchPortModule::show_human_names(bool b)
{
const URIs& uris = app().uris();
const Atom& name = _model->get_property(uris.lv2_name);
- if (b && name.type() == uris.forge.String)
+ if (b && name.type() == uris.forge.String) {
set_name(name.get_string());
- else
+ } else {
set_name(_model->symbol().c_str());
+ }
}
void