Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable unavailable menu items #6

Closed
bizoo opened this Issue Jun 29, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@bizoo
Copy link

bizoo commented Jun 29, 2012

Hi,

Thanks for this great plugin.

You can disable menu items that refer to a command by implementing a method is_enabled() in the command.
Sorry, I don't have times for a pull request, this is the code to add:

class SublimeserverStartCommand(sublime_plugin.WindowCommand):

    def is_enabled(self):
        global thread
        return not (thread is not None and thread.is_alive())
class SublimeserverStopCommand(sublime_plugin.WindowCommand):
class SublimeserverBrowserCommand(sublime_plugin.TextCommand):

    def is_enabled(self):
        global thread
        return thread is not None and thread.is_alive()
@learning

This comment has been minimized.

Copy link
Owner

learning commented Jun 29, 2012

Thanks @bizoo , will add it. :)

@ghost ghost assigned learning Jun 29, 2012

learning added a commit that referenced this issue Jul 20, 2012

0.2.0 release
now using official icon, fix decode error while server start failed.
fix #4, #5, #6
@learning

This comment has been minimized.

Copy link
Owner

learning commented Jul 20, 2012

now added to 0.2.0, thanks @bizoo

@learning learning closed this Jul 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.