<menuitem action='toggle-locations'/>
<menuitem action='toggle-key-editor'/>
<menuitem action='toggle-bundle-manager'/>
- <menuitem action='toggle-theme-manager'/>
<menuitem action='toggle-big-clock'/>
#if 0
<menuitem action='toggle-speaker-config'/>
, editor_meter_peak_display()
, speaker_config_window (X_("speaker-config"), _("Speaker Configuration"))
- , theme_manager (X_("theme-manager"), _("Theme Manager"))
, key_editor (X_("key-editor"), _("Key Bindings"))
, rc_option_editor (X_("rc-options-editor"), _("Preferences"))
, add_route_dialog (X_("add-routes"), _("Add Tracks/Busses"))
const XMLNode* ui_xml = Config->extra_xml (X_("UI"));
if (ui_xml) {
- theme_manager.set_state (*ui_xml);
key_editor.set_state (*ui_xml);
rc_option_editor.set_state (*ui_xml);
session_option_editor.set_state (*ui_xml);
midi_port_matrix.set_state (*ui_xml);
}
- WM::Manager::instance().register_window (&theme_manager);
WM::Manager::instance().register_window (&key_editor);
WM::Manager::instance().register_window (&rc_option_editor);
WM::Manager::instance().register_window (&session_option_editor);
WM::Manager::instance().register_window (&audio_port_matrix);
WM::Manager::instance().register_window (&midi_port_matrix);
- /* We need to instantiate the theme manager because it loads our
- theme files. This should really change so that its window
- and its functionality are separate
- */
-
- (void) theme_manager.get (true);
+ /* Trigger setting up the color scheme and loading the GTK RC file */
+
+ ARDOUR_UI::config()->load_rc_file (false);
_process_thread = new ProcessThread ();
_process_thread->init ();
#include "route_params_ui.h"
#include "session_option_editor.h"
#include "speaker_dialog.h"
-#include "theme_manager.h"
-
class VideoTimeLine;
class ArdourKeyboard;
/* Dialogs that can be created via new<T> */
WM::Proxy<SpeakerDialog> speaker_config_window;
- WM::Proxy<ThemeManager> theme_manager;
WM::Proxy<KeyEditor> key_editor;
WM::Proxy<RCOptionEditor> rc_option_editor;
WM::Proxy<AddRouteDialog> add_route_dialog;
editor->hide ();
mixer->hide ();
meterbridge->hide ();
- theme_manager->hide ();
audio_port_matrix->hide();
midi_port_matrix->hide();
route_params->hide();
;@-group|Editor/crop|c|some text
@mmode|MouseMode/set-mouse-mode-cut|c|cut mode
@edit|Editor/editor-copy|<@PRIMARY@>c|copy
-@wvis|Window/toggle-theme-manager|<@WINDOW@>c|toggle color manager
@rop|Region/set-region-sync-position|v|set region sync point
@edit|Editor/editor-paste|<@PRIMARY@>v|paste
@-group|Editor/brush-at-mouse|<@PRIMARY@>b|some text
o->set_state_from_config ();
}
+/** Add a new page
+ * @param pn Page name (will be created if it doesn't already exist)
+ * @param w widget that fills the page
+ */
+void
+OptionEditor::add_page (std::string const & pn, Gtk::Widget& w)
+{
+ if (_pages.find (pn) == _pages.end()) {
+ _pages[pn] = new OptionEditorPage (_notebook, pn);
+ }
+
+ OptionEditorPage* p = _pages[pn];
+ p->box.pack_start (w, true, true);
+}
+
void
OptionEditor::set_current_page (string const & p)
{
~OptionEditor ();
void add_option (std::string const &, OptionEditorComponent *);
-
+ void add_page (std::string const &, Gtk::Widget& page_widget);
+
void set_current_page (std::string const &);
protected:
#include "midi_port_dialog.h"
#include "sfdb_ui.h"
#include "keyboard.h"
+#include "theme_manager.h"
#include "i18n.h"
using namespace std;
sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_style_led)
));
+ /* and now the theme manager */
+
+ ThemeManager* tm = manage (new ThemeManager);
+ add_page (_("Theme"), *tm);
}
void
}
ThemeManager::ThemeManager()
- : ArdourWindow (_("Theme Manager"))
- , dark_button (_("Dark Theme"))
+ : dark_button (_("Dark Theme"))
, light_button (_("Light Theme"))
, reset_button (_("Restore Defaults"))
, flat_buttons (_("Draw \"flat\" buttons"))
, palette_group (0)
, palette_window (0)
{
- set_title (_("Theme Manager"));
-
/* Now the alias list */
alias_list = TreeStore::create (alias_columns);
theme_selection_hbox.pack_start (dark_button);
theme_selection_hbox.pack_start (light_button);
- Gtk::VBox* vbox = Gtk::manage (new Gtk::VBox ());
- vbox->set_homogeneous (false);
- vbox->pack_start (theme_selection_hbox, PACK_SHRINK);
- vbox->pack_start (reset_button, PACK_SHRINK);
+ set_homogeneous (false);
+ pack_start (theme_selection_hbox, PACK_SHRINK);
+ pack_start (reset_button, PACK_SHRINK);
#ifndef __APPLE__
- vbox->pack_start (all_dialogs, PACK_SHRINK);
+ pack_start (all_dialogs, PACK_SHRINK);
#endif
- vbox->pack_start (flat_buttons, PACK_SHRINK);
- vbox->pack_start (blink_rec_button, PACK_SHRINK);
- vbox->pack_start (region_color_button, PACK_SHRINK);
- vbox->pack_start (show_clipping_button, PACK_SHRINK);
+ pack_start (flat_buttons, PACK_SHRINK);
+ pack_start (blink_rec_button, PACK_SHRINK);
+ pack_start (region_color_button, PACK_SHRINK);
+ pack_start (show_clipping_button, PACK_SHRINK);
Gtk::HBox* 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);
+ pack_start (*hbox, PACK_SHRINK);
}
hbox->set_spacing (6);
hbox->pack_start (waveform_gradient_depth, true, true);
hbox->pack_start (waveform_gradient_depth_label, false, false);
- vbox->pack_start (*hbox, PACK_SHRINK);
+ pack_start (*hbox, PACK_SHRINK);
hbox = Gtk::manage (new Gtk::HBox());
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);
+ pack_start (*hbox, PACK_SHRINK);
palette_group = initialize_palette_canvas (*palette_viewport.canvas());
palette_viewport.signal_size_allocate().connect (sigc::bind (sigc::mem_fun (*this, &ThemeManager::palette_canvas_allocated), palette_group, palette_viewport.canvas(),
notebook.append_page (palette_scroller, _("Palette"));
notebook.append_page (modifier_scroller, _("Modifiers"));
- vbox->pack_start (notebook);
-
- vbox->show_all ();
+ pack_start (notebook);
- add (*vbox);
+ show_all ();
waveform_gradient_depth.set_update_policy (Gtk::UPDATE_DELAYED);
timeline_item_gradient_depth.set_update_policy (Gtk::UPDATE_DELAYED);
setup_aliases ();
setup_modifiers ();
- /* Trigger setting up the color scheme and loading the GTK RC file */
-
- ARDOUR_UI::config()->load_rc_file (false);
-
ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ThemeManager::colors_changed));
}
#include "canvas/types.h"
#include "canvas/canvas.h"
-#include "ardour_window.h"
-
#include "ui_config.h"
namespace ArdourCanvas {
class ArdourDialog;
-class ThemeManager : public ArdourWindow
+class ThemeManager : public Gtk::VBox
{
public:
ThemeManager();