class Alexandria::UI::BuilderBase
Public Class Methods
new(filename, widget_names)
click to toggle source
# File lib/alexandria/ui/builder_base.rb, line 10 def initialize(filename, widget_names) file = File.join(Alexandria::Config::DATA_DIR, "glade", filename) builder = Gtk::Builder.new # TODO: This emits the warning 'GtkDialog mapped without a transient # parent. This is discouraged.' builder.add_from_file(file) builder.connect_signals do |handler| method(handler) end widget_names.each do |name| instance_variable_set("@#{name}".intern, builder[name.to_s]) end end