summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2007-06-29 17:13:09 +0000
committerDoug McLain <doug@nostar.net>2007-06-29 17:13:09 +0000
commit4c000c13eecf4cb3d63be304fc0056ddaa35bb21 (patch)
tree257f65636491f137abb7d3282661080bc5dfce8b /libs
parenta67dcdc267bc133cab63e0e6355edbfa5dacb6ab (diff)
Moved canvas colors and theme file selection into new ui specific config system
git-svn-id: svn://localhost/ardour2/trunk@2086 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/canvas_vars.h82
-rw-r--r--libs/ardour/ardour/configuration.h10
-rw-r--r--libs/ardour/ardour/configuration_variable.h9
-rw-r--r--libs/ardour/ardour/configuration_vars.h4
-rw-r--r--libs/ardour/configuration.cc34
5 files changed, 3 insertions, 136 deletions
diff --git a/libs/ardour/ardour/canvas_vars.h b/libs/ardour/ardour/canvas_vars.h
deleted file mode 100644
index 2d9e7ae03c..0000000000
--- a/libs/ardour/ardour/canvas_vars.h
+++ /dev/null
@@ -1,82 +0,0 @@
-CANVAS_VARIABLE(canvasvar_WaveForm, "waveform")
-CANVAS_VARIABLE(canvasvar_WaveFormClip, "clipped waveform")
-CANVAS_VARIABLE(canvasvar_FrameBase, "region base")
-CANVAS_VARIABLE(canvasvar_SelectedFrameBase, "selected region base")
-CANVAS_VARIABLE(canvasvar_AudioTrackBase, "audio track base")
-CANVAS_VARIABLE(canvasvar_AudioBusBase, "audio bus base")
-CANVAS_VARIABLE(canvasvar_MidiTrackBase, "midi track base")
-CANVAS_VARIABLE(canvasvar_MidiBusBase, "midi bus base")
-CANVAS_VARIABLE(canvasvar_TimeStretchFill, "time-stretch-fill")
-CANVAS_VARIABLE(canvasvar_TimeStretchOutline, "time-stretch-outline")
-CANVAS_VARIABLE(canvasvar_AutomationLine, "automation line")
-CANVAS_VARIABLE(canvasvar_ProcessorAutomationLine, "processor automation line")
-CANVAS_VARIABLE(canvasvar_ControlPointFill, "control point fill")
-CANVAS_VARIABLE(canvasvar_ControlPointOutline, "control point outline")
-CANVAS_VARIABLE(canvasvar_EnteredControlPointOutline, "entered control point outline")
-CANVAS_VARIABLE(canvasvar_EnteredControlPointSelected, "entered control point selected")
-CANVAS_VARIABLE(canvasvar_EnteredControlPoint, "entered control point")
-CANVAS_VARIABLE(canvasvar_ControlPointSelected, "control point selected")
-CANVAS_VARIABLE(canvasvar_ControlPoint, "control point")
-CANVAS_VARIABLE(canvasvar_AutomationTrackFill, "automation track fill")
-CANVAS_VARIABLE(canvasvar_AutomationTrackOutline, "automation track outline")
-CANVAS_VARIABLE(canvasvar_CrossfadeEditorBase, "crossfade editor base")
-CANVAS_VARIABLE(canvasvar_CrossfadeEditorLine, "crossfade editor line")
-CANVAS_VARIABLE(canvasvar_SelectedCrossfadeEditorLine, "selected crossfade editor line")
-CANVAS_VARIABLE(canvasvar_CrossfadeEditorLineShading, "crossfade editor line shading")
-CANVAS_VARIABLE(canvasvar_CrossfadeEditorPointFill, "crossfade editor point fill")
-CANVAS_VARIABLE(canvasvar_CrossfadeEditorPointOutline, "crossfade editor point outline")
-CANVAS_VARIABLE(canvasvar_CrossfadeEditorWave, "crossfade editor wave")
-CANVAS_VARIABLE(canvasvar_SelectedCrossfadeEditorWave, "selected crossfade editor wave")
-CANVAS_VARIABLE(canvasvar_CrossfadeLine, "crossfade line")
-CANVAS_VARIABLE(canvasvar_ActiveCrossfade, "active crossfade")
-CANVAS_VARIABLE(canvasvar_InactiveCrossfade, "inactive crossfade")
-CANVAS_VARIABLE(canvasvar_LocationMarker, "location marker")
-CANVAS_VARIABLE(canvasvar_LocationRange, "location range")
-CANVAS_VARIABLE(canvasvar_LocationCDMarker, "location cd marker")
-CANVAS_VARIABLE(canvasvar_LocationLoop, "location loop")
-CANVAS_VARIABLE(canvasvar_LocationPunch, "location punch")
-CANVAS_VARIABLE(canvasvar_VerboseCanvasCursor, "verbose canvas cursor")
-CANVAS_VARIABLE(canvasvar_MarkerLabel, "marker label")
-CANVAS_VARIABLE(canvasvar_MarkerBarSeparator, "marker bar separator")
-CANVAS_VARIABLE(canvasvar_TempoBar, "tempo bar")
-CANVAS_VARIABLE(canvasvar_MeterBar, "meterbar")
-CANVAS_VARIABLE(canvasvar_MarkerBar, "markerbar")
-CANVAS_VARIABLE(canvasvar_RangeMarkerBar, "rangemarker bar")
-CANVAS_VARIABLE(canvasvar_TransportMarkerBar, "TransportMarkerBar")
-CANVAS_VARIABLE(canvasvar_RangeDragBarRect, "RangeDragBarRect")
-CANVAS_VARIABLE(canvasvar_RangeDragRect, "RangeDragRect")
-CANVAS_VARIABLE(canvasvar_TransportDragRect, "TransportDragRect")
-CANVAS_VARIABLE(canvasvar_MarkerDragLine, "MarkerDragLine")
-CANVAS_VARIABLE(canvasvar_TransportLoopRect, "TransportLoopRect")
-CANVAS_VARIABLE(canvasvar_TransportPunchRect, "TransportPunchRect")
-CANVAS_VARIABLE(canvasvar_PunchLine, "PunchLine")
-CANVAS_VARIABLE(canvasvar_ZoomRect, "ZoomRect")
-CANVAS_VARIABLE(canvasvar_RubberBandRect, "RubberBandRect")
-CANVAS_VARIABLE(canvasvar_EnteredGainLine, "EnteredGainLine")
-CANVAS_VARIABLE(canvasvar_EnteredAutomationLine, "EnteredAutomationLine")
-CANVAS_VARIABLE(canvasvar_EnteredMarker, "EnteredMarker")
-CANVAS_VARIABLE(canvasvar_MeterMarker, "MeterMarker")
-CANVAS_VARIABLE(canvasvar_TempoMarker, "TempoMarker")
-CANVAS_VARIABLE(canvasvar_MeasureLineBeat, "MeasureLineBeat")
-CANVAS_VARIABLE(canvasvar_MeasureLineBar, "MeasureLineBar")
-CANVAS_VARIABLE(canvasvar_GhostTrackBase, "GhostTrackBase")
-CANVAS_VARIABLE(canvasvar_GhostTrackWave, "GhostTrackWave")
-CANVAS_VARIABLE(canvasvar_GhostTrackWaveClip, "GhostTrackWaveClip")
-CANVAS_VARIABLE(canvasvar_GhostTrackZeroLine, "GhostTrackZeroLine")
-CANVAS_VARIABLE(canvasvar_ImageTrack, "ImageTrack")
-CANVAS_VARIABLE(canvasvar_MarkerTrack, "MarkerTrack")
-CANVAS_VARIABLE(canvasvar_ZeroLine, "ZeroLine")
-CANVAS_VARIABLE(canvasvar_GainLine, "GainLine")
-CANVAS_VARIABLE(canvasvar_GainLineInactive, "GainLineInactive")
-CANVAS_VARIABLE(canvasvar_RecordingRect, "RecordingRect")
-CANVAS_VARIABLE(canvasvar_SelectionRect, "SelectionRect")
-CANVAS_VARIABLE(canvasvar_Selection, "Selection")
-CANVAS_VARIABLE(canvasvar_VestigialFrame, "VestigialFrame")
-CANVAS_VARIABLE(canvasvar_TimeAxisFrame, "TimeAxisFrame")
-CANVAS_VARIABLE(canvasvar_NameHighlightFill, "NameHighlightFill")
-CANVAS_VARIABLE(canvasvar_NameHighlightOutline, "NameHighlightOutline")
-CANVAS_VARIABLE(canvasvar_FrameHandle, "FrameHandle")
-CANVAS_VARIABLE(canvasvar_TrimHandleLocked, "TrimHandleLocked")
-CANVAS_VARIABLE(canvasvar_TrimHandle, "TrimHandle")
-CANVAS_VARIABLE(canvasvar_EditCursor, "EditCursor")
-CANVAS_VARIABLE(canvasvar_PlayHead, "PlayHead")
diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h
index 51c0a31aca..70b7e166c1 100644
--- a/libs/ardour/ardour/configuration.h
+++ b/libs/ardour/ardour/configuration.h
@@ -54,8 +54,6 @@ class Configuration : public PBD::Stateful
std::map<std::string,MidiPortDescriptor *> midi_ports;
- std::vector<ConfigVariable<uint32_t> *> canvas_colors;
-
void map_parameters (sigc::slot<void,const char*> theSlot);
int load_state ();
@@ -70,7 +68,6 @@ class Configuration : public PBD::Stateful
XMLNode& get_state (void);
XMLNode& get_variables (sigc::slot<bool,ConfigVariableBase::Owner>, std::string which_node = "Config");
void set_variables (const XMLNode&, ConfigVariableBase::Owner owner);
- void pack_canvasvars ();
void set_current_owner (ConfigVariableBase::Owner);
@@ -104,13 +101,6 @@ class Configuration : public PBD::Stateful
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
- public: /* ugh */
-#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,name) ConfigVariable<uint32_t> var; // <-- is this really so bad?
-#include "ardour/canvas_vars.h"
-#undef CANVAS_VARIABLE
-
- private:
ConfigVariableBase::Owner current_owner;
XMLNode* _control_protocol_state;
diff --git a/libs/ardour/ardour/configuration_variable.h b/libs/ardour/ardour/configuration_variable.h
index ccf15df65a..a61283ecd0 100644
--- a/libs/ardour/ardour/configuration_variable.h
+++ b/libs/ardour/ardour/configuration_variable.h
@@ -83,11 +83,6 @@ class ConfigVariable : public ConfigVariableBase
void add_to_node (XMLNode& node) {
std::stringstream ss;
- if (node.name() == "Canvas") {
- ss << std::hex;
- ss.fill('0');
- ss.width(8);
- }
ss << value;
show_stored_value (ss.str());
XMLNode* child = new XMLNode ("Option");
@@ -98,7 +93,7 @@ class ConfigVariable : public ConfigVariableBase
bool set_from_node (const XMLNode& node, Owner owner) {
- if (node.name() == "Config" || node.name() == "Canvas") {
+ if (node.name() == "Config") {
/* ardour.rc */
@@ -118,8 +113,6 @@ class ConfigVariable : public ConfigVariableBase
if (prop->value() == _name) {
if ((prop = child->property ("value")) != 0) {
std::stringstream ss;
- if (node.name() == "Canvas")
- ss << std::hex;
ss << prop->value();
ss >> value;
_owner = (ConfigVariableBase::Owner)(_owner |owner);
diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h
index b78421b48f..3051a0b44b 100644
--- a/libs/ardour/ardour/configuration_vars.h
+++ b/libs/ardour/ardour/configuration_vars.h
@@ -143,10 +143,6 @@ CONFIG_VARIABLE (bool, periodic_safety_backups, "periodic-safety-backups", true)
CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-backup-interval", 120)
CONFIG_VARIABLE (string, possible_audio_file_regexp, "possible-audio-file-regexp", "\\.(wav|aiff|caf|w64|L|R)$")
-/* Theme */
-
-CONFIG_VARIABLE (string, ui_rc_file, "ui-rc-file", "ardour2_ui_dark.rc")
-
/* denormal management */
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
diff --git a/libs/ardour/configuration.cc b/libs/ardour/configuration.cc
index 903f853ef5..5faab7c0ab 100644
--- a/libs/ardour/configuration.cc
+++ b/libs/ardour/configuration.cc
@@ -55,10 +55,6 @@ Configuration::Configuration ()
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
-#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,name) var (name), // <-- is this really so bad?
-#include "ardour/canvas_vars.h"
-#undef CANVAS_VARIABLE
current_owner (ConfigVariableBase::Default)
{
@@ -137,7 +133,6 @@ Configuration::load_state ()
if (!found)
error << "Ardour: could not find configuration file (ardour.rc), canvas will look broken." << endmsg;
- pack_canvasvars();
return 0;
}
@@ -206,7 +201,6 @@ Configuration::get_state ()
}
root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Config"));
- root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Canvas"));
if (_extra_xml) {
root->add_child_copy (*_extra_xml);
@@ -235,11 +229,6 @@ Configuration::get_variables (sigc::slot<bool,ConfigVariableBase::Owner> predica
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
-#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,Name) if (node->name() == "Canvas") { if (predicate (ConfigVariableBase::Config)) { var.add_to_node (*node); }}
-#include "ardour/canvas_vars.h"
-#undef CANVAS_VARIABLE
-
return *node;
}
@@ -271,7 +260,7 @@ Configuration::set_state (const XMLNode& root)
warning << _("ill-formed MIDI port specification in ardour rcfile (ignored)") << endmsg;
}
- } else if (node->name() == "Config" || node->name() == "Canvas" ) {
+ } else if (node->name() == "Config") {
set_variables (*node, ConfigVariableBase::Config);
@@ -304,26 +293,7 @@ Configuration::set_variables (const XMLNode& node, ConfigVariableBase::Owner own
#include "ardour/configuration_vars.h"
#undef CONFIG_VARIABLE
-#undef CONFIG_VARIABLE_SPECIAL
-
-#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,name) \
- if (var.set_from_node (node, owner)) { \
- ParameterChanged (name); \
- }
-#include "ardour/canvas_vars.h"
-#undef CANVAS_VARIABLE
-
-}
-
-void
-Configuration::pack_canvasvars ()
-{
-#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,name) canvas_colors.push_back(&var);
-#include "ardour/canvas_vars.h"
-#undef CANVAS_VARIABLE
- cerr << "Configuration::pack_canvasvars () called, canvas_colors.size() = " << canvas_colors.size() << endl;
+#undef CONFIG_VARIABLE_SPECIAL
}