class Plugin::ChangeAccount::AccountControl

Constants

COL_ICON
COL_NAME
COL_WORLD
COL_WORLD_NAME

Public Class Methods

new(plugin) click to toggle source
Calls superclass method Gtk::TreeViewPrettyScroll.new
# File core/plugin/change_account/account_control.rb, line 12
def initialize(plugin)
  @plugin = plugin
  super()
  set_model(::Gtk::ListStore.new(GdkPixbuf::Pixbuf, String, String, Object))
  append_column ::Gtk::TreeViewColumn.new("", ::Gtk::CellRendererPixbuf.new, pixbuf: COL_ICON)
  append_column ::Gtk::TreeViewColumn.new("name", ::Gtk::CellRendererText.new, text: COL_NAME)
  append_column ::Gtk::TreeViewColumn.new("provider", ::Gtk::CellRendererText.new, text: COL_WORLD_NAME)
  content_initialize
  register_signal_handlers
  event_listener_initialize
end

Public Instance Methods

selected_worlds() click to toggle source
# File core/plugin/change_account/account_control.rb, line 24
def selected_worlds
  self.selection.to_enum(:selected_each).map {|model, path, iter|
    iter[COL_WORLD]
  }
end