class Alexandria::UI::ConflictWhileCopyingDialog
Public Class Methods
new(parent, library, book)
click to toggle source
Calls superclass method
Alexandria::UI::AlertDialog::new
# File lib/alexandria/ui/conflict_while_copying_dialog.rb, line 15 def initialize(parent, library, book) super(parent, format(_("The book '%s' already exists in '%s'. Would you like " \ "to replace it?"), book.title, library.name), Gtk::Stock::DIALOG_QUESTION, [[_("_Skip"), Gtk::ResponseType::CANCEL], [_("_Replace"), Gtk::ResponseType::OK]], _("If you replace the existing book, its contents will " \ "be overwritten.")) dialog.default_response = Gtk::ResponseType::CANCEL end
Public Instance Methods
replace?()
click to toggle source
# File lib/alexandria/ui/conflict_while_copying_dialog.rb, line 27 def replace? show_all && (@response = run) destroy @response == Gtk::ResponseType::OK end