Sha256: a3a39eb39cad4acc6c410a7f6006b20fc2b593e68e8b58bb26788960f5d8378f

Contents?: true

Size: 587 Bytes

Versions: 5

Compression:

Stored size: 587 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 ErrorDialog < AlertDialog
      def initialize(parent, title, message = nil)
        super(parent, title, Gtk::Stock::DIALOG_ERROR,
              [[Gtk::Stock::OK, :ok]], message)
        # FIXME: Should accept just :ok
        dialog.default_response = Gtk::ResponseType::OK
      end

      def display
        show_all && run
        destroy
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alexandria-book-collection-manager-0.7.10 lib/alexandria/ui/error_dialog.rb
alexandria-book-collection-manager-0.7.9 lib/alexandria/ui/error_dialog.rb
alexandria-book-collection-manager-0.7.8 lib/alexandria/ui/error_dialog.rb
alexandria-book-collection-manager-0.7.7 lib/alexandria/ui/error_dialog.rb
alexandria-book-collection-manager-0.7.6 lib/alexandria/ui/error_dialog.rb