summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gtkmm2ext/utils.cc')
-rw-r--r--libs/gtkmm2ext/utils.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc
index 2b3a29fc0d..4ba85e2f25 100644
--- a/libs/gtkmm2ext/utils.cc
+++ b/libs/gtkmm2ext/utils.cc
@@ -310,10 +310,10 @@ Gtkmm2ext::pixbuf_from_string(const string& name, const Pango::FontDescription&
}
void
-Gtkmm2ext::position_menu_anchored (const Gtk::Menu* const menu,
+_position_menu_anchored (int& x, int& y, bool& push_in,
+ const Gtk::Menu* const menu,
Gtk::Widget* const anchor,
- const std::string& selected,
- int& x, int& y, bool& push_in) {
+ const std::string& selected) {
using namespace Gdk;
using namespace Gtk;
using namespace Gtk::Menu_Helpers;
@@ -417,6 +417,18 @@ Gtkmm2ext::position_menu_anchored (const Gtk::Menu* const menu,
}
void
+Gtkmm2ext::anchored_menu_popup (Gtk::Menu* const menu,
+ Gtk::Widget* const anchor,
+ const std::string& selected,
+ guint button, guint32 time) {
+ menu->popup(
+ sigc::bind (sigc::ptr_fun(&_position_menu_anchored),
+ menu, anchor, selected),
+ button,
+ time);
+}
+
+void
Gtkmm2ext::set_popdown_strings (Gtk::ComboBoxText& cr, const vector<string>& strings)
{
vector<string>::const_iterator i;