gtk3 3.0.7 → 3.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gtk3/extconf.rb +1 -0
- data/ext/gtk3/rb-gtk3-tree-view.c +4 -0
- data/ext/gtk3/rb-gtk3.c +245 -60
- data/lib/gtk3/box.rb +22 -0
- data/lib/gtk3/builder.rb +50 -29
- data/lib/gtk3/deprecated.rb +7 -0
- data/lib/gtk3/entry-buffer.rb +28 -0
- data/lib/gtk3/list-store.rb +2 -20
- data/lib/gtk3/loader.rb +6 -0
- data/lib/gtk3/menu-item.rb +8 -7
- data/lib/gtk3/tree-iter.rb +25 -1
- data/lib/gtk3/tree-model.rb +41 -0
- data/lib/gtk3/tree-store.rb +7 -6
- data/lib/gtk3/widget.rb +18 -1
- data/sample/gtk-demo/TODO +45 -39
- data/sample/gtk-demo/assistant.rb +123 -0
- data/sample/gtk-demo/builder.rb +75 -38
- data/sample/gtk-demo/button_box.rb +100 -0
- data/sample/gtk-demo/colorsel.rb +49 -65
- data/sample/gtk-demo/css_accordion.rb +33 -55
- data/sample/gtk-demo/css_basics.rb +55 -80
- data/sample/gtk-demo/css_multiplebgs.rb +112 -0
- data/sample/gtk-demo/css_pixbufs.rb +84 -0
- data/sample/gtk-demo/css_shadows.rb +101 -0
- data/sample/gtk-demo/cursors.rb +114 -0
- data/sample/gtk-demo/dialog.rb +105 -115
- data/sample/gtk-demo/entry_buffer.rb +44 -0
- data/sample/gtk-demo/entry_completion.rb +40 -52
- data/sample/gtk-demo/expander.rb +60 -26
- data/sample/gtk-demo/filtermodel.rb +119 -0
- data/sample/gtk-demo/font_features.rb +117 -0
- data/sample/gtk-demo/headerbar.rb +57 -0
- data/sample/gtk-demo/iconview_edit.rb +79 -0
- data/sample/gtk-demo/infobar.rb +75 -59
- data/sample/gtk-demo/links.rb +53 -40
- data/sample/gtk-demo/main.rb +353 -43
- data/sample/gtk-demo/main.ui +9 -9
- data/sample/gtk-demo/markup.rb +46 -0
- data/sample/gtk-demo/menus.rb +111 -162
- data/sample/gtk-demo/modelbutton.rb +47 -0
- data/sample/gtk-demo/overlay.rb +61 -0
- data/sample/gtk-demo/overlay2.rb +75 -0
- data/sample/gtk-demo/panes.rb +114 -133
- data/sample/gtk-demo/pickers.rb +70 -0
- data/sample/gtk-demo/popover.rb +110 -0
- data/sample/gtk-demo/printing.rb +68 -83
- data/sample/gtk-demo/revealer.rb +53 -0
- data/sample/gtk-demo/scale.rb +26 -0
- data/sample/gtk-demo/search_entry2.rb +107 -0
- data/sample/gtk-demo/sidebar.rb +68 -0
- data/sample/gtk-demo/sizegroup.rb +93 -105
- data/sample/gtk-demo/spinner.rb +53 -50
- data/sample/gtk-demo/stack.rb +28 -0
- data/sample/gtk-demo/test_mod.rb +22 -0
- data/sample/gtk-demo/textmask.rb +61 -0
- data/sample/gtk-demo/theming_style_classes.rb +16 -12
- data/sample/misc/app-menu.ui +19 -0
- data/sample/misc/button-menu.ui +19 -0
- data/sample/misc/icons-theme-viewer.rb +65 -0
- data/sample/misc/menu.rb +3 -3
- data/sample/misc/menus_from_resources.gresource.xml +8 -0
- data/sample/misc/menus_from_resources.rb +91 -0
- data/sample/misc/statusicon.rb +1 -1
- data/sample/misc/toolbar-menu.ui +23 -0
- data/sample/misc/treestore.rb +63 -0
- data/sample/tutorial/README.md +368 -6
- data/test/test-gtk-box.rb +13 -0
- data/test/test-gtk-builder.rb +1 -1
- data/test/test-gtk-clipboard.rb +124 -0
- data/test/test-gtk-container.rb +3 -3
- data/test/test-gtk-entry-buffer.rb +32 -0
- data/test/test-gtk-list-store.rb +30 -12
- data/test/test-gtk-menu.rb +32 -0
- data/test/test-gtk-tree-iter.rb +61 -5
- data/test/test-gtk-tree-path.rb +26 -1
- data/test/test-gtk-tree-sortable.rb +35 -0
- data/test/test-gtk-tree-store.rb +34 -0
- data/test/test-gtk-widget.rb +33 -2
- metadata +55 -19
- data/sample/gtk-demo/button-box.rb +0 -82
@@ -0,0 +1,34 @@
|
|
1
|
+
# Copyright (C) 2015 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 TestGtkTreeStore < Test::Unit::TestCase
|
18
|
+
include GtkTestUtils
|
19
|
+
|
20
|
+
sub_test_case "#insert" do
|
21
|
+
test "no values" do
|
22
|
+
store = Gtk::TreeStore.new(String)
|
23
|
+
iter = store.insert(nil, -1)
|
24
|
+
iter[0] = "xxx"
|
25
|
+
assert_equal("xxx", iter[0])
|
26
|
+
end
|
27
|
+
|
28
|
+
test "with values" do
|
29
|
+
store = Gtk::TreeStore.new(String, Integer)
|
30
|
+
iter = store.insert(nil, -1, {0 => "xxx", 1 => 29})
|
31
|
+
assert_equal(["xxx", 29], [iter[0], iter[1]])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/test/test-gtk-widget.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2008-
|
1
|
+
# Copyright (C) 2008-2016 Ruby-GNOME2 Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -137,6 +137,37 @@ class TestGtkWidget < Test::Unit::TestCase
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
+
sub_test_case "#translate_coordinates" do
|
141
|
+
test "no common toplevel" do
|
142
|
+
win1 = Gtk::Window.new(:toplevel)
|
143
|
+
label1 = Gtk::Label.new("one")
|
144
|
+
win1.add(label1)
|
145
|
+
win1.show_all
|
146
|
+
|
147
|
+
win2 = Gtk::Window.new(:toplevel)
|
148
|
+
label2 = Gtk::Label.new("one")
|
149
|
+
win2.add(label2)
|
150
|
+
win2.show_all
|
151
|
+
|
152
|
+
assert_nil(label1.translate_coordinates(label2, 0, 0))
|
153
|
+
end
|
154
|
+
|
155
|
+
test "not realized" do
|
156
|
+
win1 = Gtk::Window.new(:toplevel)
|
157
|
+
label1 = Gtk::Label.new("one")
|
158
|
+
win1.add(label1)
|
159
|
+
assert_nil(label1.translate_coordinates(win1, 0, 0))
|
160
|
+
end
|
161
|
+
|
162
|
+
test "translated" do
|
163
|
+
win1 = Gtk::Window.new(:toplevel)
|
164
|
+
label1 = Gtk::Label.new("one")
|
165
|
+
win1.add(label1)
|
166
|
+
win1.show_all
|
167
|
+
assert_equal([0, 0], label1.translate_coordinates(win1, 0, 0))
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
140
171
|
sub_test_case "predicates" do
|
141
172
|
test "#in_destruction?" do
|
142
173
|
entry = Gtk::Entry.new
|
@@ -155,7 +186,7 @@ class TestGtkWidget < Test::Unit::TestCase
|
|
155
186
|
|
156
187
|
sub_test_case ".bind_template_child" do
|
157
188
|
setup do
|
158
|
-
only_gtk_version(3,
|
189
|
+
only_gtk_version(3, 12, 0)
|
159
190
|
@resource_data = File.read(fixture_path("simple_window.ui"))
|
160
191
|
end
|
161
192
|
|
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.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glib2
|
@@ -16,98 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.0.8
|
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.
|
26
|
+
version: 3.0.8
|
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.
|
33
|
+
version: 3.0.8
|
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.
|
40
|
+
version: 3.0.8
|
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.
|
47
|
+
version: 3.0.8
|
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.
|
54
|
+
version: 3.0.8
|
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.
|
61
|
+
version: 3.0.8
|
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.
|
68
|
+
version: 3.0.8
|
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.
|
75
|
+
version: 3.0.8
|
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.
|
82
|
+
version: 3.0.8
|
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.
|
89
|
+
version: 3.0.8
|
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.
|
96
|
+
version: 3.0.8
|
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.
|
103
|
+
version: 3.0.8
|
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.
|
110
|
+
version: 3.0.8
|
111
111
|
description: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
|
112
112
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
113
113
|
executables: []
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- lib/gtk3/css-provider.rb
|
148
148
|
- lib/gtk3/deprecated.rb
|
149
149
|
- lib/gtk3/dialog.rb
|
150
|
+
- lib/gtk3/entry-buffer.rb
|
150
151
|
- lib/gtk3/file-chooser-dialog.rb
|
151
152
|
- lib/gtk3/font-chooser-dialog.rb
|
152
153
|
- lib/gtk3/gdk-drag-context.rb
|
@@ -205,11 +206,12 @@ files:
|
|
205
206
|
- sample/gtk-demo/alphatest.png
|
206
207
|
- sample/gtk-demo/apple-red.png
|
207
208
|
- sample/gtk-demo/application.ui
|
209
|
+
- sample/gtk-demo/assistant.rb
|
208
210
|
- sample/gtk-demo/background.jpg
|
209
211
|
- sample/gtk-demo/brick.png
|
210
212
|
- sample/gtk-demo/brick2.png
|
211
213
|
- sample/gtk-demo/builder.rb
|
212
|
-
- sample/gtk-demo/
|
214
|
+
- sample/gtk-demo/button_box.rb
|
213
215
|
- sample/gtk-demo/cairo-arc-negative.rb
|
214
216
|
- sample/gtk-demo/cairo-arc.rb
|
215
217
|
- sample/gtk-demo/cairo-clip-image.rb
|
@@ -246,9 +248,13 @@ files:
|
|
246
248
|
- sample/gtk-demo/css_basics.css
|
247
249
|
- sample/gtk-demo/css_basics.rb
|
248
250
|
- sample/gtk-demo/css_multiplebgs.css
|
251
|
+
- sample/gtk-demo/css_multiplebgs.rb
|
249
252
|
- sample/gtk-demo/css_pixbufs.css
|
253
|
+
- sample/gtk-demo/css_pixbufs.rb
|
250
254
|
- sample/gtk-demo/css_shadows.css
|
255
|
+
- sample/gtk-demo/css_shadows.rb
|
251
256
|
- sample/gtk-demo/cssview.css
|
257
|
+
- sample/gtk-demo/cursors.rb
|
252
258
|
- sample/gtk-demo/decor1.png
|
253
259
|
- sample/gtk-demo/decor2.png
|
254
260
|
- sample/gtk-demo/default_cursor.png
|
@@ -258,12 +264,15 @@ files:
|
|
258
264
|
- sample/gtk-demo/drawingarea.rb
|
259
265
|
- sample/gtk-demo/e_resize_cursor.png
|
260
266
|
- sample/gtk-demo/editable_cells.rb
|
267
|
+
- sample/gtk-demo/entry_buffer.rb
|
261
268
|
- sample/gtk-demo/entry_completion.rb
|
262
269
|
- sample/gtk-demo/ew_resize_cursor.png
|
263
270
|
- sample/gtk-demo/expander.rb
|
271
|
+
- sample/gtk-demo/filtermodel.rb
|
264
272
|
- sample/gtk-demo/filtermodel.ui
|
265
273
|
- sample/gtk-demo/floppybuddy.gif
|
266
274
|
- sample/gtk-demo/font-features.ui
|
275
|
+
- sample/gtk-demo/font_features.rb
|
267
276
|
- sample/gtk-demo/glarea-fragment.glsl
|
268
277
|
- sample/gtk-demo/glarea-vertex.glsl
|
269
278
|
- sample/gtk-demo/gnome-applets.png
|
@@ -279,9 +288,11 @@ files:
|
|
279
288
|
- sample/gtk-demo/grabbing_cursor.png
|
280
289
|
- sample/gtk-demo/gtk-logo-rgb.gif
|
281
290
|
- sample/gtk-demo/hand_cursor.png
|
291
|
+
- sample/gtk-demo/headerbar.rb
|
282
292
|
- sample/gtk-demo/help_cursor.png
|
283
293
|
- sample/gtk-demo/hypertext.rb
|
284
294
|
- sample/gtk-demo/iconview.rb
|
295
|
+
- sample/gtk-demo/iconview_edit.rb
|
285
296
|
- sample/gtk-demo/images.rb
|
286
297
|
- sample/gtk-demo/infobar.rb
|
287
298
|
- sample/gtk-demo/item_factory.rb
|
@@ -290,10 +301,12 @@ files:
|
|
290
301
|
- sample/gtk-demo/listbox.ui
|
291
302
|
- sample/gtk-demo/main.rb
|
292
303
|
- sample/gtk-demo/main.ui
|
304
|
+
- sample/gtk-demo/markup.rb
|
293
305
|
- sample/gtk-demo/markup.txt
|
294
306
|
- sample/gtk-demo/menus.rb
|
295
307
|
- sample/gtk-demo/menus.ui
|
296
308
|
- sample/gtk-demo/messages.txt
|
309
|
+
- sample/gtk-demo/modelbutton.rb
|
297
310
|
- sample/gtk-demo/modelbutton.ui
|
298
311
|
- sample/gtk-demo/move_cursor.png
|
299
312
|
- sample/gtk-demo/n_resize_cursor.png
|
@@ -306,27 +319,38 @@ files:
|
|
306
319
|
- sample/gtk-demo/nw_resize_cursor.png
|
307
320
|
- sample/gtk-demo/nwse_resize_cursor.png
|
308
321
|
- sample/gtk-demo/org.gtk.Demo.gschema.xml
|
322
|
+
- sample/gtk-demo/overlay.rb
|
323
|
+
- sample/gtk-demo/overlay2.rb
|
309
324
|
- sample/gtk-demo/panes.rb
|
325
|
+
- sample/gtk-demo/pickers.rb
|
310
326
|
- sample/gtk-demo/pixbufs.rb
|
311
327
|
- sample/gtk-demo/pointer_cursor.png
|
328
|
+
- sample/gtk-demo/popover.rb
|
312
329
|
- sample/gtk-demo/popover.ui
|
313
330
|
- sample/gtk-demo/printing.rb
|
314
331
|
- sample/gtk-demo/progress_cursor.png
|
315
332
|
- sample/gtk-demo/reset.css
|
333
|
+
- sample/gtk-demo/revealer.rb
|
316
334
|
- sample/gtk-demo/revealer.ui
|
317
335
|
- sample/gtk-demo/rotated_text.rb
|
318
336
|
- sample/gtk-demo/row_resize_cursor.png
|
319
337
|
- sample/gtk-demo/ruby-gnome2-logo.png
|
320
338
|
- sample/gtk-demo/s_resize_cursor.png
|
339
|
+
- sample/gtk-demo/scale.rb
|
321
340
|
- sample/gtk-demo/scale.ui
|
322
341
|
- sample/gtk-demo/se_resize_cursor.png
|
342
|
+
- sample/gtk-demo/search_entry2.rb
|
343
|
+
- sample/gtk-demo/sidebar.rb
|
323
344
|
- sample/gtk-demo/sizegroup.rb
|
324
345
|
- sample/gtk-demo/spinbutton.ui
|
325
346
|
- sample/gtk-demo/spinner.rb
|
347
|
+
- sample/gtk-demo/stack.rb
|
326
348
|
- sample/gtk-demo/stack.ui
|
327
349
|
- sample/gtk-demo/stock_browser.rb
|
328
350
|
- sample/gtk-demo/sw_resize_cursor.png
|
351
|
+
- sample/gtk-demo/test_mod.rb
|
329
352
|
- sample/gtk-demo/text_cursor.png
|
353
|
+
- sample/gtk-demo/textmask.rb
|
330
354
|
- sample/gtk-demo/textview.rb
|
331
355
|
- sample/gtk-demo/theming.ui
|
332
356
|
- sample/gtk-demo/theming_style_classes.rb
|
@@ -339,12 +363,14 @@ files:
|
|
339
363
|
- sample/misc/aboutdialog.rb
|
340
364
|
- sample/misc/aboutdialog2.rb
|
341
365
|
- sample/misc/alpha-demo.rb
|
366
|
+
- sample/misc/app-menu.ui
|
342
367
|
- sample/misc/application.rb
|
343
368
|
- sample/misc/assistant.rb
|
344
369
|
- sample/misc/bindings.rb
|
345
370
|
- sample/misc/builder-from-resource.rb
|
346
371
|
- sample/misc/builder.rb
|
347
372
|
- sample/misc/builder.ui
|
373
|
+
- sample/misc/button-menu.ui
|
348
374
|
- sample/misc/button.rb
|
349
375
|
- sample/misc/button2.rb
|
350
376
|
- sample/misc/buttonbox.rb
|
@@ -375,6 +401,7 @@ files:
|
|
375
401
|
- sample/misc/gtkglarea1.rb
|
376
402
|
- sample/misc/gtkglarea2.rb
|
377
403
|
- sample/misc/helloworld.rb
|
404
|
+
- sample/misc/icons-theme-viewer.rb
|
378
405
|
- sample/misc/iconview.rb
|
379
406
|
- sample/misc/image.rb
|
380
407
|
- sample/misc/keyboard-grab.rb
|
@@ -383,6 +410,8 @@ files:
|
|
383
410
|
- sample/misc/list-store-usage.rb
|
384
411
|
- sample/misc/listview.rb
|
385
412
|
- sample/misc/menu.rb
|
413
|
+
- sample/misc/menus_from_resources.gresource.xml
|
414
|
+
- sample/misc/menus_from_resources.rb
|
386
415
|
- sample/misc/misc-button.rb
|
387
416
|
- sample/misc/mouse-gesture.rb
|
388
417
|
- sample/misc/pango-layout.rb
|
@@ -408,11 +437,13 @@ files:
|
|
408
437
|
- sample/misc/threads.rb
|
409
438
|
- sample/misc/to-drawable.rb
|
410
439
|
- sample/misc/togglebutton.rb
|
440
|
+
- sample/misc/toolbar-menu.ui
|
411
441
|
- sample/misc/toolbar.rb
|
412
442
|
- sample/misc/tooltips.rb
|
413
443
|
- sample/misc/tree-combo.rb
|
414
444
|
- sample/misc/tree-progress.rb
|
415
445
|
- sample/misc/treemodelfilter.rb
|
446
|
+
- sample/misc/treestore.rb
|
416
447
|
- sample/misc/treeview.rb
|
417
448
|
- sample/misc/window.rb
|
418
449
|
- sample/misc/xbm-cursor.rb
|
@@ -501,12 +532,14 @@ files:
|
|
501
532
|
- test/test-gtk-builder.rb
|
502
533
|
- test/test-gtk-button.rb
|
503
534
|
- test/test-gtk-cell-layout.rb
|
535
|
+
- test/test-gtk-clipboard.rb
|
504
536
|
- test/test-gtk-color-chooser-dialog.rb
|
505
537
|
- test/test-gtk-combo-box-text.rb
|
506
538
|
- test/test-gtk-combo-box.rb
|
507
539
|
- test/test-gtk-container.rb
|
508
540
|
- test/test-gtk-css-provider.rb
|
509
541
|
- test/test-gtk-dialog.rb
|
542
|
+
- test/test-gtk-entry-buffer.rb
|
510
543
|
- test/test-gtk-entry.rb
|
511
544
|
- test/test-gtk-event-controller.rb
|
512
545
|
- test/test-gtk-file-chooser-dialog.rb
|
@@ -526,6 +559,7 @@ files:
|
|
526
559
|
- test/test-gtk-list-store.rb
|
527
560
|
- test/test-gtk-menu-button.rb
|
528
561
|
- test/test-gtk-menu-item.rb
|
562
|
+
- test/test-gtk-menu.rb
|
529
563
|
- test/test-gtk-message-dialog.rb
|
530
564
|
- test/test-gtk-paned.rb
|
531
565
|
- test/test-gtk-places-sidebar.rb
|
@@ -557,6 +591,8 @@ files:
|
|
557
591
|
- test/test-gtk-tree-model-filter.rb
|
558
592
|
- test/test-gtk-tree-path.rb
|
559
593
|
- test/test-gtk-tree-selection.rb
|
594
|
+
- test/test-gtk-tree-sortable.rb
|
595
|
+
- test/test-gtk-tree-store.rb
|
560
596
|
- test/test-gtk-tree-view-column.rb
|
561
597
|
- test/test-gtk-tree-view.rb
|
562
598
|
- test/test-gtk-version.rb
|
@@ -565,7 +601,7 @@ files:
|
|
565
601
|
- test/test-gtk.rb
|
566
602
|
homepage: http://ruby-gnome2.sourceforge.jp/
|
567
603
|
licenses:
|
568
|
-
- LGPLv2.1
|
604
|
+
- LGPLv2.1+
|
569
605
|
metadata: {}
|
570
606
|
post_install_message:
|
571
607
|
rdoc_options: []
|
@@ -583,7 +619,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
583
619
|
version: '0'
|
584
620
|
requirements: []
|
585
621
|
rubyforge_project:
|
586
|
-
rubygems_version: 2.
|
622
|
+
rubygems_version: 2.5.1
|
587
623
|
signing_key:
|
588
624
|
specification_version: 4
|
589
625
|
summary: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
|
@@ -1,82 +0,0 @@
|
|
1
|
-
# Copyright (c) 2003-2015 Ruby-GNOME2 Project Team
|
2
|
-
# This program is licenced under the same licence as Ruby-GNOME2.
|
3
|
-
#
|
4
|
-
=begin
|
5
|
-
= Button Boxes
|
6
|
-
|
7
|
-
The Button Box widgets are used to arrange buttons with padding.
|
8
|
-
=end
|
9
|
-
require "common"
|
10
|
-
|
11
|
-
module Demo
|
12
|
-
class ButtonBox < BasicWindow
|
13
|
-
def initialize
|
14
|
-
super("Button Boxes")
|
15
|
-
set_border_width(10)
|
16
|
-
|
17
|
-
main_vbox = Gtk::Box.new(:vertical)
|
18
|
-
add(main_vbox)
|
19
|
-
|
20
|
-
frame_horiz = Gtk::Frame.new("Horizontal Button Boxes")
|
21
|
-
main_vbox.pack_start(frame_horiz, :expand => true, :fill => true, :padding => 10)
|
22
|
-
|
23
|
-
vbox = Gtk::Box.new(:vertical)
|
24
|
-
vbox.set_border_width(10)
|
25
|
-
frame_horiz.add(vbox)
|
26
|
-
|
27
|
-
vbox.pack_start(create_bbox(true, "Spread", 40, :spread),
|
28
|
-
:expand => true, :fill => true, :padding => 0)
|
29
|
-
|
30
|
-
vbox.pack_start(create_bbox(true, "Edge", 40, :edge),
|
31
|
-
:expand => true, :fill => true, :padding => 5)
|
32
|
-
|
33
|
-
vbox.pack_start(create_bbox(true, "Start", 40, :start),
|
34
|
-
:expand => true, :fill => true, :padding => 5)
|
35
|
-
|
36
|
-
vbox.pack_start(create_bbox(true, "End", 40, :end),
|
37
|
-
:expand => true, :fill => true, :padding => 5)
|
38
|
-
|
39
|
-
frame_vert = Gtk::Frame.new("Vertical Button Boxes")
|
40
|
-
main_vbox.pack_start(frame_vert, :expand => true, :fill => true, :padding => 10)
|
41
|
-
|
42
|
-
hbox = Gtk::Box.new(:horizontal, 0)
|
43
|
-
hbox.set_border_width(10)
|
44
|
-
frame_vert.add(hbox)
|
45
|
-
|
46
|
-
hbox.pack_start(create_bbox(false, "Spread", 30, :spread),
|
47
|
-
:expand => true, :fill => true, :padding => 0)
|
48
|
-
|
49
|
-
hbox.pack_start(create_bbox(false, "Edge", 30, :edge),
|
50
|
-
:expand => true, :fill => true, :padding => 5)
|
51
|
-
|
52
|
-
hbox.pack_start(create_bbox(false, "Start", 30, :start),
|
53
|
-
:expand => true, :fill => true, :padding => 5)
|
54
|
-
|
55
|
-
hbox.pack_start(create_bbox(false, "End", 30, :end),
|
56
|
-
:expand => true, :fill => true, :padding => 5)
|
57
|
-
end
|
58
|
-
|
59
|
-
def create_bbox(horizontal, title, spacing, layout)
|
60
|
-
frame = Gtk::Frame.new(title)
|
61
|
-
|
62
|
-
bbox = if horizontal
|
63
|
-
Gtk::ButtonBox.new(:horizontal)
|
64
|
-
else
|
65
|
-
Gtk::ButtonBox.new(:vertical)
|
66
|
-
end
|
67
|
-
|
68
|
-
bbox.set_border_width(5)
|
69
|
-
frame.add(bbox)
|
70
|
-
|
71
|
-
bbox.layout_style = layout
|
72
|
-
bbox.set_spacing(spacing)
|
73
|
-
|
74
|
-
%w(OK(_O) Cancel(_C) Help(_H)).each do |name|
|
75
|
-
button = Gtk::Button.new(:label => name, :use_underline => true)
|
76
|
-
bbox.add(button)
|
77
|
-
end
|
78
|
-
|
79
|
-
frame
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|