mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Use PBD::find_file_in_search_path instead of find_config_file in ActionManager::init
git-svn-id: svn://localhost/ardour2/trunk@2055 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
bbc289dbe3
commit
40350c8052
1 changed files with 9 additions and 3 deletions
|
|
@ -28,8 +28,10 @@
|
||||||
#include <gtkmm/uimanager.h>
|
#include <gtkmm/uimanager.h>
|
||||||
|
|
||||||
#include <pbd/error.h>
|
#include <pbd/error.h>
|
||||||
|
#include <pbd/file_utils.h>
|
||||||
|
|
||||||
#include <ardour/ardour.h>
|
#include <ardour/ardour.h>
|
||||||
|
#include <ardour/filesystem_paths.h>
|
||||||
|
|
||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
@ -64,13 +66,17 @@ void
|
||||||
ActionManager::init ()
|
ActionManager::init ()
|
||||||
{
|
{
|
||||||
ui_manager = UIManager::create ();
|
ui_manager = UIManager::create ();
|
||||||
|
|
||||||
std::string ui_file = ARDOUR::find_config_file("ardour.menus");
|
sys::path ui_file;
|
||||||
|
|
||||||
|
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
|
||||||
|
|
||||||
|
find_file_in_search_path (spath, "ardour.menus", ui_file);
|
||||||
|
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ui_manager->add_ui_from_file (ui_file);
|
ui_manager->add_ui_from_file (ui_file.to_string());
|
||||||
loaded = true;
|
loaded = true;
|
||||||
} catch (Glib::MarkupError& err) {
|
} catch (Glib::MarkupError& err) {
|
||||||
error << _("badly formatted UI definition file") << endmsg;
|
error << _("badly formatted UI definition file") << endmsg;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue