class Alexandria::UI::ConfirmEraseDialog
Public Class Methods
new(parent, filename)
click to toggle source
Calls superclass method
Alexandria::UI::AlertDialog::new
# File lib/alexandria/ui/confirm_erase_dialog.rb, line 15 def initialize(parent, filename) super(parent, _("File already exists"), Gtk::Stock::DIALOG_QUESTION, [[Gtk::Stock::CANCEL, :cancel], [_("_Replace"), :ok]], _("A file named '%s' already exists. Do you want " \ "to replace it with the one you are generating?") % filename) # FIXME: Should accept just :cancel dialog.default_response = Gtk::ResponseType::CANCEL end
Public Instance Methods
erase?()
click to toggle source
# File lib/alexandria/ui/confirm_erase_dialog.rb, line 26 def erase? show_all && (@response = run) destroy @response == Gtk::ResponseType::OK end