summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2007-05-25 20:29:12 +0000
committerDoug McLain <doug@nostar.net>2007-05-25 20:29:12 +0000
commite1f57ba8f086aa3629f09ca9363a9e44b01796f4 (patch)
tree8a1e39f4e8134d0c80102b69d274fe5ce7701421 /libs/gtkmm2ext
parent0931c3b612978764621d27f3c746fc09ab248c17 (diff)
New theme manager, with option to select between dark and light theme. Cleanups to ardours handling of the ui rc file during startup, and changed the monitoring options to be global instead of session specific. More details about the theme stuff comign to ardour-dev
git-svn-id: svn://localhost/ardour2/trunk@1917 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc75
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtk_ui.h2
2 files changed, 4 insertions, 73 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 903f56ba6f..ee9d39c918 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -61,7 +61,7 @@ BaseUI::RequestType Gtkmm2ext::AddTimeout = BaseUI::new_request_type();
#include <pbd/abstract_ui.cc> /* instantiate the template */
-UI::UI (string namestr, int *argc, char ***argv, string rcfile)
+UI::UI (string namestr, int *argc, char ***argv)
: AbstractUI<UIRequest> (namestr, true)
{
theMain = new Main (argc, argv);
@@ -99,7 +99,7 @@ UI::UI (string namestr, int *argc, char ***argv, string rcfile)
register_thread (pthread_self(), X_("GUI"));
- load_rcfile (rcfile);
+ //load_rcfile (rcfile);
}
UI::~UI ()
@@ -129,76 +129,7 @@ UI::load_rcfile (string path)
}
RC rc (path.c_str());
-
- /* have to pack widgets into a toplevel window so that styles will stick */
-
- Window temp_window (WINDOW_TOPLEVEL);
- HBox box;
- Label a_widget1;
- Label a_widget2;
- Label a_widget3;
- Label a_widget4;
- RefPtr<Gtk::Style> style;
- RefPtr<TextBuffer> buffer (errors->text().get_buffer());
-
- box.pack_start (a_widget1);
- box.pack_start (a_widget2);
- box.pack_start (a_widget3);
- box.pack_start (a_widget4);
-
- error_ptag = buffer->create_tag();
- error_mtag = buffer->create_tag();
- fatal_ptag = buffer->create_tag();
- fatal_mtag = buffer->create_tag();
- warning_ptag = buffer->create_tag();
- warning_mtag = buffer->create_tag();
- info_ptag = buffer->create_tag();
- info_mtag = buffer->create_tag();
-
- a_widget1.set_name ("FatalMessage");
- a_widget1.ensure_style ();
- style = a_widget1.get_style();
-
- fatal_ptag->property_font_desc().set_value(style->get_font());
- fatal_ptag->property_foreground_gdk().set_value(style->get_fg(STATE_ACTIVE));
- fatal_ptag->property_background_gdk().set_value(style->get_bg(STATE_ACTIVE));
- fatal_mtag->property_font_desc().set_value(style->get_font());
- fatal_mtag->property_foreground_gdk().set_value(style->get_fg(STATE_NORMAL));
- fatal_mtag->property_background_gdk().set_value(style->get_bg(STATE_NORMAL));
-
- a_widget2.set_name ("ErrorMessage");
- a_widget2.ensure_style ();
- style = a_widget2.get_style();
-
- error_ptag->property_font_desc().set_value(style->get_font());
- error_ptag->property_foreground_gdk().set_value(style->get_fg(STATE_ACTIVE));
- error_ptag->property_background_gdk().set_value(style->get_bg(STATE_ACTIVE));
- error_mtag->property_font_desc().set_value(style->get_font());
- error_mtag->property_foreground_gdk().set_value(style->get_fg(STATE_NORMAL));
- error_mtag->property_background_gdk().set_value(style->get_bg(STATE_NORMAL));
-
- a_widget3.set_name ("WarningMessage");
- a_widget3.ensure_style ();
- style = a_widget3.get_style();
-
- warning_ptag->property_font_desc().set_value(style->get_font());
- warning_ptag->property_foreground_gdk().set_value(style->get_fg(STATE_ACTIVE));
- warning_ptag->property_background_gdk().set_value(style->get_bg(STATE_ACTIVE));
- warning_mtag->property_font_desc().set_value(style->get_font());
- warning_mtag->property_foreground_gdk().set_value(style->get_fg(STATE_NORMAL));
- warning_mtag->property_background_gdk().set_value(style->get_bg(STATE_NORMAL));
-
- a_widget4.set_name ("InfoMessage");
- a_widget4.ensure_style ();
- style = a_widget4.get_style();
-
- info_ptag->property_font_desc().set_value(style->get_font());
- info_ptag->property_foreground_gdk().set_value(style->get_fg(STATE_ACTIVE));
- info_ptag->property_background_gdk().set_value(style->get_bg(STATE_ACTIVE));
- info_mtag->property_font_desc().set_value(style->get_font());
- info_mtag->property_foreground_gdk().set_value(style->get_fg(STATE_NORMAL));
- info_mtag->property_background_gdk().set_value(style->get_bg(STATE_NORMAL));
-
+ RC::reset_styles(Gtk::Settings::get_default());
return 0;
}
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
index b6a52c6c0c..c6d8656b03 100644
--- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
+++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
@@ -87,7 +87,7 @@ struct UIRequest : public BaseUI::BaseRequestObject {
class UI : public Receiver, public AbstractUI<UIRequest>
{
public:
- UI (string name, int *argc, char **argv[], string rcfile);
+ UI (string name, int *argc, char **argv[]);
virtual ~UI ();
static UI *instance() { return theGtkUI; }