Class: Alexandria::UI::BuilderBase
- Inherits:
-
Object
- Object
- Alexandria::UI::BuilderBase
- Defined in:
- lib/alexandria/ui/builder_base.rb
Direct Known Subclasses
AcquireDialog, BookPropertiesDialogBase, NewBookDialog, PreferencesDialog, UIManager
Instance Method Summary collapse
-
#initialize(filename, widget_names) ⇒ BuilderBase
constructor
A new instance of BuilderBase.
Constructor Details
#initialize(filename, widget_names) ⇒ BuilderBase
Returns a new instance of BuilderBase.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/alexandria/ui/builder_base.rb', line 10 def initialize(filename, ) 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 .each do |name| instance_variable_set("@#{name}".intern, builder[name.to_s]) end end |