diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/App.cpp | 14 | ||||
-rw-r--r-- | src/gui/GraphBox.cpp | 3 | ||||
-rw-r--r-- | src/gui/LoadGraphWindow.cpp | 4 |
3 files changed, 19 insertions, 2 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 30c31f64..b458bc3c 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -23,13 +23,14 @@ #include <gtkmm/stock.h> #include "ganv/Edge.hpp" +#include "ingen/Configuration.hpp" #include "ingen/EngineBase.hpp" #include "ingen/Interface.hpp" #include "ingen/Log.hpp" #include "ingen/World.hpp" #include "ingen/client/ClientStore.hpp" -#include "ingen/client/ObjectModel.hpp" #include "ingen/client/GraphModel.hpp" +#include "ingen/client/ObjectModel.hpp" #include "ingen/client/SigClientInterface.hpp" #include "ingen/runtime_paths.hpp" #include "lilv/lilv.h" @@ -74,6 +75,8 @@ App::App(Ingen::World* world) , _enable_signal(true) , _requested_plugins(false) { + _world->conf().load_default("ingen", "gui.ttl"); + WidgetFactory::get_widget_derived("connect_win", _connect_window); WidgetFactory::get_widget_derived("messages_win", _messages_window); WidgetFactory::get_widget_derived("graph_tree_win", _graph_tree_window); @@ -348,6 +351,15 @@ App::quit(Gtk::Window* dialog_parent) if (quit) Gtk::Main::quit(); + try { + const std::string path = _world->conf().save( + _world->uri_map(), "ingen", "gui.ttl", Configuration::GUI); + cout << (Raul::fmt("Saved GUI settings to %1%\n") % path); + } catch (const std::exception& e) { + cerr << (Raul::fmt("Error saving GUI settings (%1%)\n") + % e.what()); + } + return quit; } diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 6607ebbd..0401143c 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -554,8 +554,9 @@ GraphBox::event_save_as() } _app->world()->conf().set( - "graph-folder", + "graph-directory", _app->world()->forge().alloc(dialog.get_current_folder())); + break; } } diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index 760463ea..a547c279 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -197,6 +197,10 @@ LoadGraphWindow::ok_clicked() _graph.reset(); hide(); + + _app->world()->conf().set( + "graph-directory", + _app->world()->forge().alloc(get_current_folder())); } void |