Actually pass Soundcloud downloadable flag to export handler
[ardour.git] / gtk2_ardour / theme_manager.cc
index ff37c315cf60a490be2dbb5df86b1e7bc84f550e..454a5da67ca39330274e299fc7bdb2bd74718df6 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "gtkmm2ext/gtk_ui.h"
 #include "gtkmm2ext/cell_renderer_color_selector.h"
+#include "gtkmm2ext/utils.h"
 
 #include "pbd/file_utils.h"
 #include "pbd/compose.h"
@@ -42,6 +43,7 @@
 #include "rgb_macros.h"
 #include "ardour_ui.h"
 #include "global_signals.h"
+#include "utils.h"
 
 #include "i18n.h"
 
@@ -60,11 +62,13 @@ ThemeManager::ThemeManager()
        , reset_button (_("Restore Defaults"))
        , flat_buttons (_("Draw \"flat\" buttons"))
        , region_color_button (_("Color regions using their track's color"))
+       , show_clipping_button (_("Show waveform clipping"))
        , waveform_gradient_depth (0, 1.0, 0.05)
        , waveform_gradient_depth_label (_("Waveforms color gradient depth"))
        , timeline_item_gradient_depth (0, 1.0, 0.05)
        , timeline_item_gradient_depth_label (_("Timeline item gradient depth"))
        , all_dialogs (_("All floating windows are dialogs"))
+       , icon_set_label (_("Icon Set"))
 {
        set_title (_("Theme Manager"));
 
@@ -104,8 +108,25 @@ ThemeManager::ThemeManager()
 #endif
        vbox->pack_start (flat_buttons, PACK_SHRINK);
        vbox->pack_start (region_color_button, PACK_SHRINK);
+       vbox->pack_start (show_clipping_button, PACK_SHRINK);
 
-       Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox());
+       Gtk::HBox* hbox;
+
+       vector<string> icon_sets = ::get_icon_sets ();
+
+       if (icon_sets.size() > 1) {
+               Gtkmm2ext::set_popdown_strings (icon_set_dropdown, icon_sets);
+               icon_set_dropdown.set_active_text (ARDOUR_UI::config()->get_icon_set());
+
+               hbox = Gtk::manage (new Gtk::HBox());
+               hbox->set_spacing (6);
+               hbox->pack_start (icon_set_label, false, false);
+               hbox->pack_start (icon_set_dropdown, true, true);
+               vbox->pack_start (*hbox, PACK_SHRINK);
+       }
+
+       
+       hbox = Gtk::manage (new Gtk::HBox());
        hbox->set_spacing (6);
        hbox->pack_start (waveform_gradient_depth, true, true);
        hbox->pack_start (waveform_gradient_depth_label, false, false);
@@ -115,8 +136,8 @@ ThemeManager::ThemeManager()
        hbox->set_spacing (6);
        hbox->pack_start (timeline_item_gradient_depth, true, true);
        hbox->pack_start (timeline_item_gradient_depth_label, false, false);
-
        vbox->pack_start (*hbox, PACK_SHRINK);
+
        vbox->pack_start (scroller);
 
        vbox->show_all ();
@@ -133,6 +154,7 @@ ThemeManager::ThemeManager()
 
        flat_buttons.set_active (ARDOUR_UI::config()->get_flat_buttons());
        region_color_button.set_active (ARDOUR_UI::config()->get_color_regions_using_track_color());
+       show_clipping_button.set_active (ARDOUR_UI::config()->get_show_waveform_clipping());
 
        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));
@@ -141,9 +163,11 @@ ThemeManager::ThemeManager()
        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));
        region_color_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_region_color_toggled));
+       show_clipping_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_show_clip_toggled));
        waveform_gradient_depth.signal_value_changed().connect (sigc::mem_fun (*this, &ThemeManager::on_waveform_gradient_depth_change));
        timeline_item_gradient_depth.signal_value_changed().connect (sigc::mem_fun (*this, &ThemeManager::on_timeline_item_gradient_depth_change));
        all_dialogs.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_all_dialogs_toggled));
+       icon_set_dropdown.signal_changed().connect (sigc::mem_fun (*this, &ThemeManager::on_icon_set_changed));
 
        Gtkmm2ext::UI::instance()->set_tip (all_dialogs, 
                                            string_compose (_("Mark all floating windows to be type \"Dialog\" rather than using \"Utility\" for some.\n"
@@ -292,6 +316,13 @@ ThemeManager::on_region_color_toggled ()
        ARDOUR_UI::config()->set_dirty ();
 }
 
+void
+ThemeManager::on_show_clip_toggled ()
+{
+       ARDOUR_UI::config()->set_show_waveform_clipping (show_clipping_button.get_active());
+       ARDOUR_UI::config()->set_dirty ();
+}
+
 void
 ThemeManager::on_all_dialogs_toggled ()
 {
@@ -318,6 +349,13 @@ ThemeManager::on_timeline_item_gradient_depth_change ()
        ARDOUR_UI::config()->set_dirty ();
 }
 
+void
+ThemeManager::on_icon_set_changed ()
+{
+       string new_set = icon_set_dropdown.get_active_text();
+       ARDOUR_UI::config()->set_icon_set (new_set);
+}
+
 void
 ThemeManager::on_dark_theme_button_toggled()
 {