diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-16 15:33:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-16 15:33:04 +0000 |
commit | 6ef5d85ae1f2c500c4163cd1df580b3f26991c1e (patch) | |
tree | 15194a52bb72f036117fc4c87c193a4cbb64be8b /gtk2_ardour/engine_dialog.cc | |
parent | 830911f6f9451d83a58043b3f9084d3caa164b7b (diff) |
changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)
git-svn-id: svn://localhost/ardour2/branches/3.0@6761 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 3213761c78..3717feb038 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -1255,24 +1255,34 @@ EngineControl::set_state (const XMLNode& root) } else if (child->name() == "periodsize") { period_size_combo.set_active_text(strval); } else if (child->name() == "serverpath") { - /* do not allow us to use a server path that doesn't - exist on this system. this handles cases where - the user has an RC file listing a serverpath - from some other machine. - */ - vector<string>::iterator x; - for (x = server_strings.begin(); x != server_strings.end(); ++x) { - if (*x == strval) { - break; - } - } - if (x != server_strings.end()) { - serverpath_combo.set_active_text (strval); - } else { - warning << string_compose (_("configuration files contain a JACK server path that doesn't exist (%1)"), - strval) - << endmsg; - } + + /* only attempt to set this if we have bothered to look + up server names already. otherwise this is all + redundant (actually, all of this dialog/widget + is redundant in that case ...) + */ + + if (!server_strings.empty()) { + /* do not allow us to use a server path that doesn't + exist on this system. this handles cases where + the user has an RC file listing a serverpath + from some other machine. + */ + vector<string>::iterator x; + for (x = server_strings.begin(); x != server_strings.end(); ++x) { + if (*x == strval) { + break; + } + } + if (x != server_strings.end()) { + serverpath_combo.set_active_text (strval); + } else { + warning << string_compose (_("configuration files contain a JACK server path that doesn't exist (%1)"), + strval) + << endmsg; + } + } + } else if (child->name() == "driver") { driver_combo.set_active_text(strval); } else if (child->name() == "interface") { |