Class: Rabbit::Graffiti::ConfigDialog
- Inherits:
-
Object
- Object
- Rabbit::Graffiti::ConfigDialog
- Includes:
- Rabbit::GetText
- Defined in:
- lib/rabbit/graffiti/config-dialog.rb
Constant Summary
Constants included from Rabbit::GetText
Instance Method Summary collapse
-
#initialize(color, line_width) ⇒ ConfigDialog
constructor
A new instance of ConfigDialog.
- #run(&block) ⇒ Object
Methods included from Rabbit::GetText
Constructor Details
#initialize(color, line_width) ⇒ ConfigDialog
Returns a new instance of ConfigDialog.
10 11 12 13 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 10 def initialize(color, line_width) @original_color = color @original_line_width = line_width end |
Instance Method Details
#run(&block) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 15 def run(&block) @callback = block init_dialog if @dialog.run == Gtk::ResponseType::OK @callback.call(Renderer::Color.new(@dialog.rgba), nil) else @callback.call(@original_color, @original_line_width) end @dialog.destroy end |