Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Disable unavailable menu items #6
Thanks for this great plugin.
You can disable menu items that refer to a command by implementing a method is_enabled() in the command.
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()