summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-10-29 07:35:40 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-10-29 07:35:40 +0000
commitdeeef0a263d24b5ddbe38a601f89ec99a8f19823 (patch)
tree68b27a834f9eafc5f79098da99ca29f508f13700 /libs
parent01c2be0bab9209d74542888ad6e2e9fc27d19cf7 (diff)
step 2 of keyboard focus work for plugin windows
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4026 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc14
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtk_ui.h6
2 files changed, 19 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index cf75e59e8b..a1885a297e 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -65,6 +65,9 @@ UI::UI (string namestr, int *argc, char ***argv)
: AbstractUI<UIRequest> (namestr, true)
{
theMain = new Main (argc, argv);
+#ifndef GTK_NEW_TOOLTIP_API
+ tips = new Tooltips;
+#endif
_active = false;
_auto_display_errors = true;
@@ -372,7 +375,16 @@ UI::do_request (UIRequest* req)
} else if (req->type == SetTip) {
- /* XXX need to figure out how this works */
+#ifdef GTK_NEW_TOOLTIP_API
+ /* even if the installed GTK is up to date,
+ at present (November 2008) our included
+ version of gtkmm is not. so use the GTK
+ API that we've verified has the right function.
+ */
+ gtk_widget_set_tooltip_text (req->widget->gobj(), req->msg);
+#else
+ tips->set_tip (*req->widget, req->msg, "");
+#endif
} else {
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
index e114693aee..91b6fa48ca 100644
--- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
+++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
@@ -29,6 +29,9 @@
#include <pthread.h>
#include <gtkmm/widget.h>
#include <gtkmm/style.h>
+#ifndef GTK_NEW_TOOLTIP_API
+#include <gtkmm/tooltips.h>
+#endif
#include <gtkmm/textbuffer.h>
#include <gtkmm/main.h>
#include <gdkmm/color.h>
@@ -152,6 +155,9 @@ class UI : public Receiver, public AbstractUI<UIRequest>
static pthread_t gui_thread;
bool _active;
Gtk::Main *theMain;
+#ifndef GTK_NEW_TOOLTIP_API
+ Gtk::Tooltips *tips;
+#endif
TextViewer *errors;
Glib::RefPtr<Gtk::TextBuffer::Tag> error_ptag;
Glib::RefPtr<Gtk::TextBuffer::Tag> error_mtag;