const Gtk::Menu* const menu,
Gtk::Widget* const anchor,
const std::string& selected) {
- using namespace Gdk;
using namespace Gtk;
using namespace Gtk::Menu_Helpers;
return;
}
- Rectangle monitor;
+ Gdk::Rectangle monitor;
{
const int monitor_num = anchor->get_screen ()->get_monitor_at_window (
anchor->get_window ());
}
const Requisition menu_req = menu->size_request();
- const Rectangle allocation = anchor->get_allocation();
+ const Gdk::Rectangle allocation = anchor->get_allocation();
/* The x and y position are handled separately.
*
MenuList::const_iterator i = items.begin();
for ( ; i != items.end(); ++i) {
- if (selected == ((std::string) i->get_label())) {
+ const Label* label_widget = dynamic_cast<const Label*>(i->get_child());
+ if (label_widget && selected == ((std::string) label_widget->get_label())) {
break;
}
offset += i->size_request().height;