summaryrefslogtreecommitdiff
path: root/gtk2_ardour/theme_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-10-26 21:01:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-10-26 21:01:14 +0000
commit51ab5ccabf432540ca935065f6c6f40a96f42dad (patch)
treea5f062738bcedc33cd55b176168d532e4cc6d189 /gtk2_ardour/theme_manager.cc
parentae3eb6e3f4f270a03ff297d1bbe7cd3f3a2159a9 (diff)
new ArdourButton class, to start to provide more control over how our buttons work and appear; use ArdourButtons for monitor, solo isolate and solo safe buttons, and in the processor box; don't save UI config file (canvas colors) to the user's home dir unless one or more parameters were modified by the user
git-svn-id: svn://localhost/ardour2/branches/3.0@10311 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/theme_manager.cc')
-rw-r--r--gtk2_ardour/theme_manager.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc
index 8c2f92768b..b800554fb9 100644
--- a/gtk2_ardour/theme_manager.cc
+++ b/gtk2_ardour/theme_manager.cc
@@ -163,6 +163,7 @@ ThemeManager::button_press_event (GdkEventButton* ev)
ccvar = (*iter)[columns.pVar];
ccvar->set(rgba);
+ ARDOUR_UI::config()->set_dirty ();
//ColorChanged (rgba);
ColorsChanged();//EMIT SIGNAL
@@ -227,6 +228,7 @@ ThemeManager::on_dark_theme_button_toggled()
} else {
ARDOUR_UI::config()->ui_rc_file.set("ardour3_ui_dark.rc");
}
+ ARDOUR_UI::config()->set_dirty ();
load_rc_file (ARDOUR_UI::config()->ui_rc_file.get(), true);
}
@@ -251,19 +253,20 @@ ThemeManager::setup_theme ()
int r, g, b, a;
color_list->clear();
- for (std::vector<UIConfigVariable<uint32_t> *>::iterator i = ARDOUR_UI::config()->canvas_colors.begin(); i != ARDOUR_UI::config()->canvas_colors.end(); i++) {
+ for (std::map<std::string,UIConfigVariable<uint32_t> *>::iterator i = ARDOUR_UI::config()->canvas_colors.begin(); i != ARDOUR_UI::config()->canvas_colors.end(); i++) {
TreeModel::Row row = *(color_list->append());
Gdk::Color col;
- uint32_t rgba = (*i)->get();
+ UIConfigVariable<uint32_t>* var = i->second;
+ uint32_t rgba = var->get();
UINT_TO_RGBA (rgba, &r, &g, &b, &a);
//cerr << (*i)->name() << " == " << hex << rgba << ": " << hex << r << " " << hex << g << " " << hex << b << endl;
col.set_rgb_p (r / 255.0, g / 255.0, b / 255.0);
- row[columns.name] = (*i)->name();
+ row[columns.name] = var->name();
row[columns.color] = "";
- row[columns.pVar] = *i;
+ row[columns.pVar] = var;
row[columns.rgba] = rgba;
row[columns.gdkcolor] = col;