Class: Gtk2AppLib::Dialogs::QuickMessage
- Inherits:
-
Gtk::Dialog
- Object
- Gtk::Dialog
- Gtk2AppLib::Dialogs::QuickMessage
- Defined in:
- lib/gtk2applib/dialogs/quick_message.rb
Overview
creates a quick message dialog
Instance Method Summary (collapse)
-
- (QuickMessage) initialize(options)
constructor
A new instance of QuickMessage.
- - (Object) run(message)
Constructor Details
- (QuickMessage) initialize(options)
A new instance of QuickMessage
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gtk2applib/dialogs/quick_message.rb', line 10 def initialize() @options = super(@options[:TITLE], @options[:WINDOW], @options[:FLAGS], *@options[:DIALOG_BUTTONS]) # Add the message in a label, and # show everything we've added to the dialog. box = self.vbox if @options[:SCROLLED_WINDOW] then box = Widgets::ScrolledWindow.new(box, *@options[:ScrolledWindow]) end @label = Widgets::Label.new('', box, *@options[:Label]) end |
Instance Method Details
- (Object) run(message)
23 24 25 26 27 28 29 |
# File 'lib/gtk2applib/dialogs/quick_message.rb', line 23 def run() @label.text = self.show_all # Ensure that the dialog box is destroyed when the user responds. self.signal_connect('response') { self.destroy } super() end |