Sha256: e4a83db4554221a75b8d6883193ec5d4798ebe7742243d3391ff9d11ff5be03f

Contents?: true

Size: 886 Bytes

Versions: 41

Compression:

Stored size: 886 Bytes

Contents

module Redcar
  class EditView
    class SelectThemeDialog < FilterListDialog

      def initialize
        super()
        @matches = EditView.themes.sort
        @matches.delete(EditView.theme)
        @matches.insert(0, EditView.theme + " (Current)")
      end

      def close
        super
      end

      def update_list(filter)
        @last_list = @matches
        filtered_list = @last_list
        if filter.length >= 1
          filtered_list = filter_and_rank_by(filtered_list, filter, filtered_list.length) do |match|
            match
          end
        end
        filtered_list
      end

      def selected(text, ix, closing=false)
        if @last_list
          close
          Redcar::EditView.theme = text
        end
      end

      def moved_to(text, ix)
        if @last_list
          Redcar::EditView.theme = text
        end
      end

    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
redcar-0.13 plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.13.5dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.13.4dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.13.3dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.13.2dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.13.1dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-0.12.1 plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.13.0dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-0.12 plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.27dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.26dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.25dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.24dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.23dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.22dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.21dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.20dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.19dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.18dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb
redcar-dev-0.12.17dev plugins/edit_view/lib/edit_view/select_theme_dialog.rb