Class: Gtk2AppLib::Dialogs::ShowImage
- Inherits:
-
Gtk::Dialog
- Object
- Gtk::Dialog
- Gtk2AppLib::Dialogs::ShowImage
- Defined in:
- lib/gtk2applib/dialogs/show_image.rb
Overview
creates a show image dialog
Instance Method Summary (collapse)
-
- (ShowImage) initialize(uri, cache_directory, options)
constructor
A new instance of ShowImage.
- - (Object) run
Constructor Details
- (ShowImage) initialize(uri, cache_directory, options)
A new instance of ShowImage
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gtk2applib/dialogs/show_image.rb', line 9 def initialize(uri, cache_directory, ) @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 image = Widgets::CachedImage.new(cache_directory, box, *@options[:CachedImage]) image.uri(uri) end |
Instance Method Details
- (Object) run
21 22 23 24 25 26 |
# File 'lib/gtk2applib/dialogs/show_image.rb', line 21 def run self.show_all # Ensure that the dialog box is destroyed when the user responds. self.signal_connect('response') { self.destroy } super() end |