class Gtk::MikutterWindow

Attributes

panes[R]
statusbar[R]

Public Class Methods

new(imaginally, plugin, *args) click to toggle source
Calls superclass method
# File core/plugin/gtk/mikutter_window.rb, line 10
def initialize(imaginally, plugin, *args)
  type_strict plugin => Plugin
  super(*args)
  @imaginally = imaginally
  @plugin = plugin
  @container = Gtk::VBox.new(false, 0)
  @panes = Gtk::HBox.new(true, 0)
  account = Gtk::AccountBox.new
  header = Gtk::HBox.new(false, 0)
  @postboxes = Gtk::VBox.new(false, 0)
  add @container.
    closeup(header.
            closeup(account).
            pack_start(@postboxes)).
    pack_start(@panes).
    closeup(create_statusbar)
  Plugin[:gtk].on_service_registered do |service|
    refresh end
  Plugin[:gtk].on_service_destroyed do |service|
    refresh end
end

Public Instance Methods

add_postbox(i_postbox) click to toggle source
# File core/plugin/gtk/mikutter_window.rb, line 32
def add_postbox(i_postbox)
  options = {postboxstorage: @postboxes, delegate_other: true}.merge(i_postbox.options||{})
  if options[:delegate_other]
    i_window = i_postbox.ancestor_of(Plugin::GUI::Window)
    options[:delegate_other] = postbox_delegation_generator(i_window) end
  postbox = Gtk::PostBox.new(options)
  @postboxes.pack_start(postbox)
  set_focus(postbox.post) unless options[:delegated_by]
  postbox.no_show_all = false
  postbox.show_all if not Service.to_a.empty?
  postbox end