equal
deleted
inserted
replaced
1140 if (GetWidgetFromPos(w2, e->we.popupmenu.pt.x - w2->left, e->we.popupmenu.pt.y - w2->top) == WP(w, menu_d).main_button) |
1140 if (GetWidgetFromPos(w2, e->we.popupmenu.pt.x - w2->left, e->we.popupmenu.pt.y - w2->top) == WP(w, menu_d).main_button) |
1141 index = WP(w, menu_d).sel_index; |
1141 index = WP(w, menu_d).sel_index; |
1142 } |
1142 } |
1143 |
1143 |
1144 int action_id = WP(w, menu_d).action_id; |
1144 int action_id = WP(w, menu_d).action_id; |
1145 DeleteWindow(w); |
1145 delete w; |
1146 |
1146 |
1147 if (index >= 0) { |
1147 if (index >= 0) { |
1148 assert((uint)index <= lengthof(_menu_clicked_procs)); |
1148 assert((uint)index <= lengthof(_menu_clicked_procs)); |
1149 _menu_clicked_procs[action_id](index); |
1149 _menu_clicked_procs[action_id](index); |
1150 } |
1150 } |
1345 Window *w2 = FindWindowById(WC_MAIN_TOOLBAR,0); |
1345 Window *w2 = FindWindowById(WC_MAIN_TOOLBAR,0); |
1346 if (GetWidgetFromPos(w2, e->we.popupmenu.pt.x - w2->left, e->we.popupmenu.pt.y - w2->top) == WP(w, menu_d).main_button) |
1346 if (GetWidgetFromPos(w2, e->we.popupmenu.pt.x - w2->left, e->we.popupmenu.pt.y - w2->top) == WP(w, menu_d).main_button) |
1347 index = WP(w, menu_d).sel_index; |
1347 index = WP(w, menu_d).sel_index; |
1348 } |
1348 } |
1349 |
1349 |
1350 DeleteWindow(w); |
1350 delete w; |
1351 |
1351 |
1352 if (index >= 0) { |
1352 if (index >= 0) { |
1353 assert(index >= 0 && index < 30); |
1353 assert(index >= 0 && index < 30); |
1354 _menu_clicked_procs[action_id](index); |
1354 _menu_clicked_procs[action_id](index); |
1355 } |
1355 } |