diff options
-rw-r--r-- | gtk2_ardour/theme_manager.cc | 49 | ||||
-rw-r--r-- | gtk2_ardour/theme_manager.h | 5 | ||||
-rw-r--r-- | gtk2_ardour/utils.cc | 1 |
3 files changed, 7 insertions, 48 deletions
diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc index c99e8e886b..83085236c9 100644 --- a/gtk2_ardour/theme_manager.cc +++ b/gtk2_ardour/theme_manager.cc @@ -58,9 +58,7 @@ using namespace ARDOUR; using namespace ARDOUR_UI_UTILS; ThemeManager::ThemeManager() - : dark_button (_("Dark Theme")) - , light_button (_("Light Theme")) - , reset_button (_("Restore Defaults")) + : reset_button (_("Restore Defaults")) , flat_buttons (_("Draw \"flat\" buttons")) , blink_rec_button (_("Blink Rec-Arm buttons")) , region_color_button (_("Color regions using their track's color")) @@ -104,12 +102,6 @@ ThemeManager::ThemeManager() /* various buttons */ - RadioButton::Group group = dark_button.get_group(); - light_button.set_group(group); - theme_selection_hbox.set_homogeneous(false); - theme_selection_hbox.pack_start (dark_button); - theme_selection_hbox.pack_start (light_button); - set_homogeneous (false); std::map<string,string> color_themes; @@ -128,7 +120,11 @@ ThemeManager::ThemeManager() row[color_theme_columns.name] = c->first; row[color_theme_columns.path] = c->second; - if (UIConfiguration::instance().get_color_file() == c->first) { + /* match second (path; really basename) since that is + what we store/restore. + */ + + if (UIConfiguration::instance().get_color_file() == c->second) { selected_iter = row; } } @@ -217,8 +213,6 @@ ThemeManager::ThemeManager() color_dialog.get_ok_button()->signal_clicked().connect (sigc::bind (sigc::mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_ACCEPT)); color_dialog.get_cancel_button()->signal_clicked().connect (sigc::bind (sigc::mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_CANCEL)); - dark_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_dark_theme_button_toggled)); - light_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_light_theme_button_toggled)); reset_button.signal_clicked().connect (sigc::mem_fun (*this, &ThemeManager::reset_canvas_colors)); flat_buttons.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_flat_buttons_toggled)); blink_rec_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_blink_rec_arm_toggled)); @@ -401,39 +395,8 @@ ThemeManager::on_color_theme_changed () } void -ThemeManager::on_dark_theme_button_toggled() -{ - if (!dark_button.get_active()) return; - - UIConfiguration* uic (&UIConfiguration::instance()); - - uic->set_color_file("dark"); -} - -void -ThemeManager::on_light_theme_button_toggled() -{ - if (!light_button.get_active()) return; - - UIConfiguration* uic (&UIConfiguration::instance()); - - uic->set_color_file("light"); -} - -void ThemeManager::set_ui_to_state() { - /* there is no way these values can change individually - * by themselves (w/o user-interaction) - * hence a common combined update function suffices - */ - - if (UIConfiguration::instance().get_color_file() == "light") { - light_button.set_active(true); - } else { - dark_button.set_active(true); - } - /* there is no need to block signal handlers, here, * all elements check if the value has changed and ignore NOOPs */ diff --git a/gtk2_ardour/theme_manager.h b/gtk2_ardour/theme_manager.h index acfa2f9219..467db41d78 100644 --- a/gtk2_ardour/theme_manager.h +++ b/gtk2_ardour/theme_manager.h @@ -50,8 +50,6 @@ class ThemeManager : public Gtk::VBox int save (std::string path); void reset_canvas_colors(); - void on_dark_theme_button_toggled (); - void on_light_theme_button_toggled (); void on_flat_buttons_toggled (); void on_blink_rec_arm_toggled (); void on_region_color_toggled (); @@ -83,9 +81,6 @@ class ThemeManager : public Gtk::VBox Gtk::ColorSelectionDialog color_dialog; sigc::connection color_dialog_connection; - Gtk::HBox theme_selection_hbox; - Gtk::RadioButton dark_button; - Gtk::RadioButton light_button; Gtk::Button reset_button; Gtk::CheckButton flat_buttons; Gtk::CheckButton blink_rec_button; diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index e8dc568828..c1de612c9f 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -38,6 +38,7 @@ #include "pbd/basename.h" #include "pbd/file_utils.h" +#include "pbd/stacktrace.h" #include <gtkmm2ext/utils.h> |