Home Download Buy Blog Forum Support

Disable menu items? Make the window go to the front?

Disable menu items? Make the window go to the front?

Postby quarnster on Wed Jan 18, 2012 4:24 pm

Is it possible to give menu items an execution context similar to how key bindings work? In other words, if the context operation fails, the menu item would be disabled.

Is it possible to make the sublime text window pop to the front via a plugin if another app has stolen the focus and come in front of it? I'm working on a GDB plugin and I'm thinking about the situation where the app being debugged creates its own window and then a breakpoint is hit and so I'd like the sublime text window to pop in front of the app being debugged.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Disable menu items? Make the window go to the front?

Postby jps on Wed Jan 18, 2012 9:49 pm

You can selectively enable menu items via implementing is_enabled() in your command

There's no support for bringing a window to the front yet
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Disable menu items? Make the window go to the front?

Postby quarnster on Wed Jan 18, 2012 11:13 pm

Great, is_enabled works just fine, thanks :)
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am


Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests