I am new to mac develop, sorry for the stupid question, is it possible to gray out item "Quit" from dock menu, I tried API applicationDockMenu which could allow me add customized items, but the dock menu default layout is still there, also I understand there is an API to cancel a quit operation via applicationShouldTerminate, appreciate it if any comments, thanks.
Gray out "Quit" from dock menu
Not sure it is a good idea to prevent user from quitting an app. Usually they are designed in such a way that user is alerted if some data are not saved or it saves all data beforer quitting, so it is easy to restart with context.
I found this, but did not test or check at all: https://www.maketecheasier.com/stop-quitting-apps-accidentally-mac-osx/
And I don't know if it would also gray out the menu item.