Class: TECSCDE::CellPluginDialog
- Defined in:
- lib/tecscde/cell_plugin_dialog.rb
Instance Method Summary collapse
-
#initialize(cell) ⇒ CellPluginDialog
constructor
CellPluginDialog#initialize cell::TmCell.
- #run ⇒ Object
- #setup ⇒ Object
Constructor Details
#initialize(cell) ⇒ CellPluginDialog
CellPluginDialog#initialize
cell::TmCell
56 57 58 59 |
# File 'lib/tecscde/cell_plugin_dialog.rb', line 56 def initialize(cell) @cell = cell setup end |
Instance Method Details
#run ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/tecscde/cell_plugin_dialog.rb', line 61 def run @dialog.show_all @dialog.run do |response| TECSCDE.logger.info(response) end @dialog.destroy end |
#setup ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/tecscde/cell_plugin_dialog.rb', line 69 def setup @builder = Gtk::Builder.new @builder.add_from_file(File.join(__dir__, "cell_plugin_dialog.glade")) @dialog = @builder["dialog_cell_plugin"] @label_cell_name = @builder["label_cell_name"] @label_cell_name.text = @cell.get_name.to_s @button_ok = @builder["button_ok"] @button_ok.signal_connect("clicked") do |_me| @dialog.response(Gtk::Dialog::RESPONSE_OK) end @button_cancel = @builder["button_cancel"] @button_cancel.signal_connect("clicked") do |_me| @dialog.response(Gtk::Dialog::RESPONSE_CANCEL) end end |