brackets-archive / brackets-shell

CEF3-based application shell for Brackets.
http://brackets.io
MIT License
0 stars 0 forks source link

[CLOSED] Fix removing menu dividers #261

Open core-ai-bot opened 2 years ago

core-ai-bot commented 2 years ago

Issue by redmunds Saturday Dec 28, 2013 at 23:45 GMT Originally opened as https://github.com/adobe/brackets-shell/pull/405


Mac: need to set os item for dividers.

This is for https://github.com/adobe/brackets/issues/6300. This pull request requires https://github.com/adobe/brackets/pull/6333.


redmunds included the following code: https://github.com/adobe/brackets-shell/pull/405/commits

core-ai-bot commented 2 years ago

Comment by lkcampbell Sunday Dec 29, 2013 at 17:01 GMT


@redmunds, I can understand enough of the shell code to see that setOsItem() is never being called for newItem if isSeparator is false. And that your change makes sure newItem is set regardless of the value of isSeparator.

One quick question, what is an OsItem? Clearly, it is not the menuItem being inserted or the dividers would have never shown up in the menus ever. It is the "magical" commandID that I was complaining that couldn't find for the Mac?

core-ai-bot commented 2 years ago

Comment by redmunds Sunday Dec 29, 2013 at 18:32 GMT


what is an OsItem?

Look in appshell/native_menu_model.h. An "OsItem" is simply a generic memory pointer to an object (i.e. void*) that the menu model keeps track of that represents an menu item. The native_menu_model object is a brackets-shell-specific data construct.