Class: Alexandria::UI::ProviderPreferencesDialog

Inherits:
ProviderPreferencesBaseDialog show all
Includes:
GetText
Defined in:
lib/alexandria/ui/provider_preferences_dialog.rb

Instance Attribute Summary

Attributes inherited from ProviderPreferencesBaseDialog

#dialog

Instance Method Summary collapse

Constructor Details

#initialize(parent, provider) ⇒ ProviderPreferencesDialog

Returns a new instance of ProviderPreferencesDialog.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/alexandria/ui/provider_preferences_dialog.rb', line 15

def initialize(parent, provider)
  super(title: _("Preferences for %s") % provider.fullname,
        parent: parent,
        flags: :modal,
        buttons: [[Gtk::Stock::CLOSE, :close]])

  table = Gtk::Table.new(0, 0)
  fill_table(table, provider)
  dialog.child.pack_start(table)

  dialog.signal_connect("destroy") { sync_variables }
end

Instance Method Details

#acquireObject



28
29
30
31
32
# File 'lib/alexandria/ui/provider_preferences_dialog.rb', line 28

def acquire
  dialog.show_all
  dialog.run
  dialog.destroy
end