visualruby 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.vr_settings.yaml +27 -0
  3. data/bin/editor/VR_Document.rb +156 -156
  4. data/bin/editor/VR_TabSearch.rb +37 -37
  5. data/bin/editor/VR_Tabs.rb +82 -82
  6. data/bin/editor/VR_TextShell.rb +49 -52
  7. data/bin/editor/VR_TextViewCommon.rb +31 -31
  8. data/bin/main/GemTree.rb +14 -14
  9. data/bin/main/NewProjectGUI.rb +24 -24
  10. data/bin/main/OpenProject.rb +53 -53
  11. data/bin/main/ProjectChooserView.rb +31 -31
  12. data/bin/main/ProjectTree.rb +17 -17
  13. data/bin/main/RubygemsAPI.rb +73 -63
  14. data/bin/main/VR_ENV.rb +29 -29
  15. data/bin/main/VR_ENV_GLOBAL.rb +52 -52
  16. data/bin/main/VR_File_Tree.rb +88 -88
  17. data/bin/main/VR_Local_Gem_Tree.rb +53 -53
  18. data/bin/main/VR_Main.rb +240 -238
  19. data/bin/main/VR_Remote_Gem_Tree.rb +41 -41
  20. data/bin/main/glade/Splash.glade +19 -0
  21. data/bin/tools/VR_Tools.rb +72 -72
  22. data/examples/active_record/.vr_settings.yaml +50 -0
  23. data/examples/active_record/active_record.rb +2 -2
  24. data/examples/active_record/bin/ChoosePerson.rb +10 -10
  25. data/examples/active_record/bin/Person.rb +6 -6
  26. data/examples/active_record2/.vr_settings.yaml +23 -0
  27. data/examples/active_record2/bin/CompanyGUI.rb +42 -42
  28. data/examples/active_record2/bin/Employee.rb +13 -13
  29. data/examples/active_record2/bin/Employer.rb +5 -5
  30. data/examples/active_record2/bin/Paycheck.rb +5 -5
  31. data/examples/active_record2/main.rb +4 -4
  32. data/examples/alert_box/bin/AlertBoxDemo.rb +40 -50
  33. data/examples/alert_box/bin/glade/AlertBoxDemo.glade +14 -45
  34. data/examples/all_widgets/.vr_settings.yaml +18 -0
  35. data/examples/all_widgets/bin/AllWidgets.rb +19 -16
  36. data/examples/calculator/.vr_settings.yaml +18 -0
  37. data/examples/calculator/bin/Calculator.rb +22 -22
  38. data/examples/child_window/.vr_settings.yaml +21 -0
  39. data/examples/child_window/bin/ChildWindowDemo.rb +10 -10
  40. data/examples/child_window/bin/ModalWindow.rb +4 -4
  41. data/examples/child_window/bin/ModelessWindow.rb +4 -4
  42. data/examples/child_window/bin/MyChildClass.rb +10 -10
  43. data/examples/drag_drop/.vr_settings.yaml +16 -0
  44. data/examples/drag_drop/bin/DragDropDemo.rb +28 -28
  45. data/examples/filetreeview/.vr_settings.yaml +20 -0
  46. data/examples/filetreeview/bin/ProjectTree.rb +13 -23
  47. data/examples/filetreeview/bin/ProjectTreeGUI.rb +18 -17
  48. data/examples/listview/.vr_settings.yaml +19 -0
  49. data/examples/listview/bin/SongListView.rb +72 -72
  50. data/examples/listview/bin/SongListViewGUI.rb +52 -52
  51. data/examples/listview_objects/.vr_settings.yaml +19 -0
  52. data/examples/listview_objects/bin/DataObject.rb +23 -23
  53. data/examples/listview_objects/bin/ListViewObjects.rb +29 -29
  54. data/examples/listview_objects/bin/ListViewObjectsGUI.rb +12 -12
  55. data/examples/settings_file/bin/MainApp.rb +25 -25
  56. data/examples/settings_file/bin/SavableSettings.rb +25 -26
  57. data/examples/settings_file/settings.yaml +1 -1
  58. data/examples/simple_ruby_gui/.vr_settings.yaml +20 -0
  59. data/examples/simple_ruby_gui/bin/DataObjectGUI.rb +12 -12
  60. data/examples/treeview/.vr_settings.yaml +17 -0
  61. data/examples/treeview/bin/MyClass.rb +18 -17
  62. data/examples/treeview/bin/glade/MyClass.glade +61 -6
  63. data/skeleton/document/NewWindow.rb +8 -8
  64. data/skeleton/project/.vr_settings.yaml +15 -0
  65. data/skeleton/project/bin/MyClass.rb +7 -7
  66. data/vr +38 -41
  67. data/vrlib/doc/images/add.png +0 -0
  68. data/vrlib/doc/images/arrow_up.png +0 -0
  69. data/vrlib/doc/images/brick.png +0 -0
  70. data/vrlib/doc/images/brick_link.png +0 -0
  71. data/vrlib/doc/images/bug.png +0 -0
  72. data/vrlib/doc/images/bullet_black.png +0 -0
  73. data/vrlib/doc/images/bullet_toggle_minus.png +0 -0
  74. data/vrlib/doc/images/bullet_toggle_plus.png +0 -0
  75. data/vrlib/doc/images/date.png +0 -0
  76. data/vrlib/doc/images/delete.png +0 -0
  77. data/vrlib/doc/images/find.png +0 -0
  78. data/vrlib/doc/images/macFFBgHack.png +0 -0
  79. data/vrlib/doc/images/package.png +0 -0
  80. data/vrlib/doc/images/page_green.png +0 -0
  81. data/vrlib/doc/images/page_white_text.png +0 -0
  82. data/vrlib/doc/images/page_white_width.png +0 -0
  83. data/vrlib/doc/images/plugin.png +0 -0
  84. data/vrlib/doc/images/ruby.png +0 -0
  85. data/vrlib/doc/images/tag_blue.png +0 -0
  86. data/vrlib/doc/images/tag_green.png +0 -0
  87. data/vrlib/doc/images/transparent.png +0 -0
  88. data/vrlib/doc/images/wrench.png +0 -0
  89. data/vrlib/doc/images/wrench_orange.png +0 -0
  90. data/vrlib/doc/images/zoom.png +0 -0
  91. data/vrlib/lib/Alert.rb +98 -55
  92. data/vrlib/lib/DragDrop.rb +43 -43
  93. data/vrlib/lib/GladeGUI.rb +207 -207
  94. data/vrlib/lib/IconHash.rb +10 -10
  95. data/vrlib/lib/SavableClass.rb +38 -38
  96. data/vrlib/lib/SimpleComboBoxEntry.rb +3 -3
  97. data/vrlib/lib/treeview/FileTreeView.rb +71 -70
  98. data/vrlib/lib/treeview/IterMethods.rb +35 -35
  99. data/vrlib/lib/treeview/ListView.rb +25 -25
  100. data/vrlib/lib/treeview/TreeView.rb +15 -15
  101. data/vrlib/lib/treeview/ViewCommon.rb +134 -131
  102. data/vrlib/lib/treeview/columns/CalendarCol.rb +48 -48
  103. data/vrlib/lib/treeview/columns/CellRendererCombo.rb +26 -26
  104. data/vrlib/lib/treeview/columns/CellRendererDate.rb +25 -25
  105. data/vrlib/lib/treeview/columns/CellRendererObject.rb +37 -37
  106. data/vrlib/lib/treeview/columns/CellRendererPhone.rb +25 -25
  107. data/vrlib/lib/treeview/columns/CellRendererPixbuf.rb +8 -8
  108. data/vrlib/lib/treeview/columns/CellRendererProgress.rb +8 -8
  109. data/vrlib/lib/treeview/columns/CellRendererSpin.rb +17 -17
  110. data/vrlib/lib/treeview/columns/CellRendererText.rb +18 -18
  111. data/vrlib/lib/treeview/columns/CellRendererToggle.rb +25 -25
  112. data/vrlib/lib/treeview/columns/ComboCol.rb +12 -12
  113. data/vrlib/lib/treeview/columns/CurrencyCol.rb +13 -13
  114. data/vrlib/lib/treeview/columns/DateCol.rb +10 -10
  115. data/vrlib/lib/treeview/columns/ImageCol.rb +16 -16
  116. data/vrlib/lib/treeview/columns/SpinCol.rb +5 -5
  117. data/vrlib/lib/treeview/columns/TextCol.rb +24 -24
  118. data/vrlib/lib/treeview/columns/TreeViewColumn.rb +71 -76
  119. data/vrlib/rdoc_replace.yaml +36 -36
  120. metadata +43 -6
  121. data/Splash.rb +0 -40
@@ -13,33 +13,33 @@ module VR
13
13
 
14
14
  class CellRendererPhone < Gtk::CellRendererText
15
15
 
16
- attr_accessor :phone_format, :edited_callback, :model_col, :column, :model_sym
16
+ attr_accessor :phone_format, :edited_callback, :model_col, :column, :model_sym
17
17
 
18
- def initialize(model_col, column, view, model_sym) # :nodoc:
19
- super()
20
- @model_col = model_col
21
- @column = column
22
- @view = view
23
- @model_sym = model_sym
24
- @view.model.set_sort_func(@model_col) { |m,x,y| x[@model_col] <=> y[@model_col] }
25
- @phone_format = "%3-%3-%4"
26
- @validate_block = Proc.new { |text, model_sym, row, view|
27
- only_numbers = text.gsub(/[^0-9]/, "")
28
- if (only_numbers.size == 10)
29
- true
30
- else
31
- alert("Unrecognized phone number: " + text)
32
- false
33
- end }
34
- @edited_block = nil
18
+ def initialize(model_col, column, view, model_sym) # :nodoc:
19
+ super()
20
+ @model_col = model_col
21
+ @column = column
22
+ @view = view
23
+ @model_sym = model_sym
24
+ @view.model.set_sort_func(@model_col) { |m,x,y| x[@model_col] <=> y[@model_col] }
25
+ @phone_format = "%3-%3-%4"
26
+ @validate_block = Proc.new { |text, model_sym, row, view|
27
+ only_numbers = text.gsub(/[^0-9]/, "")
28
+ if (only_numbers.size == 10)
29
+ true
30
+ else
31
+ alert("Unrecognized phone number: " + text)
32
+ false
33
+ end }
34
+ @edited_block = nil
35
35
  self.signal_connect('edited') do |ren, path, text|
36
- next unless iter = @view.model.get_iter(path)
37
- if @validate_block.call(text, @model_sym, @view.vr_row(iter), @view)
38
- iter[@model_col] = DateTime.strptime(text, @date_format)
39
- @edited_callback.call(@model_sym, @view.vr_row(iter)) if @edited_callback
40
- end
36
+ next unless iter = @view.model.get_iter(path)
37
+ if @validate_block.call(text, @model_sym, @view.vr_row(iter), @view)
38
+ iter[@model_col] = DateTime.strptime(text, @date_format)
39
+ @edited_callback.call(@model_sym, @view.vr_row(iter)) if @edited_callback
40
+ end
41
41
  end
42
- end
43
- end
42
+ end
43
+ end
44
44
 
45
45
  end
@@ -2,15 +2,15 @@ module VR
2
2
 
3
3
  class CellRendererPixbuf < Gtk::CellRendererPixbuf # :nodoc:
4
4
 
5
- attr_reader :model_col, :column, :model_sym
5
+ attr_reader :model_col, :column, :model_sym
6
6
 
7
- def initialize(model_col, column, view, model_sym)
8
- super()
9
- @column = column
10
- @model_col = model_col
11
- @model_sym = model_sym
12
- @view = view
13
- end
7
+ def initialize(model_col, column, view, model_sym)
8
+ super()
9
+ @column = column
10
+ @model_col = model_col
11
+ @model_sym = model_sym
12
+ @view = view
13
+ end
14
14
  end
15
15
 
16
16
  end
@@ -2,15 +2,15 @@ module VR
2
2
 
3
3
  class CellRendererProgress < Gtk::CellRendererProgress # :nodoc:
4
4
 
5
- attr_reader :model_col, :column, :model_sym
5
+ attr_reader :model_col, :column, :model_sym
6
6
 
7
- def initialize(model_col, column, view, model_sym)
8
- super()
9
- @model_col = model_col
10
- @model_sym = model_sym
11
- @column = column
12
- @view = view
13
- end
7
+ def initialize(model_col, column, view, model_sym)
8
+ super()
9
+ @model_col = model_col
10
+ @model_sym = model_sym
11
+ @column = column
12
+ @view = view
13
+ end
14
14
 
15
15
  end
16
16
 
@@ -13,24 +13,24 @@ module VR
13
13
 
14
14
  class CellRendererSpin < Gtk::CellRendererSpin
15
15
 
16
- attr_reader :model_col, :column, :model_sym
17
- attr_accessor :edited_callback
16
+ attr_reader :model_col, :column, :model_sym
17
+ attr_accessor :edited_callback
18
18
 
19
- def initialize(model_col, column, view, model_sym) # :nodoc:
20
- super()
21
- @model_col = model_col
22
- @model_sym = model_sym
23
- @column = column
24
- @view = view
25
- self.editable = true
26
- @view.model.set_sort_func(@model_col) { |m,x,y| x[@model_col].value <=> y[@model_col].value }
27
- @edited_callback = nil
28
- self.signal_connect('edited') do |ren, path, text|
29
- next unless iter = @view.model.get_iter(path)
30
- iter[@model_col].value = text.to_f if (iter)
31
- @edited_callback.call(@model_sym, @view.vr_row(iter)) if @edited_callback
32
- end
33
- end
19
+ def initialize(model_col, column, view, model_sym) # :nodoc:
20
+ super()
21
+ @model_col = model_col
22
+ @model_sym = model_sym
23
+ @column = column
24
+ @view = view
25
+ self.editable = true
26
+ @view.model.set_sort_func(@model_col) { |m,x,y| x[@model_col].value <=> y[@model_col].value }
27
+ @edited_callback = nil
28
+ self.signal_connect('edited') do |ren, path, text|
29
+ next unless iter = @view.model.get_iter(path)
30
+ iter[@model_col].value = text.to_f if (iter)
31
+ @edited_callback.call(@model_sym, @view.vr_row(iter)) if @edited_callback
32
+ end
33
+ end
34
34
 
35
35
  end
36
36
 
@@ -13,25 +13,25 @@ module VR
13
13
 
14
14
  class CellRendererText < Gtk::CellRendererText
15
15
 
16
- attr_accessor :validate_block, :edited_callback
17
- attr_reader :model_col, :column, :model_sym
16
+ attr_accessor :validate_block, :edited_callback
17
+ attr_reader :model_col, :column, :model_sym
18
18
 
19
- def initialize(model_col, column, view, model_sym) # :nodoc:
20
- super()
21
- @column = column
22
- @model_sym = model_sym
23
- @model_col = model_col
24
- @view = view
25
- @validate_block = Proc.new { |text, model_sym, row, view| true }
26
- @edited_callback = nil
27
- self.signal_connect('edited') do |ren, path, text|
28
- next unless iter = @view.model.get_iter(path)
29
- if @validate_block.call(text, @model_sym, @view.vr_row(iter), @view)
30
- iter[@model_col] = (iter[@model_col].is_a? String) ? text : text.to_f
31
- @edited_callback.call(@model_sym, @view.vr_row(iter)) if @edited_callback
32
- end
33
- end
34
- end
19
+ def initialize(model_col, column, view, model_sym) # :nodoc:
20
+ super()
21
+ @column = column
22
+ @model_sym = model_sym
23
+ @model_col = model_col
24
+ @view = view
25
+ @validate_block = Proc.new { |text, model_sym, row, view| true }
26
+ @edited_callback = nil
27
+ self.signal_connect('edited') do |ren, path, text|
28
+ next unless iter = @view.model.get_iter(path)
29
+ if @validate_block.call(text, @model_sym, @view.vr_row(iter), @view)
30
+ iter[@model_col] = (iter[@model_col].is_a? String) ? text : text.to_f
31
+ @edited_callback.call(@model_sym, @view.vr_row(iter)) if @edited_callback
32
+ end
33
+ end
34
+ end
35
35
 
36
36
  end
37
37
 
@@ -13,34 +13,34 @@ module VR
13
13
 
14
14
  class CellRendererToggle < Gtk::CellRendererToggle
15
15
 
16
- attr_accessor :validate_block, :edited_callback
17
- attr_reader :model_col, :column, :model_sym
16
+ attr_accessor :validate_block, :edited_callback
17
+ attr_reader :model_col, :column, :model_sym
18
18
 
19
- def initialize(model_col, column, view, model_sym)
20
- super()
21
- @model_col = model_col
22
- @model_sym = model_sym
23
- @column = column
24
- @view = view
25
- @edited_callback = nil
26
- @validate_block = Proc.new { |model_sym, row, view | true }
27
- self.signal_connect('toggled') do |ren, path|
28
- @view.model.each { |mod, path, iter| iter[@model_col] = false } if self.radio?
29
- next unless iter = @view.model.get_iter(path)
30
- if @validate_block.call(@model_sym, @view.vr_row(iter), @view)
31
- iter[model_col] = !iter[model_col]
32
- @edited_callback.call(@model_col, iter) if @edited_callback
33
- end
19
+ def initialize(model_col, column, view, model_sym)
20
+ super()
21
+ @model_col = model_col
22
+ @model_sym = model_sym
23
+ @column = column
24
+ @view = view
25
+ @edited_callback = nil
26
+ @validate_block = Proc.new { |model_sym, row, view | true }
27
+ self.signal_connect('toggled') do |ren, path|
28
+ @view.model.each { |mod, path, iter| iter[@model_col] = false } if self.radio?
29
+ next unless iter = @view.model.get_iter(path)
30
+ if @validate_block.call(@model_sym, @view.vr_row(iter), @view)
31
+ iter[model_col] = !iter[model_col]
32
+ @edited_callback.call(@model_col, iter) if @edited_callback
33
+ end
34
34
  end
35
- end
36
-
37
- def editable=(is_editable)
38
- self.sensitive = is_editable
39
- end
35
+ end
36
+
37
+ def editable=(is_editable)
38
+ self.sensitive = is_editable
39
+ end
40
40
 
41
- def set_editable(is_editable)
42
- self.sensitive = is_editable
43
- end
41
+ def set_editable(is_editable)
42
+ self.sensitive = is_editable
43
+ end
44
44
 
45
45
  end
46
46
 
@@ -1,5 +1,5 @@
1
1
 
2
-
2
+
3
3
  module VR
4
4
 
5
5
  # The Combo class is for use with VR::ListView and VR::TreeView. It
@@ -9,34 +9,34 @@ module VR
9
9
  # It is one of the data types that you can pass to the constructors for VR::ListView and
10
10
  # VR::TreeView. For example, to make the second column render as a combobox:
11
11
  #
12
- # @view = VR::Treeview.new(Gdk::Pixbuf, VR::Combo, String)
12
+ # @view = VR::Treeview.new(Gdk::Pixbuf, VR::Combo, String)
13
13
  #
14
14
  # Then when you add data to the model:
15
15
  #
16
- # @view.add_row(@pixbuf, VR::Combo.new("Mr", "Mr", "Mrs", "Ms"), "Hello World")
16
+ # @view.add_row(@pixbuf, VR::Combo.new("Mr", "Mr", "Mrs", "Ms"), "Hello World")
17
17
  #
18
18
  # This would set the combobox for this row so that "Mr" is selected, and "Mr", "Mrs", and "Ms" are the choices.
19
19
 
20
20
 
21
21
  class ComboCol # can't subclass String tried twice!!!
22
22
 
23
- attr_accessor :selected, :selections
23
+ attr_accessor :selected, :selections
24
24
 
25
25
  # This defines a combobox for a row in VR::ListView or VR::TreeView. You pass three or more strings
26
26
  # to the constructor, and the first string is the selected value that appears in the row in the
27
27
  # view.
28
28
  #
29
29
  # - current_selection (type String)
30
- # - selections (comma separated list of Strings)
30
+ # - selections (comma separated list of Strings)
31
31
  #
32
- def initialize(current_selection, *selections)
33
- @selected = current_selection
34
- @selections = selections
35
- end
32
+ def initialize(current_selection, *selections)
33
+ @selected = current_selection
34
+ @selections = selections
35
+ end
36
36
 
37
- def valid?(str)
38
- @selections.include?(str)
39
- end
37
+ def valid?(str)
38
+ @selections.include?(str)
39
+ end
40
40
 
41
41
  end
42
42
 
@@ -1,22 +1,22 @@
1
-
1
+
2
2
  module VR
3
3
 
4
4
  class CurrencyCol
5
-
6
- attr_accessor :value, :format
5
+
6
+ attr_accessor :value, :format
7
7
 
8
- def initialize(value, format = "$%.2f")
9
- set_value(value, format)
10
- end
8
+ def initialize(value, format = "$%.2f")
9
+ set_value(value, format)
10
+ end
11
11
 
12
- def set_value(value, format = "$%.2f")
13
- @value = value
14
- @format = format
15
- end
12
+ def set_value(value, format = "$%.2f")
13
+ @value = value
14
+ @format = format
15
+ end
16
16
 
17
- def to_s
18
- format % @value.to_f
19
- end
17
+ def to_s
18
+ format % @value.to_f
19
+ end
20
20
 
21
21
  end
22
22
 
@@ -1,19 +1,19 @@
1
1
 
2
-
2
+
3
3
  module VR
4
4
 
5
5
  class DateCol
6
-
7
- attr_accessor :date
6
+
7
+ attr_accessor :date
8
8
 
9
- def initialize(date, format = "%Y-%m-%d")
10
- set_date(date, format)
11
- end
9
+ def initialize(date, format = "%Y-%m-%d")
10
+ set_date(date, format)
11
+ end
12
12
 
13
- def set_date(date, format = "%Y-%m-%d")
14
- @date = date
15
- # gsub!(self, @date.strftime(format))
16
- end
13
+ def set_date(date, format = "%Y-%m-%d")
14
+ @date = date
15
+ # gsub!(self, @date.strftime(format))
16
+ end
17
17
 
18
18
  end
19
19
 
@@ -1,27 +1,27 @@
1
1
 
2
2
  module VR
3
3
 
4
- class ImageCol #< Gdk::Pixbuf
4
+ class ImageCol #< Gdk::Pixbuf
5
5
 
6
- include GladeGUI
6
+ include GladeGUI
7
7
 
8
- def initialize(image)
9
- # super(File.dirname(__FILE__) + "/../../../img/image-x-generic.png")
10
- @image1 = image
11
- end
8
+ def initialize(image)
9
+ # super(File.dirname(__FILE__) + "/../../../img/image-x-generic.png")
10
+ @image1 = image
11
+ end
12
12
 
13
- def before_show()
14
- @builder["window1"].resize 500, 360
15
- end
13
+ def before_show()
14
+ @builder["window1"].resize 500, 360
15
+ end
16
16
 
17
- def to_s
18
- "<Img>"
19
- end
17
+ def to_s
18
+ "<Img>"
19
+ end
20
20
 
21
- # def visual_attributes
22
- # { :pixbuf => self }
23
- # end
21
+ # def visual_attributes
22
+ # { :pixbuf => self }
23
+ # end
24
24
 
25
- end
25
+ end
26
26
 
27
27
  end
@@ -1,11 +1,11 @@
1
1
  module VR
2
2
 
3
- class SpinCol < Gtk::Adjustment
3
+ class SpinCol < Gtk::Adjustment
4
4
 
5
- def initialize(val, min, max, step)
6
- super(val, min, max, step, 0, 0)
7
- end
5
+ def initialize(val, min, max, step)
6
+ super(val, min, max, step, 0, 0)
7
+ end
8
8
 
9
- end
9
+ end
10
10
 
11
11
  end
@@ -20,46 +20,46 @@ module VR
20
20
  #
21
21
  # See the example project, "listview_objects" for more.
22
22
 
23
- class TextCol
23
+ class TextCol
24
24
 
25
- include GladeGUI
25
+ include GladeGUI
26
26
 
27
- attr_accessor :text, :length_to_display
27
+ attr_accessor :text, :length_to_display
28
28
  #
29
29
  # - text - String value of the field
30
30
  # - length_to_display - Integer number of characters to display in the listview. Default: 20
31
31
  #
32
- def initialize(text, length_to_display = 20)
33
- @length_to_display = length_to_display
34
- @text = text
35
- end
32
+ def initialize(text, length_to_display = 20)
33
+ @length_to_display = length_to_display
34
+ @text = text
35
+ end
36
36
 
37
- def before_show()
38
- @builder["window1"].resize 650, 360
39
- end
37
+ def before_show()
38
+ @builder["window1"].resize 650, 360
39
+ end
40
40
 
41
41
  # The to_s method outputs the string that is shown in the VR::ListView. By default
42
42
  # it will display the first 20 characters of the string. If you
43
43
  # want to change the number of characters it displays, change the
44
44
  # value of the length_to_display variable.
45
45
 
46
- def to_s
47
- (@text.size > @length_to_display ? @text[0, @length_to_display - 4] + "..." : @text).gsub("\n"," ")
48
- end
46
+ def to_s
47
+ (@text.size > @length_to_display ? @text[0, @length_to_display - 4] + "..." : @text).gsub("\n"," ")
48
+ end
49
49
 
50
- def buttonSave__clicked(*args) # :nodoc:
51
- get_glade_variables()
52
- @builder["window1"].destroy
53
- end
50
+ def buttonSave__clicked(*args) # :nodoc:
51
+ get_glade_variables()
52
+ @builder["window1"].destroy
53
+ end
54
54
 
55
- def buttonCancel__clicked(*args) # :nodoc:
56
- @builder["window1"].destroy
57
- end
55
+ def buttonCancel__clicked(*args) # :nodoc:
56
+ @builder["window1"].destroy
57
+ end
58
58
 
59
- def <=>(text_col)
60
- self.text <=> text_col.text
61
- end
59
+ def <=>(text_col)
60
+ self.text <=> text_col.text
61
+ end
62
62
 
63
- end
63
+ end
64
64
 
65
65
  end