//------------------------------------------------------------------------------ static void run_menu_and_forward_action( const bec::MenuItemList& items, const int x, const int y, const int time, bec::ListModel* model, const std::vector<bec::NodeId>& nodes, const sigc::slot<void, const std::string&, const std::vector<bec::NodeId>&> fe_menu_handler, Gtk::Menu* menu) { if (!items.empty()) run_popup_menu(items, time, sigc::bind(sigc::ptr_fun(process_menu_actions), model, nodes, fe_menu_handler), menu); }
//------------------------------------------------------------------------------ bool DbMySQLRoutineGroupEditor::process_event(GdkEvent* event) { if ( event->type == GDK_BUTTON_PRESS && event->button.button == 3 ) { Gtk::TreeModel::Path path; Gtk::TreeView::Column *column(0); int cell_x(-1); int cell_y(-1); if ( _rg_list->get_path_at_pos((int)event->button.x, (int)event->button.y, path, column, cell_x, cell_y) ) { bec::MenuItemList menuitems; bec::MenuItem item; item.caption = "Remove routine from the group"; item.name = "remove_routine_from_the_group"; menuitems.push_back(item); run_popup_menu(menuitems ,event->button.time ,sigc::bind(sigc::mem_fun(this, &DbMySQLRoutineGroupEditor::menu_action_on_node), path) ,&_context_menu); } } return false; }