gtk3 1.2.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +17 -15
- data/ext/gtk3/rbgtk-tree-model.c +12 -0
- data/lib/gtk3/base.rb +1 -1
- data/sample/gtk-demo/appwindow.rb +2 -2
- data/sample/gtk-demo/button_box.rb +35 -36
- data/sample/gtk-demo/cairo-operator.rb +2 -2
- data/sample/gtk-demo/changedisplay.rb +138 -139
- data/sample/gtk-demo/clipboard.rb +13 -18
- data/sample/gtk-demo/colorsel.rb +3 -3
- data/sample/gtk-demo/common.rb +1 -1
- data/sample/gtk-demo/dialog.rb +13 -13
- data/sample/gtk-demo/drawingarea.rb +6 -6
- data/sample/gtk-demo/editable_cells.rb +8 -7
- data/sample/gtk-demo/entry_completion.rb +3 -3
- data/sample/gtk-demo/expander.rb +10 -8
- data/sample/gtk-demo/hypertext.rb +4 -4
- data/sample/gtk-demo/iconview.rb +31 -30
- data/sample/gtk-demo/images.rb +10 -10
- data/sample/gtk-demo/infobar.rb +78 -0
- data/sample/gtk-demo/item_factory.rb +4 -4
- data/sample/gtk-demo/links.rb +53 -0
- data/sample/gtk-demo/list_store.rb +3 -3
- data/sample/gtk-demo/main.rb +23 -21
- data/sample/gtk-demo/menus.rb +6 -6
- data/sample/gtk-demo/panes.rb +6 -6
- data/sample/gtk-demo/sizegroup.rb +4 -4
- data/sample/gtk-demo/spinner.rb +59 -0
- data/sample/gtk-demo/stock_browser.rb +10 -10
- data/sample/gtk-demo/textview.rb +10 -10
- data/sample/gtk-demo/tree_store.rb +4 -4
- metadata +17 -14
@@ -30,12 +30,12 @@ module Demo
|
|
30
30
|
|
31
31
|
self.border_width = 8
|
32
32
|
|
33
|
-
hbox = Gtk::
|
33
|
+
hbox = Gtk::Box.new(:horizontal, 8)
|
34
34
|
add(hbox)
|
35
35
|
|
36
36
|
sw = Gtk::ScrolledWindow.new
|
37
|
-
sw.set_policy(Gtk::POLICY_NEVER,
|
38
|
-
hbox.pack_start(sw, false, false, 0)
|
37
|
+
sw.set_policy(Gtk::POLICY_NEVER, :automatic)
|
38
|
+
hbox.pack_start(sw, :expand => false, :fill => false, :padding => 0)
|
39
39
|
|
40
40
|
model = create_model
|
41
41
|
|
@@ -46,11 +46,11 @@ module Demo
|
|
46
46
|
column.title = 'Const'
|
47
47
|
|
48
48
|
cell_renderer = Gtk::CellRendererPixbuf.new
|
49
|
-
column.pack_start(cell_renderer, false)
|
49
|
+
column.pack_start(cell_renderer, :expand => false)
|
50
50
|
column.set_attributes(cell_renderer, "stock_id" => 1)
|
51
51
|
|
52
52
|
cell_renderer = Gtk::CellRendererText.new
|
53
|
-
column.pack_start(cell_renderer, true)
|
53
|
+
column.pack_start(cell_renderer, :expand => true)
|
54
54
|
column.set_cell_data_func(cell_renderer) do |column, cell, model, iter|
|
55
55
|
cell.text = iter[0].const
|
56
56
|
end
|
@@ -98,13 +98,13 @@ module Demo
|
|
98
98
|
display.label_accel_label = Gtk::Label.new
|
99
99
|
display.icon_image = Gtk::Image.new # empty image
|
100
100
|
|
101
|
-
vbox.pack_start(display.type_label, false, false, 0)
|
101
|
+
vbox.pack_start(display.type_label, :expand => false, :fill => false, :padding => 0)
|
102
102
|
|
103
|
-
vbox.pack_start(display.icon_image, false, false, 0)
|
103
|
+
vbox.pack_start(display.icon_image, :expand => false, :fill => false, :padding => 0)
|
104
104
|
|
105
|
-
vbox.pack_start(display.label_accel_label, false, false, 0)
|
106
|
-
vbox.pack_start(display.const_label, false, false, 0)
|
107
|
-
vbox.pack_start(display.id_label, false, false, 0)
|
105
|
+
vbox.pack_start(display.label_accel_label, :expand => false, :fill => false, :padding => 0)
|
106
|
+
vbox.pack_start(display.const_label, :expand => false, :fill => false, :padding => 0)
|
107
|
+
vbox.pack_start(display.id_label, :expand => false, :fill => false, :padding => 0)
|
108
108
|
|
109
109
|
selection = treeview.selection
|
110
110
|
selection.mode = Gtk::SELECTION_SINGLE
|
data/sample/gtk-demo/textview.rb
CHANGED
@@ -43,15 +43,15 @@ module Demo
|
|
43
43
|
view2 = Gtk::TextView.new(buffer)
|
44
44
|
|
45
45
|
sw = Gtk::ScrolledWindow.new(nil, nil)
|
46
|
-
sw.set_policy(
|
47
|
-
|
46
|
+
sw.set_policy(:automatic,
|
47
|
+
:automatic)
|
48
48
|
vpaned.add1(sw)
|
49
49
|
|
50
50
|
sw.add(view1)
|
51
51
|
|
52
52
|
sw = Gtk::ScrolledWindow.new(nil, nil)
|
53
|
-
sw.set_policy(
|
54
|
-
|
53
|
+
sw.set_policy(:automatic,
|
54
|
+
:automatic)
|
55
55
|
vpaned.add2(sw)
|
56
56
|
|
57
57
|
sw.add(view2)
|
@@ -136,13 +136,13 @@ module Demo
|
|
136
136
|
"editable" => false)
|
137
137
|
|
138
138
|
buffer.create_tag("word_wrap",
|
139
|
-
"wrap_mode" =>
|
139
|
+
"wrap_mode" => :word)
|
140
140
|
|
141
141
|
buffer.create_tag("char_wrap",
|
142
142
|
"wrap_mode" => Gtk::TextTag::WRAP_CHAR)
|
143
143
|
|
144
144
|
buffer.create_tag("no_wrap",
|
145
|
-
"wrap_mode" =>
|
145
|
+
"wrap_mode" => :none)
|
146
146
|
|
147
147
|
buffer.create_tag("center",
|
148
148
|
"justification" => Gtk::JUSTIFY_CENTER)
|
@@ -172,7 +172,7 @@ module Demo
|
|
172
172
|
"size" => 8 * Pango::SCALE) # 8 points
|
173
173
|
|
174
174
|
buffer.create_tag("rtl_quote",
|
175
|
-
"wrap_mode" =>
|
175
|
+
"wrap_mode" => :word,
|
176
176
|
"direction" => Gtk::Widget::TEXT_DIR_RTL,
|
177
177
|
"indent" => 30,
|
178
178
|
"left_margin" => 20,
|
@@ -203,7 +203,7 @@ module Demo
|
|
203
203
|
# iterator to point to just after the inserted text.
|
204
204
|
#
|
205
205
|
|
206
|
-
iter = buffer.
|
206
|
+
iter = buffer.get_iter_at(:offset => 0)
|
207
207
|
|
208
208
|
buffer.insert(iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n")
|
209
209
|
|
@@ -362,8 +362,8 @@ module Demo
|
|
362
362
|
|
363
363
|
@@nest_window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
|
364
364
|
sw = Gtk::ScrolledWindow.new(nil, nil)
|
365
|
-
sw.set_policy(
|
366
|
-
|
365
|
+
sw.set_policy(:automatic,
|
366
|
+
:automatic)
|
367
367
|
|
368
368
|
@@nest_window.add(sw)
|
369
369
|
sw.add(view)
|
@@ -143,13 +143,13 @@ module Demo
|
|
143
143
|
add(vbox)
|
144
144
|
|
145
145
|
vbox.pack_start(Gtk::Label.new("Jonathan's Holiday Card Planning Sheet"),
|
146
|
-
false, false, 0)
|
146
|
+
:expand => false, :fill => false, :padding => 0)
|
147
147
|
|
148
148
|
sw = Gtk::ScrolledWindow.new(nil, nil)
|
149
149
|
sw.shadow_type = Gtk::SHADOW_ETCHED_IN
|
150
|
-
sw.set_policy(
|
151
|
-
|
152
|
-
vbox.pack_start(sw, true, true, 0)
|
150
|
+
sw.set_policy(:automatic,
|
151
|
+
:automatic)
|
152
|
+
vbox.pack_start(sw, :expand => true, :fill => true, :padding => 0)
|
153
153
|
|
154
154
|
# create model
|
155
155
|
model = create_model
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtk3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: glib2
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 2.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 2.0.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: gio2
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: 2.0.0
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 2.0.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: atk
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 2.0.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.0.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: pango
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 2.0.0
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 2.0.0
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: gdk_pixbuf2
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
85
|
+
version: 2.0.0
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: 2.0.0
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: gdk3
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: 2.0.0
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 2.0.0
|
110
110
|
description: Ruby/GTK3 is a Ruby binding of GTK+-3.x.
|
111
111
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
112
112
|
executables: []
|
@@ -388,7 +388,9 @@ files:
|
|
388
388
|
- sample/gtk-demo/hypertext.rb
|
389
389
|
- sample/gtk-demo/iconview.rb
|
390
390
|
- sample/gtk-demo/images.rb
|
391
|
+
- sample/gtk-demo/infobar.rb
|
391
392
|
- sample/gtk-demo/item_factory.rb
|
393
|
+
- sample/gtk-demo/links.rb
|
392
394
|
- sample/gtk-demo/list_store.rb
|
393
395
|
- sample/gtk-demo/main.rb
|
394
396
|
- sample/gtk-demo/menus.rb
|
@@ -398,6 +400,7 @@ files:
|
|
398
400
|
- sample/gtk-demo/rotated_text.rb
|
399
401
|
- sample/gtk-demo/ruby-gnome2-logo.png
|
400
402
|
- sample/gtk-demo/sizegroup.rb
|
403
|
+
- sample/gtk-demo/spinner.rb
|
401
404
|
- sample/gtk-demo/stock_browser.rb
|
402
405
|
- sample/gtk-demo/textview.rb
|
403
406
|
- sample/gtk-demo/tree_store.rb
|