Sha256: cb2bd959db13eedf659c1e749712d5a8b3066e0be97e5dae4a45f6d46c0ede17

Contents?: true

Size: 1.03 KB

Versions: 17

Compression:

Stored size: 1.03 KB

Contents

module Redcar
  class Application
    class QuitCommand < Command
      def execute
        Redcar.app.call_on_plugins(:quit_guard) do |guard|
          return unless guard
        end
        Project::Manager.open_projects.each {|pr| pr.close }
        Redcar.app.quit
      end
    end
    
    class ToggleToolbar < Command

      def execute
        Redcar.app.toggle_show_toolbar
        Redcar.app.refresh_toolbar!
      end
    end
    
    class ToggleCheckForUpdatesCommand < Command
      def execute
        Application::Updates.toggle_checking_for_updates
      end
    end
    
    class OpenUpdateCommand < Command
      sensitize :update_available
      
      def execute
        new_tab = Top::OpenNewEditTabCommand.new.run
        new_tab.document.text = <<-TXT
Latest version is #{Application::Updates.latest_version}, you have #{Redcar::VERSION}.

Upgrade with:

  gem install redcar
        TXT
        new_tab.edit_view.reset_undo
        new_tab.document.set_modified(false)
        new_tab.title= 'Update'
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
redcar-0.13 plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.13.5dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.13.4dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.13.3dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.13.2dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.13.1dev plugins/application/lib/application/commands/application_commands.rb
redcar-0.12.1 plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.13.0dev plugins/application/lib/application/commands/application_commands.rb
redcar-0.12 plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.27dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.26dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.25dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.24dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.23dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.22dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.21dev plugins/application/lib/application/commands/application_commands.rb
redcar-dev-0.12.20dev plugins/application/lib/application/commands/application_commands.rb