Class: Alexandria::UI::ConfirmEraseDialog
- Inherits:
-
AlertDialog
- Object
- Gtk::Dialog
- AlertDialog
- Alexandria::UI::ConfirmEraseDialog
- Includes:
- GetText
- Defined in:
- lib/alexandria/ui/dialogs/export_dialog.rb
Instance Method Summary collapse
- #erase? ⇒ Boolean
-
#initialize(parent, filename) ⇒ ConfirmEraseDialog
constructor
A new instance of ConfirmEraseDialog.
Constructor Details
#initialize(parent, filename) ⇒ ConfirmEraseDialog
Returns a new instance of ConfirmEraseDialog.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/alexandria/ui/dialogs/export_dialog.rb', line 27 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 self.default_response = Gtk::ResponseType::CANCEL show_all && (@response = run) destroy end |
Instance Method Details
#erase? ⇒ Boolean
40 41 42 |
# File 'lib/alexandria/ui/dialogs/export_dialog.rb', line 40 def erase? @response == :ok end |