| 1250 | static const std::string s_extras_menu_name ("_extras_menu"); |
| 1251 | |
| 1252 | static QMenu *find_extras_menu (QMenuBar *mbar) |
| 1253 | { |
| 1254 | if (! mbar) { |
| 1255 | return 0; |
| 1256 | } |
| 1257 | |
| 1258 | QList<QAction *> a = mbar->actions (); |
| 1259 | for (QList<QAction *>::const_iterator i = a.begin (); i != a.end (); ++i) { |
| 1260 | if (tl::to_string ((*i)->objectName ()) == s_extras_menu_name) { |
| 1261 | return (*i)->menu (); |
| 1262 | } |
| 1263 | } |
| 1264 | |
| 1265 | return 0; |
| 1266 | } |
| 1267 | |
| 1268 | bool |
| 1269 | AbstractMenu::wants_extra_menu () |