summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/GraphBox.cpp9
-rw-r--r--src/gui/LoadGraphWindow.cpp7
-rw-r--r--src/gui/Style.hpp6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp
index a2f76100..6607ebbd 100644
--- a/src/gui/GraphBox.cpp
+++ b/src/gui/GraphBox.cpp
@@ -475,10 +475,11 @@ GraphBox::event_save_as()
// Set current folder to most sensible default
const Raul::Atom& document = _graph->get_property(uris.ingen_document);
+ const Raul::Atom& dir = _app->world()->conf().option("graph-directory");
if (document.type() == uris.forge.URI)
dialog.set_uri(document.get_uri());
- else if (_app->style()->graph_folder().length() > 0)
- dialog.set_current_folder(_app->style()->graph_folder());
+ else if (dir.is_valid())
+ dialog.set_current_folder(dir.get_string());
if (dialog.run() != Gtk::RESPONSE_OK)
break;
@@ -552,7 +553,9 @@ GraphBox::event_save_as()
STATUS_CONTEXT_GRAPH);
}
- _app->style()->set_graph_folder(dialog.get_current_folder());
+ _app->world()->conf().set(
+ "graph-folder",
+ _app->world()->forge().alloc(dialog.get_current_folder()));
break;
}
}
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp
index a7daf90f..760463ea 100644
--- a/src/gui/LoadGraphWindow.cpp
+++ b/src/gui/LoadGraphWindow.cpp
@@ -21,6 +21,7 @@
#include <boost/optional.hpp>
#include <glibmm/miscutils.h>
+#include "ingen/Configuration.hpp"
#include "ingen/Interface.hpp"
#include "ingen/client/BlockModel.hpp"
#include "ingen/client/ClientStore.hpp"
@@ -125,8 +126,10 @@ LoadGraphWindow::set_graph(SharedPtr<const GraphModel> graph)
void
LoadGraphWindow::on_show()
{
- if (_app->style()->graph_folder().length() > 0)
- set_current_folder(_app->style()->graph_folder());
+ const Raul::Atom& dir = _app->world()->conf().option("graph-directory");
+ if (dir.is_valid()) {
+ set_current_folder(dir.get_string());
+ }
Gtk::FileChooserDialog::on_show();
}
diff --git a/src/gui/Style.hpp b/src/gui/Style.hpp
index e1bfaeb1..eb6947f8 100644
--- a/src/gui/Style.hpp
+++ b/src/gui/Style.hpp
@@ -42,17 +42,11 @@ public:
void apply_settings();
- const std::string& graph_folder() { return _graph_folder; }
- void set_graph_folder(const std::string& f) { _graph_folder = f; }
-
uint32_t get_port_color(const Client::PortModel* p);
private:
App& _app;
- /** Most recent graph folder shown in open dialog */
- std::string _graph_folder;
-
uint32_t _audio_port_color;
uint32_t _control_port_color;
uint32_t _cv_port_color;