summaryrefslogtreecommitdiff
path: root/gtk2_ardour/luainstance.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-11-04 18:46:21 +0100
committerRobin Gareus <robin@gareus.org>2018-11-04 18:47:14 +0100
commit9971e718fed4a1126d97bad69f2608638d5a5464 (patch)
tree452f128de10a5be917c0adf967c82dde2a0a3acb /gtk2_ardour/luainstance.h
parentabb09570284a5fbd7358a42ee94b34134ee583ba (diff)
Save Lua UI scripts separately
Previously EditorAction and ExitorHook scripts were saved with instant.xml. The were saved with each session and in the config dir (for new sessions). This allowed inconsistent UI setups, especially when loading old sessions that had no or different scripts. Now Editor scripts (actions and hooks) are saved in a dedicated file, session-independently. This goes along with ui_config in general e.g. action-table-columns The scripts are not saved with ui_config file for two reasons: ui_config settings related to built-in ui_config_vars.h, and in the future there may be further indirection like "ui-rc-file". Note: previously loaded editor scripts are lost with this change.
Diffstat (limited to 'gtk2_ardour/luainstance.h')
-rw-r--r--gtk2_ardour/luainstance.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/luainstance.h b/gtk2_ardour/luainstance.h
index d48ab8330a..8f5fb0ba87 100644
--- a/gtk2_ardour/luainstance.h
+++ b/gtk2_ardour/luainstance.h
@@ -100,6 +100,9 @@ public:
XMLNode& get_action_state (void);
XMLNode& get_hook_state (void);
+ int load_state ();
+ int save_state ();
+
bool interactive_add (ARDOUR::LuaScriptInfo::ScriptType, int);
/* actions */
@@ -131,6 +134,7 @@ private:
static LuaInstance* _instance;
void init ();
+ void set_dirty ();
void session_going_away ();
LuaState lua;