summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-09-20 18:04:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-09-20 18:04:47 +0000
commit47e8a7ac4a307b25b0f79f078ac0015ae8680ede (patch)
tree276e5479bf0bdfc94bed000938ef1df63835e211 /libs/gtkmm2ext
parent59343255616fe7182a9fdd0e1b574f2c915e945d (diff)
changes for OSX/SAE
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2475 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc24
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtk_ui.h3
-rw-r--r--libs/gtkmm2ext/pixfader.cc4
3 files changed, 24 insertions, 7 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index e8c1a4d64a..8622aae9b4 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -68,6 +68,7 @@ UI::UI (string namestr, int *argc, char ***argv)
tips = new Tooltips;
_active = false;
+ _auto_display_errors = true;
if (!theGtkUI) {
theGtkUI = this;
@@ -482,8 +483,8 @@ UI::process_error_message (Transmitter::Channel chn, const char *str)
display_message (prefix, prefix_len, ptag, mtag, str);
- if (!errors->is_visible()) {
- toggle_errors();
+ if (_auto_display_errors) {
+ show_error_log ();
}
}
@@ -491,13 +492,26 @@ UI::process_error_message (Transmitter::Channel chn, const char *str)
}
void
+UI::show_error_log ()
+{
+ errors->set_position (WIN_POS_CENTER);
+ errors->show_all ();
+ errors->present ();
+}
+
+void
+UI::hide_error_log ()
+{
+ errors->hide ();
+}
+
+void
UI::toggle_errors ()
{
if (!errors->is_visible()) {
- errors->set_position (WIN_POS_MOUSE);
- errors->show ();
+ show_error_log ();
} else {
- errors->hide ();
+ hide_error_log ();
}
}
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
index 0c2ff0d798..dbc6e6d611 100644
--- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
+++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
@@ -139,11 +139,14 @@ class UI : public Receiver, public AbstractUI<UIRequest>
static pthread_t the_gui_thread() { return gui_thread; }
protected:
+ bool _auto_display_errors;
virtual void handle_fatal (const char *);
virtual void display_message (const char *prefix, gint prefix_len,
Glib::RefPtr<Gtk::TextBuffer::Tag> ptag,
Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
const char *msg);
+ void show_error_log ();
+ void hide_error_log ();
private:
static UI *theGtkUI;
diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc
index f3a40ffc69..217fe50d03 100644
--- a/libs/gtkmm2ext/pixfader.cc
+++ b/libs/gtkmm2ext/pixfader.cc
@@ -68,7 +68,7 @@ PixFader::on_expose_event (GdkEventExpose* ev)
intersection.width, intersection.height,
Gdk::RGB_DITHER_NONE, 0, 0);
- get_window()->draw_line (get_style()->get_bg_gc(STATE_ACTIVE), 0, 0, view.width - 1, 0); /* top */
+ get_window()->draw_line (get_style()->get_bg_gc(STATE_ACTIVE), 0, 0, view.width - 1, 0); /* top */
get_window()->draw_line (get_style()->get_bg_gc(STATE_ACTIVE), 0, 0, 0, view.height - 1); /* left */
get_window()->draw_line (get_style()->get_bg_gc(STATE_NORMAL), view.width - 1, 0, view.width - 1, view.height - 1); /* right */
get_window()->draw_line (get_style()->get_bg_gc(STATE_NORMAL), 0, view.height - 1, view.width - 1, view.height - 1); /* bottom */
@@ -238,7 +238,7 @@ PixFader::adjustment_changed ()
{
if (display_height() != last_drawn) {
queue_draw ();
- }
+ }
}
int