     @packageManager.uninstall @pack, (error) =>
       if error?
         console.error("Uninstalling #{@type} #{@pack.name} failed", error.stack ? error, error.stderr)
-
-  setStatusIcon: (iconName) ->
-    @status.removeClass('icon-check icon-alert icon-cloud-download')
-    @status.addClass("icon-#{iconName}") if iconName
-    @status.destroyTooltip()
-    switch iconName
-      when 'check'
-        @status.setTooltip(_.capitalize("#{@type} installed"))
-      when 'alert'
-        @status.setTooltip(_.capitalize("#{@type} failed to install"))
-      when 'cloud-download'
-        @status.setTooltip(_.capitalize("#{@type} installing"))

      @installButton.prop('disabled', true)
      @installButton.show()
      @uninstallButton.hide()
      @setStatusIcon('cloud-download')

    @subscribeToPackageEvent 'package-uninstalling', (pack) =>
      @installButton.prop('disabled', true)
      @setStatusIcon()

    @subscribeToPackageEvent 'package-uninstalled package-uninstall-failed theme-uninstalled theme-uninstall-failed', (pack, error) =>
      @installButton.prop('disabled', false)
      if error?
        @setStatusIcon('alert')
      else
        @installButton.show()
        @uninstallButton.hide()
        @settingsButton.hide()
        @setStatusIcon()

    if @isInstalled()
      @installButton.hide()
      @uninstallButton.show()
      @setStatusIcon('check')
    else
      @settingsButton.hide()


              @span class: 'icon icon-playback-pause'
              @span class: 'disable-text', 'Disable'

  initialize: (@pack, @packageManager) ->
    @type = if @pack.theme then 'theme' else 'package'
    @name = @pack.name
