projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename import_audiofiles -> import_files.
[ardour.git]
/
libs
/
gtkmm2ext
/
popup.cc
diff --git
a/libs/gtkmm2ext/popup.cc
b/libs/gtkmm2ext/popup.cc
index 0b150eefe119b1dbd6a264cfb39ea26377ae4059..6f4a8a5427d3372d6787098a08b92aac7103bc80 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;
@@
-79,13
+80,21
@@
PopUp::remove ()
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 {
@@
-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,7
+131,7
@@
PopUp::set_name (string name)
}
bool
}
bool
-PopUp::on_delete_event (GdkEventAny*
ev
)
+PopUp::on_delete_event (GdkEventAny*
/*ev*/
)
{
hide();
{
hide();