Class: Rabbit::Graffiti::ConfigDialog

Inherits:
Object
  • Object
show all
Includes:
Rabbit::GetText
Defined in:
lib/rabbit/graffiti/config-dialog.rb

Constant Summary

Constants included from Rabbit::GetText

Rabbit::GetText::DOMAIN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Rabbit::GetText

included

Constructor Details

#initialize(color, line_width) ⇒ ConfigDialog

Returns a new instance of ConfigDialog.



11
12
13
14
# File 'lib/rabbit/graffiti/config-dialog.rb', line 11

def initialize(color, line_width)
  @original_color = @color = color
  @original_line_width = @line_width = line_width
end

Instance Attribute Details

#colorObject (readonly)

Returns the value of attribute color.



10
11
12
# File 'lib/rabbit/graffiti/config-dialog.rb', line 10

def color
  @color
end

#line_widthObject (readonly)

Returns the value of attribute line_width.



10
11
12
# File 'lib/rabbit/graffiti/config-dialog.rb', line 10

def line_width
  @line_width
end

Instance Method Details

#run(&block) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/rabbit/graffiti/config-dialog.rb', line 16

def run(&block)
  @callback = block
  init_dialog
  if @dialog.run != Gtk::Dialog::RESPONSE_OK
    @callback.call(@original_color, @original_line_width)
  end
  @dialog.destroy
end