add icon set selector to theme manager
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 10 Jun 2014 18:23:14 +0000 (14:23 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 10 Jun 2014 18:39:28 +0000 (14:39 -0400)
gtk2_ardour/theme_manager.cc
gtk2_ardour/theme_manager.h

index 3514d918bd051e360a07743eefe69de04ff9a754..8c9a039453cb930d0f71f375ecf186a986d868b9 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"
 
@@ -66,6 +68,7 @@ ThemeManager::ThemeManager()
        , 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"));
 
@@ -107,7 +110,23 @@ ThemeManager::ThemeManager()
        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);
@@ -117,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 ();
index 7c8d81fef9d9ec0a61687920b548b34669348c88..8b0a9bdd56e51e82b9af0c8c983b91fd9df13466 100644 (file)
@@ -83,6 +83,8 @@ class ThemeManager : public ArdourWindow
         Gtk::Label timeline_item_gradient_depth_label;
        Gtk::CheckButton all_dialogs;
        Gtk::CheckButton gradient_waveforms;
+       Gtk::Label icon_set_label;
+       Gtk::ComboBoxText icon_set_dropdown;
 
        bool button_press_event (GdkEventButton*);
 };