Where MAXIMUM_QUICKLIST_WIDTH is a const int that you should define in the unnamed namespace that we have at the top of the ApplicationLauncherIcon.cpp file ;).
40 + // add windows menu items
41 + if (_menu_items_windows.size() > 1 )
Mh, I'd prefer to iterate one more time than allocating some extra memory here, so just use if (Windows().size() > 1), and move EnsureMenuItemsWindowsReady under this check.
36 + // delete all menu items for windows windows. clear() ;
37 + _menu_items_
Please do this on EnsureMenuItems WindowsReady
17 + _gsignals.Add<void, DbusmenuMenuitem*, int>(menu_item, DBUSMENU_ MENUITEM_ SIGNAL_ ITEM_ACTIVATED, em*,int) {
18 + [w] (DbusmenuMenuit
This is ok, but since using [w] means copying the the WindowPtr, I'd prefer if you instead do:
Window xid = w->window_id(); MENUITEM_ SIGNAL_ ITEM_ACTIVATED, [xid] (DbusmenuMenuit em*,int) {
_gsignals.Add<void, DbusmenuMenuitem*, int>(menu_item, DBUSMENU_
...
wm.Raise(xid);
}
22 + } );
Remove this padding, please (use also for the lambda two spaces for indenting).
24 + dbusmenu_ menuitem_ property_ set(menu_ item, QuicklistMenuIt em::MAXIMUM_ LABEL_WIDTH_ PROPERTY, "300");
That property is an integer, you should do instead:
dbusmenu_ menuitem_ property_ set_int( menu_item, QuicklistMenuIt em::MAXIMUM_ LABEL_WIDTH_ PROPERTY, MAXIMUM_ QUICKLIST_ WIDTH);
Where MAXIMUM_ QUICKLIST_ WIDTH is a const int that you should define in the unnamed namespace that we have at the top of the ApplicationLaun cherIcon. cpp file ;).
40 + // add windows menu items items_windows. size() > 1 )
41 + if (_menu_
Mh, I'd prefer to iterate one more time than allocating some extra memory here, so just use if (Windows().size() > 1), and move EnsureMenuItems WindowsReady under this check.
Thanks ;)