Sha256: 2ec4764681b98800f62b5a5b60bc9fc1bab34a293212e3a137222ab0ccfb1eea
Contents?: true
Size: 956 Bytes
Versions: 2
Compression:
Stored size: 956 Bytes
Contents
# frozen_string_literal: true # This file is part of Alexandria. # # See the file README.md for authorship and licensing information. require "alexandria/ui/alert_dialog" module Alexandria module UI class ConfirmEraseDialog < AlertDialog include GetText GetText.bindtextdomain(Alexandria::TEXTDOMAIN, charset: "UTF-8") 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 end def erase? show_all && (@response = run) destroy @response == Gtk::ResponseType::OK end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alexandria-book-collection-manager-0.7.5 | lib/alexandria/ui/confirm_erase_dialog.rb |
alexandria-book-collection-manager-0.7.4 | lib/alexandria/ui/confirm_erase_dialog.rb |