update drobilla's fascistic dir-locals.el to force emacs users into whitespace submis...
[ardour.git] / gtk2_ardour / theme_manager.cc
index 4bc383e8a383864d44a5eed6e395a4e8c450490f..8c2f92768b9a4f5076f332d0628ea2de0e58bbc7 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <gtkmm/stock.h>
 #include <gtkmm2ext/gtk_ui.h>
-#include <gtkmm2ext/window_title.h>
 #include <gtkmm/settings.h>
 
 #include "pbd/file_utils.h"
@@ -36,6 +35,7 @@
 #include "theme_manager.h"
 #include "rgb_macros.h"
 #include "ardour_ui.h"
+#include "global_signals.h"
 
 #include "i18n.h"
 
@@ -49,14 +49,12 @@ sigc::signal<void> ColorsChanged;
 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);
@@ -86,16 +84,16 @@ ThemeManager::ThemeManager()
        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 ();
@@ -196,14 +194,13 @@ load_rc_file (const string& filename, bool themechange)
        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);
 }