Class: Smartdict::Gui::ExportDialog::FormatComboBox

Inherits:
Gtk::ComboBox
  • Object
show all
Defined in:
lib/smartdict/gui/export_dialog/format_combo_box.rb

Instance Method Summary collapse

Constructor Details

#initializeFormatComboBox

Returns a new instance of FormatComboBox.



2
3
4
5
6
7
8
# File 'lib/smartdict/gui/export_dialog/format_combo_box.rb', line 2

def initialize
  super(true)

  format_names.each {|name| append_text(name) }

  set_active 0
end

Instance Method Details

#format_namesObject



14
15
16
# File 'lib/smartdict/gui/export_dialog/format_combo_box.rb', line 14

def format_names
  Smartdict::Core::FormatManager.all.keys
end

#selected_formatObject



10
11
12
# File 'lib/smartdict/gui/export_dialog/format_combo_box.rb', line 10

def selected_format
  format_names[active]
end