#include <gtkmm/stock.h>
#include <gtkmm2ext/gtk_ui.h>
-#include <gtkmm2ext/window_title.h>
#include <gtkmm/settings.h>
#include "pbd/file_utils.h"
#include "theme_manager.h"
#include "rgb_macros.h"
#include "ardour_ui.h"
+#include "global_signals.h"
#include "i18n.h"
sigc::signal<void,uint32_t> ColorChanged;
ThemeManager::ThemeManager()
- : ArdourDialog ("ThemeManager"),
- dark_button ("Dark theme"),
- light_button ("Light theme"),
- reset_button ("Restore Defaults")
+ : ArdourDialog (_("Theme Manager")),
+ dark_button (_("Dark Theme")),
+ light_button (_("Light Theme")),
+ reset_button (_("Restore Defaults"))
{
- Gtkmm2ext::WindowTitle title (Glib::get_application_name ());
- title += _("Theme Manager");
- set_title (title.get_string ());
+ set_title (_("Theme Manager"));
color_list = ListStore::create (columns);
color_display.set_model (color_list);
get_vbox()->pack_start (reset_button, PACK_SHRINK);
get_vbox()->pack_start (scroller);
- color_display.signal_button_press_event().connect (mem_fun (*this, &ThemeManager::button_press_event), false);
+ color_display.signal_button_press_event().connect (sigc::mem_fun (*this, &ThemeManager::button_press_event), false);
color_dialog.get_colorsel()->set_has_opacity_control (true);
color_dialog.get_colorsel()->set_has_palette (true);
- color_dialog.get_ok_button()->signal_clicked().connect (bind (mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_ACCEPT));
- color_dialog.get_cancel_button()->signal_clicked().connect (bind (mem_fun (color_dialog, &Gtk::Dialog::response), RESPONSE_CANCEL));
- dark_button.signal_toggled().connect (mem_fun (*this, &ThemeManager::on_dark_theme_button_toggled));
- light_button.signal_toggled().connect (mem_fun (*this, &ThemeManager::on_light_theme_button_toggled));
- reset_button.signal_clicked().connect (mem_fun (*this, &ThemeManager::reset_canvas_colors));
+ 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));
set_size_request (-1, 400);
setup_theme ();
spath += system_config_search_path();
if (!find_file_in_search_path (spath, filename, rc_file_path)) {
- warning << string_compose(
- _("Unable to find UI style file %1 in search path %2. Ardour will look strange"),
- filename, spath.to_string())
+ warning << string_compose (_("Unable to find UI style file %1 in search path %2. %3 will look strange"),
+ filename, spath.to_string(), PROGRAM_NAME)
<< endmsg;
return;
}
- cerr << "Loading ui configuration file " << rc_file_path.to_string() << endmsg;
+ info << "Loading ui configuration file " << rc_file_path.to_string() << endmsg;
Gtkmm2ext::UI::instance()->load_rcfile (rc_file_path.to_string(), themechange);
}