projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a couple of visibility specifiers that were missing
[ardour.git]
/
libs
/
gtkmm2ext
/
popup.cc
diff --git
a/libs/gtkmm2ext/popup.cc
b/libs/gtkmm2ext/popup.cc
index a8ffc4af669526baaca8ec481899d5dc36e6a842..85a9d537c365859aeb185eb2c61b8182b5a8acf0 100644
(file)
--- a/
libs/gtkmm2ext/popup.cc
+++ b/
libs/gtkmm2ext/popup.cc
@@
-22,6
+22,7
@@
#include <gtkmm2ext/popup.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/popup.h>
#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/gtk_ui.h>
using namespace std;
using namespace Gtk;
using namespace std;
using namespace Gtk;
@@
-74,18
+75,26
@@
PopUp::remove ()
hide ();
if (popdown_time != 0 && timeout != -1) {
hide ();
if (popdown_time != 0 && timeout != -1) {
- g
tk_timeout
_remove (timeout);
+ g
_source
_remove (timeout);
}
if (delete_on_hide) {
std::cerr << "deleting prompter\n";
}
if (delete_on_hide) {
std::cerr << "deleting prompter\n";
- g
tk
_idle_add (idle_delete, this);
+ g_idle_add (idle_delete, this);
}
}
}
}
+#define ENSURE_GUI_THREAD(slot) \
+ if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\
+ Gtkmm2ext::UI::instance()->call_slot (MISSING_INVALIDATOR, (slot)); \
+ return;\
+ }
+
void
PopUp::touch ()
{
void
PopUp::touch ()
{
+ ENSURE_GUI_THREAD (mem_fun (*this, &PopUp::touch));
+
if (is_visible ()) {
remove ();
} else {
if (is_visible ()) {
remove ();
} else {
@@
-94,7
+103,7
@@
PopUp::touch ()
show_all ();
if (popdown_time != 0) {
show_all ();
if (popdown_time != 0) {
- timeout = g
tk
_timeout_add (popdown_time,
+ timeout = g_timeout_add (popdown_time,
remove_prompt_timeout,
this);
}
remove_prompt_timeout,
this);
}
@@
-102,7
+111,7
@@
PopUp::touch ()
}
gint
}
gint
-PopUp::button_click (GdkEventButton
*ev
)
+PopUp::button_click (GdkEventButton
* /*ev*/
)
{
remove ();
return TRUE;
{
remove ();
return TRUE;
@@
-122,17
+131,17
@@
PopUp::set_name (string name)
}
bool
}
bool
-PopUp::on_delete_event (GdkEventAny*
ev
)
+PopUp::on_delete_event (GdkEventAny*
/*ev*/
)
{
hide();
if (popdown_time != 0 && timeout != -1) {
{
hide();
if (popdown_time != 0 && timeout != -1) {
- g
tk_timeout
_remove (timeout);
+ g
_source
_remove (timeout);
}
if (delete_on_hide) {
std::cerr << "deleting prompter\n" << endl;
}
if (delete_on_hide) {
std::cerr << "deleting prompter\n" << endl;
- g
tk
_idle_add (idle_delete, this);
+ g_idle_add (idle_delete, this);
}
return true;
}
return true;