Class: Alexandria::UI::ConflictWhileCopyingDialog
- Inherits:
-
AlertDialog
- Object
- Gtk::Dialog
- AlertDialog
- Alexandria::UI::ConflictWhileCopyingDialog
- Includes:
- GetText
- Defined in:
- lib/alexandria/ui/dialogs/misc_dialogs.rb
Instance Method Summary collapse
-
#initialize(parent, library, book) ⇒ ConflictWhileCopyingDialog
constructor
A new instance of ConflictWhileCopyingDialog.
- #replace? ⇒ Boolean
Constructor Details
#initialize(parent, library, book) ⇒ ConflictWhileCopyingDialog
Returns a new instance of ConflictWhileCopyingDialog.
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/alexandria/ui/dialogs/misc_dialogs.rb', line 26 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'), :cancel], [_('_Replace'), :ok]], _('If you replace the existing book, its contents will ' \ 'be overwritten.')) self.default_response = Gtk::ResponseType::CANCEL show_all && (@response = run) destroy end |
Instance Method Details
#replace? ⇒ Boolean
40 41 42 |
# File 'lib/alexandria/ui/dialogs/misc_dialogs.rb', line 40 def replace? @response == :ok end |