Class: QDA::GUI::SuppressibleConfirmDialog

Inherits:
ConfirmDialog
  • Object
show all
Defined in:
lib/weft/wxgui/dialogs.rb

Constant Summary

Constants inherited from ConfirmDialog

ConfirmDialog::CONFIRM_DIALOG_FLAGS

Class Method Summary collapse

Class Method Details

.display(key, title, message) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/weft/wxgui/dialogs.rb', line 80

def self.display(key, title, message)
  if suppressed?(key)
    return Wx::ID_YES
  else
    return super(title, message)
  end
end

.release(key) ⇒ Object



76
77
78
# File 'lib/weft/wxgui/dialogs.rb', line 76

def self.release(key)
  suppress_conf.write(key, false)
end

.suppress(key) ⇒ Object



72
73
74
# File 'lib/weft/wxgui/dialogs.rb', line 72

def self.suppress(key)
  suppress_conf.write(key, true)
end

.suppress_confObject



62
63
64
65
66
# File 'lib/weft/wxgui/dialogs.rb', line 62

def self.suppress_conf()
  conf = Wx::ConfigBase.get()
  conf.path  = '/SuppressWarnings'
  conf
end

.suppressed?(key) ⇒ Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/weft/wxgui/dialogs.rb', line 68

def self.suppressed?(key)
  suppress_conf.read_bool(key, false)
end