gtk3 3.0.8-x64-mingw32 → 3.0.9-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/ext/gtk3/rb-gtk3.c +17 -0
  3. data/lib/2.2/gtk3.so +0 -0
  4. data/lib/2.3/gtk3.so +0 -0
  5. data/lib/gtk3/container.rb +0 -7
  6. data/lib/gtk3/deprecated.rb +3 -3
  7. data/lib/gtk3/image.rb +7 -7
  8. data/lib/gtk3/loader.rb +11 -5
  9. data/lib/gtk3/text-buffer.rb +33 -12
  10. data/lib/gtk3/text-view.rb +53 -0
  11. data/lib/gtk3/tree-model.rb +5 -0
  12. data/lib/gtk3/tree-view.rb +25 -0
  13. data/lib/gtk3/widget.rb +0 -5
  14. data/sample/gtk-demo/TODO +10 -6
  15. data/sample/gtk-demo/application.ui +93 -70
  16. data/sample/gtk-demo/appmenu.ui +19 -0
  17. data/sample/gtk-demo/assistant.rb +1 -0
  18. data/sample/gtk-demo/css_accordion.css +8 -8
  19. data/sample/gtk-demo/css_accordion.rb +2 -2
  20. data/sample/gtk-demo/css_basics.css +1 -1
  21. data/sample/gtk-demo/css_basics.rb +2 -2
  22. data/sample/gtk-demo/css_multiplebgs.rb +2 -2
  23. data/sample/gtk-demo/css_pixbufs.css +2 -2
  24. data/sample/gtk-demo/css_pixbufs.rb +2 -2
  25. data/sample/gtk-demo/css_shadows.css +5 -5
  26. data/sample/gtk-demo/css_shadows.rb +2 -2
  27. data/sample/gtk-demo/cssview.css +5 -5
  28. data/sample/gtk-demo/data/16x16/gtk3-demo-symbolic.symbolic.png +0 -0
  29. data/sample/gtk-demo/data/16x16/gtk3-demo.png +0 -0
  30. data/sample/gtk-demo/data/22x22/gtk3-demo-symbolic.symbolic.png +0 -0
  31. data/sample/gtk-demo/data/22x22/gtk3-demo.png +0 -0
  32. data/sample/gtk-demo/data/24x24/gtk3-demo-symbolic.symbolic.png +0 -0
  33. data/sample/gtk-demo/data/24x24/gtk3-demo.png +0 -0
  34. data/sample/gtk-demo/data/256x256/gtk3-demo-symbolic.symbolic.png +0 -0
  35. data/sample/gtk-demo/data/256x256/gtk3-demo.png +0 -0
  36. data/sample/gtk-demo/data/32x32/gtk3-demo-symbolic.symbolic.png +0 -0
  37. data/sample/gtk-demo/data/32x32/gtk3-demo.png +0 -0
  38. data/sample/gtk-demo/data/48x48/gtk3-demo-symbolic.symbolic.png +0 -0
  39. data/sample/gtk-demo/data/48x48/gtk3-demo.png +0 -0
  40. data/sample/gtk-demo/data/512x512/gtk3-demo-symbolic.symbolic.png +0 -0
  41. data/sample/gtk-demo/data/512x512/gtk3-demo.png +0 -0
  42. data/sample/gtk-demo/data/source.svg +2886 -0
  43. data/sample/gtk-demo/data/symbolic-source.svg +29 -0
  44. data/sample/gtk-demo/demo.gresource.xml +16 -5
  45. data/sample/gtk-demo/demo.ui +1 -0
  46. data/sample/gtk-demo/font_features.rb +1 -1
  47. data/sample/gtk-demo/main.rb +2 -2
  48. data/sample/gtk-demo/main.ui +18 -36
  49. data/sample/gtk-demo/markup.rb +53 -8
  50. data/sample/gtk-demo/markup.txt +2 -2
  51. data/sample/gtk-demo/org.gtk.Demo.gschema.xml +9 -0
  52. data/sample/gtk-demo/pixbufs.rb +105 -145
  53. data/sample/gtk-demo/reset.css +1 -58
  54. data/sample/gtk-demo/rotated_text.rb +119 -55
  55. data/sample/gtk-demo/shortcuts-boxes.ui +167 -0
  56. data/sample/gtk-demo/shortcuts-builder.ui +547 -0
  57. data/sample/gtk-demo/shortcuts-clocks.ui +166 -0
  58. data/sample/gtk-demo/shortcuts-gedit.ui +172 -0
  59. data/sample/gtk-demo/shortcuts.ui +65 -0
  60. data/sample/gtk-demo/stack.ui +5 -5
  61. data/sample/gtk-demo/textscroll.rb +106 -0
  62. data/sample/gtk-demo/theming.ui +58 -22
  63. data/sample/gtk-demo/theming_style_classes.rb +5 -4
  64. data/sample/gtk-demo/transparent.rb +143 -0
  65. data/sample/misc/aboutdialog.rb +1 -1
  66. data/sample/misc/bindings.rb +36 -15
  67. data/sample/misc/combobox.rb +1 -1
  68. data/sample/misc/dnd.rb +3 -3
  69. data/sample/misc/icons-theme-viewer.rb +1 -1
  70. data/sample/misc/iconview.rb +2 -2
  71. data/sample/misc/textbuffer-serialize.rb +18 -14
  72. data/sample/misc/to-drawable.rb +2 -2
  73. data/sample/misc/tooltips.rb +1 -0
  74. data/sample/misc/treeview.rb +1 -1
  75. data/sample/tutorial/README.md +18 -18
  76. data/test/test-gtk-clipboard.rb +1 -1
  77. data/test/test-gtk-combo-box.rb +2 -2
  78. data/test/test-gtk-icon-view.rb +2 -2
  79. data/test/test-gtk-image.rb +1 -1
  80. data/test/test-gtk-list-store.rb +9 -3
  81. data/test/test-gtk-text-view.rb +64 -0
  82. data/test/test-gtk-tree-path.rb +1 -3
  83. data/test/test-gtk-tree-view.rb +97 -0
  84. data/test/test-gtk-window.rb +2 -2
  85. data/test/test-pango-context.rb +56 -0
  86. metadata +46 -19
@@ -87,6 +87,67 @@ class TestGtkTreeView < Test::Unit::TestCase
87
87
  normalized_data)
88
88
  end
89
89
 
90
+ sub_test_case "#expand_row" do
91
+ setup do
92
+ @parent = @store.append(nil)
93
+ @parent[0] = "parent"
94
+ @child = @store.append(@parent)
95
+ @child[0] = "child"
96
+ @grand_child = @store.append(@child)
97
+ @grand_child[0] = "grand child"
98
+ end
99
+
100
+ test "default" do
101
+ @view.expand_row(@parent.path)
102
+ assert do
103
+ @view.row_expanded?(@parent.path)
104
+ end
105
+ assert do
106
+ @view.row_expanded?(@child.path)
107
+ end
108
+ end
109
+
110
+ test "true" do
111
+ @view.expand_row(@parent.path, true)
112
+ assert do
113
+ @view.row_expanded?(@parent.path)
114
+ end
115
+ assert do
116
+ @view.row_expanded?(@child.path)
117
+ end
118
+ end
119
+
120
+ test "false" do
121
+ @view.expand_row(@parent.path, false)
122
+ assert do
123
+ @view.row_expanded?(@parent.path)
124
+ end
125
+ assert do
126
+ not @view.row_expanded?(@child.path)
127
+ end
128
+ end
129
+
130
+ test ":open_all => true" do
131
+ @view.expand_row(@parent.path, :open_all => true)
132
+ assert do
133
+ @view.row_expanded?(@parent.path)
134
+ end
135
+ assert do
136
+ @view.row_expanded?(@child.path)
137
+ end
138
+ end
139
+
140
+ test ":open_all => false" do
141
+ @view.expand_row(@parent.path, :open_all => false)
142
+ assert do
143
+ @view.row_expanded?(@parent.path)
144
+ end
145
+ assert do
146
+ not @view.row_expanded?(@child.path)
147
+ end
148
+ end
149
+ end
150
+
90
151
  test "#row_expanded?" do
91
152
  parent = @store.append(nil)
92
153
  parent[0] = "Hello"
@@ -129,4 +190,40 @@ class TestGtkTreeView < Test::Unit::TestCase
129
190
  end
130
191
  end
131
192
  end
193
+
194
+ sub_test_case "signal" do
195
+ def setup
196
+ @store = Gtk::TreeStore.new(String)
197
+ @view = Gtk::TreeView.new(@store)
198
+
199
+ root = @store.append(nil)
200
+ root[0] = "root"
201
+ child = @store.append(root)
202
+ child[0] = "child"
203
+ grand_child = @store.append(child)
204
+ grand_child[0] = "grand child"
205
+ end
206
+
207
+ test "row-collapsed" do
208
+ @view.expand_all
209
+
210
+ values = []
211
+ @view.signal_connect("row-collapsed") do |_, iter, path|
212
+ values << iter[0]
213
+ end
214
+ @view.collapse_row(Gtk::TreePath.new("0:0"))
215
+ assert_equal(["child"], values)
216
+ end
217
+
218
+ test "row-expanded" do
219
+ @view.collapse_all
220
+
221
+ values = []
222
+ @view.signal_connect("row-expanded") do |_, iter, path|
223
+ values << iter[0]
224
+ end
225
+ @view.expand_row(Gtk::TreePath.new("0"))
226
+ assert_equal(["root", "child"], values)
227
+ end
228
+ end
132
229
  end
@@ -26,8 +26,8 @@ class TestGtkWindow < Test::Unit::TestCase
26
26
  @window.icon = fixture_path("gnome-logo-icon.png")
27
27
  end
28
28
 
29
- test "Gdk::Pixbuf" do
30
- icon = Gdk::Pixbuf.new(fixture_path("gnome-logo-icon.png"))
29
+ test "GdkPixbuf::Pixbuf" do
30
+ icon = GdkPixbuf::Pixbuf.new(:file => fixture_path("gnome-logo-icon.png"))
31
31
  @window.icon = icon
32
32
  end
33
33
  end
@@ -0,0 +1,56 @@
1
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestPangoContext < Test::Unit::TestCase
18
+ include GtkTestUtils
19
+
20
+ def test_set_shape_renderer
21
+ text = "this is a test"
22
+ label = Gtk::Label.new(text)
23
+ layout = label.layout
24
+
25
+ last_block_arguments = nil
26
+ layout.context.set_shape_renderer do |cr, attr, do_path|
27
+ last_block_arguments = [cr.class, attr.class, do_path]
28
+ end
29
+
30
+ metrics = layout.context.get_metrics(layout.font_description)
31
+ ascent = metrics.ascent
32
+ logical_rect = Pango::Rectangle.new(0, -ascent, ascent, ascent)
33
+ ink_rect = logical_rect.dup
34
+ attrs = Pango::AttrList.new
35
+ attr = Pango::AttrShape.new(ink_rect, logical_rect, "a")
36
+ attr.start_index = text[0, text.index("a")].bytesize
37
+ attr.end_index = attr.start_index + "a".bytesize
38
+ attrs.insert(attr)
39
+ label.attributes = attrs
40
+
41
+ window = Gtk::Window.new
42
+ window.signal_connect("destroy") do
43
+ Gtk.main_quit
44
+ end
45
+ window.add(label)
46
+ GLib::Timeout.add(1000) do
47
+ window.destroy
48
+ GLib::Source::REMOVE
49
+ end
50
+ window.show_all
51
+ Gtk.main
52
+
53
+ assert_equal([Cairo::Context, Pango::AttrShape, false],
54
+ last_block_arguments)
55
+ end
56
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk3
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-03 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
@@ -16,112 +16,112 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.8
19
+ version: 3.0.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.8
26
+ version: 3.0.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gio2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.8
33
+ version: 3.0.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.8
40
+ version: 3.0.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: atk
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.8
47
+ version: 3.0.9
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.8
54
+ version: 3.0.9
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pango
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.8
61
+ version: 3.0.9
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 3.0.8
68
+ version: 3.0.9
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: gdk_pixbuf2
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 3.0.8
75
+ version: 3.0.9
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 3.0.8
82
+ version: 3.0.9
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: gdk3
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 3.0.8
89
+ version: 3.0.9
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 3.0.8
96
+ version: 3.0.9
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: gobject-introspection
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 3.0.8
103
+ version: 3.0.9
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 3.0.8
110
+ version: 3.0.9
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rsvg2
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 3.0.8
117
+ version: 3.0.9
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 3.0.8
124
+ version: 3.0.9
125
125
  description: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
126
126
  email: ruby-gnome2-devel-en@lists.sourceforge.net
127
127
  executables: []
@@ -199,6 +199,7 @@ files:
199
199
  - lib/gtk3/text-buffer.rb
200
200
  - lib/gtk3/text-iter.rb
201
201
  - lib/gtk3/text-tag-table.rb
202
+ - lib/gtk3/text-view.rb
202
203
  - lib/gtk3/toggle-action.rb
203
204
  - lib/gtk3/toggle-button.rb
204
205
  - lib/gtk3/tool-button.rb
@@ -221,6 +222,7 @@ files:
221
222
  - sample/gtk-demo/alphatest.png
222
223
  - sample/gtk-demo/apple-red.png
223
224
  - sample/gtk-demo/application.ui
225
+ - sample/gtk-demo/appmenu.ui
224
226
  - sample/gtk-demo/assistant.rb
225
227
  - sample/gtk-demo/background.jpg
226
228
  - sample/gtk-demo/brick.png
@@ -270,6 +272,22 @@ files:
270
272
  - sample/gtk-demo/css_shadows.rb
271
273
  - sample/gtk-demo/cssview.css
272
274
  - sample/gtk-demo/cursors.rb
275
+ - sample/gtk-demo/data/16x16/gtk3-demo-symbolic.symbolic.png
276
+ - sample/gtk-demo/data/16x16/gtk3-demo.png
277
+ - sample/gtk-demo/data/22x22/gtk3-demo-symbolic.symbolic.png
278
+ - sample/gtk-demo/data/22x22/gtk3-demo.png
279
+ - sample/gtk-demo/data/24x24/gtk3-demo-symbolic.symbolic.png
280
+ - sample/gtk-demo/data/24x24/gtk3-demo.png
281
+ - sample/gtk-demo/data/256x256/gtk3-demo-symbolic.symbolic.png
282
+ - sample/gtk-demo/data/256x256/gtk3-demo.png
283
+ - sample/gtk-demo/data/32x32/gtk3-demo-symbolic.symbolic.png
284
+ - sample/gtk-demo/data/32x32/gtk3-demo.png
285
+ - sample/gtk-demo/data/48x48/gtk3-demo-symbolic.symbolic.png
286
+ - sample/gtk-demo/data/48x48/gtk3-demo.png
287
+ - sample/gtk-demo/data/512x512/gtk3-demo-symbolic.symbolic.png
288
+ - sample/gtk-demo/data/512x512/gtk3-demo.png
289
+ - sample/gtk-demo/data/source.svg
290
+ - sample/gtk-demo/data/symbolic-source.svg
273
291
  - sample/gtk-demo/decor1.png
274
292
  - sample/gtk-demo/decor2.png
275
293
  - sample/gtk-demo/default_cursor.png
@@ -355,6 +373,11 @@ files:
355
373
  - sample/gtk-demo/scale.ui
356
374
  - sample/gtk-demo/se_resize_cursor.png
357
375
  - sample/gtk-demo/search_entry2.rb
376
+ - sample/gtk-demo/shortcuts-boxes.ui
377
+ - sample/gtk-demo/shortcuts-builder.ui
378
+ - sample/gtk-demo/shortcuts-clocks.ui
379
+ - sample/gtk-demo/shortcuts-gedit.ui
380
+ - sample/gtk-demo/shortcuts.ui
358
381
  - sample/gtk-demo/sidebar.rb
359
382
  - sample/gtk-demo/sizegroup.rb
360
383
  - sample/gtk-demo/spinbutton.ui
@@ -366,9 +389,11 @@ files:
366
389
  - sample/gtk-demo/test_mod.rb
367
390
  - sample/gtk-demo/text_cursor.png
368
391
  - sample/gtk-demo/textmask.rb
392
+ - sample/gtk-demo/textscroll.rb
369
393
  - sample/gtk-demo/textview.rb
370
394
  - sample/gtk-demo/theming.ui
371
395
  - sample/gtk-demo/theming_style_classes.rb
396
+ - sample/gtk-demo/transparent.rb
372
397
  - sample/gtk-demo/tree_store.rb
373
398
  - sample/gtk-demo/vertical_text_cursor.png
374
399
  - sample/gtk-demo/w_resize_cursor.png
@@ -599,6 +624,7 @@ files:
599
624
  - test/test-gtk-target-entry.rb
600
625
  - test/test-gtk-text-buffer.rb
601
626
  - test/test-gtk-text-tag-table.rb
627
+ - test/test-gtk-text-view.rb
602
628
  - test/test-gtk-toggle-action.rb
603
629
  - test/test-gtk-toggle-button.rb
604
630
  - test/test-gtk-tool-button.rb
@@ -614,6 +640,7 @@ files:
614
640
  - test/test-gtk-widget.rb
615
641
  - test/test-gtk-window.rb
616
642
  - test/test-gtk.rb
643
+ - test/test-pango-context.rb
617
644
  homepage: http://ruby-gnome2.sourceforge.jp/
618
645
  licenses:
619
646
  - LGPLv2.1+
@@ -626,7 +653,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
626
653
  requirements:
627
654
  - - ">="
628
655
  - !ruby/object:Gem::Version
629
- version: 1.9.3
656
+ version: 2.1.0
630
657
  required_rubygems_version: !ruby/object:Gem::Requirement
631
658
  requirements:
632
659
  - - ">="