Class: Alexandria::UI::ErrorDialog

Inherits:
AlertDialog show all
Defined in:
lib/alexandria/ui/error_dialog.rb

Instance Attribute Summary

Attributes inherited from AlertDialog

#dialog

Instance Method Summary collapse

Methods inherited from AlertDialog

#default_response=, #destroy, #run, #show_all

Constructor Details

#initialize(parent, title, message = nil) ⇒ ErrorDialog

Returns a new instance of ErrorDialog.



12
13
14
15
16
17
# File 'lib/alexandria/ui/error_dialog.rb', line 12

def initialize(parent, title, message = nil)
  super(parent, title, Gtk::Stock::DIALOG_ERROR,
        [[Gtk::Stock::OK, :ok]], message)
  # FIXME: Should accept just :ok
  dialog.default_response = Gtk::ResponseType::OK
end

Instance Method Details

#displayObject



19
20
21
22
# File 'lib/alexandria/ui/error_dialog.rb', line 19

def display
  show_all && run
  destroy
end