Class: GTK::BaseDialog
- Inherits:
-
Gtk::Window
- Object
- Gtk::Window
- GTK::BaseDialog
- Defined in:
- lib/wiki_lyrics/gui/gui-gtk.rb
Direct Known Subclasses
FixPagesDialog, PluginsManagerDialog, SearchLyricsDialog, ShowLyricsDialog, SubmitAlbumDialog, SubmitSongDialog, UploadCoverDialog, WikiPluginDialog
Instance Attribute Summary collapse
-
#accepted ⇒ Object
readonly
Returns the value of attribute accepted.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #accept ⇒ Object
- #exec ⇒ Object
-
#initialize(values, close_on_escape = true) ⇒ BaseDialog
constructor
A new instance of BaseDialog.
Constructor Details
#initialize(values, close_on_escape = true) ⇒ BaseDialog
Returns a new instance of BaseDialog.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/wiki_lyrics/gui/gui-gtk.rb', line 54 def initialize( values, close_on_escape=true ) super() @values = values set_window_position( Gtk::Window::POS_CENTER ) signal_connect( "destroy" ) { Gtk.main_quit() } if close_on_escape self.signal_connect( "key_press_event" ) do |, event| destroy() if event.keyval == Gdk::Keyval::GDK_Escape end end end |
Instance Attribute Details
#accepted ⇒ Object (readonly)
Returns the value of attribute accepted.
51 52 53 |
# File 'lib/wiki_lyrics/gui/gui-gtk.rb', line 51 def accepted @accepted end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
52 53 54 |
# File 'lib/wiki_lyrics/gui/gui-gtk.rb', line 52 def values @values end |
Instance Method Details
#accept ⇒ Object
98 99 100 101 |
# File 'lib/wiki_lyrics/gui/gui-gtk.rb', line 98 def accept() @accepted = true destroy() end |
#exec ⇒ Object
92 93 94 95 96 |
# File 'lib/wiki_lyrics/gui/gui-gtk.rb', line 92 def exec() @accepted = false set_modal( true ) show_all() end |