🥅 only check menu if speciifed in the conf
This commit is contained in:
parent
21751b2faa
commit
c3581fb66b
|
@ -134,12 +134,15 @@ bool AModule::handleUserEvent(GdkEventButton* const& e) {
|
|||
format = rec->second;
|
||||
}
|
||||
|
||||
// Check that a menu has been configured
|
||||
if (config_["menu"].isString()) {
|
||||
// Check if the event is the one specified for the "menu" option
|
||||
if (rec->second == config_["menu"].asString()) {
|
||||
// Popup the menu
|
||||
gtk_widget_show_all(GTK_WIDGET(menu_));
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(menu_), reinterpret_cast<GdkEvent*>(e));
|
||||
}
|
||||
}
|
||||
// Second call user scripts
|
||||
if (!format.empty()) {
|
||||
if (config_[format].isString())
|
||||
|
|
Loading…
Reference in New Issue