summaryrefslogtreecommitdiff
path: root/gtk2_ardour/theme_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-05-08 14:48:28 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-05-08 14:48:28 -0400
commitbebe2af95ad9999fdca719450dc2c70cfb849076 (patch)
tree2bf6f4bae48b72c4607751bf370cbb1f2ce70a15 /gtk2_ardour/theme_manager.cc
parente1b0f1bd0b03c071d2b5987e4ab75ef059e32111 (diff)
parentcadfc2aee13e14af341dd68f33308a421820c855 (diff)
merge with master
Diffstat (limited to 'gtk2_ardour/theme_manager.cc')
-rw-r--r--gtk2_ardour/theme_manager.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc
index b1e549f29e..cd2645ddf6 100644
--- a/gtk2_ardour/theme_manager.cc
+++ b/gtk2_ardour/theme_manager.cc
@@ -31,6 +31,7 @@
#include "gtkmm2ext/cell_renderer_color_selector.h"
#include "pbd/file_utils.h"
+#include "pbd/compose.h"
#include "ardour/filesystem_paths.h"
@@ -62,7 +63,7 @@ ThemeManager::ThemeManager()
, waveform_gradient_depth_label (_("Waveforms color gradient depth"))
, timeline_item_gradient_depth (0, 2.0, 0.1)
, timeline_item_gradient_depth_label (_("Timeline item gradient depth"))
-
+ , all_dialogs (_("All floating windows are dialogs"))
{
set_title (_("Theme Manager"));
@@ -97,6 +98,9 @@ ThemeManager::ThemeManager()
vbox->set_homogeneous (false);
vbox->pack_start (theme_selection_hbox, PACK_SHRINK);
vbox->pack_start (reset_button, PACK_SHRINK);
+#ifndef __APPLE__
+ vbox->pack_start (all_dialogs, PACK_SHRINK);
+#endif
vbox->pack_start (flat_buttons, PACK_SHRINK);
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox());
@@ -112,6 +116,9 @@ ThemeManager::ThemeManager()
vbox->pack_start (*hbox, PACK_SHRINK);
vbox->pack_start (scroller);
+
+ vbox->show_all ();
+
add (*vbox);
waveform_gradient_depth.set_update_policy (Gtk::UPDATE_DELAYED);
@@ -130,6 +137,12 @@ ThemeManager::ThemeManager()
flat_buttons.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_flat_buttons_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));
+
+ Gtkmm2ext::UI::instance()->set_tip (all_dialogs,
+ string_compose (_("Mark all floating windows to be type \"Dialog\" rather than using \"Utility\" for some.\n"
+ "This may help with some window managers. This requires a restart of %1 to take effect"),
+ PROGRAM_NAME));
set_size_request (-1, 400);
setup_theme ();
@@ -267,6 +280,13 @@ ThemeManager::on_flat_buttons_toggled ()
}
void
+ThemeManager::on_all_dialogs_toggled ()
+{
+ ARDOUR_UI::config()->set_all_floating_windows_are_dialogs (all_dialogs.get_active());
+ ARDOUR_UI::config()->set_dirty ();
+}
+
+void
ThemeManager::on_waveform_gradient_depth_change ()
{
double v = waveform_gradient_depth.get_value();
@@ -397,6 +417,7 @@ ThemeManager::setup_theme ()
flat_buttons.set_active (ARDOUR_UI::config()->get_flat_buttons());
waveform_gradient_depth.set_value (ARDOUR_UI::config()->get_waveform_gradient_depth());
timeline_item_gradient_depth.set_value (ARDOUR_UI::config()->get_timeline_item_gradient_depth());
+ all_dialogs.set_active (ARDOUR_UI::config()->get_all_floating_windows_are_dialogs());
load_rc_file(rcfile, false);
}