Пример #1
0
  def __init__(self):
    self = self.initWithWindowNibName_('MacGrow')
    self.window().setTitle_('Grow')

    self.model = GrowLauncherModel()
    self.tableView.setDataSource_(self.model)
    self.tableView.setDelegate_(self.model)
    self.tableView.reloadData()
#    self.outlineView.setTarget_(self)
#    self.outlineView.setDoubleAction_("doubleClick:")
      #    self.window().makeFirstResponder_(self.tableView)

    # Show the window and bring it to the top.
    self.showWindow_(self)
    NSApp.activateIgnoringOtherApps_(True)

    if not symlinks.is_installed():
      _alert_and_make_symlinks()

    thread = threading.Thread(target=check_for_updates)
    thread.start()

    # Prevent garbage collection before window is closed.
    # It will be released in self.windowWillClose_().
    self.retain()
Пример #2
0
  def applicationDidFinishLaunching_(self, notification):
    if check_for_updates(quiet=True):
      AppHelper.stopEventLoop()  # Exit if the user opened the web browser.
      return

    if symlinks.is_installed():
      alert('The "grow" command is already installed. Open Terminal and run "grow" to use the SDK.')
    else:
      _alert_and_make_symlinks()

    AppHelper.stopEventLoop()
Пример #3
0
 def makeSymlinksAction_(self, sender):
   if symlinks.is_installed():
     info_text = 'The Grow commands have already been installed to /usr/local/bin/grow.'
     alert(message='Grow commands already installed.', info_text=info_text)
     return
   _alert_and_make_symlinks()