gtk3 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gtk3/tree-view.rb +24 -0
- data/test/test-gtk-tree-view.rb +27 -0
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a469f47e28f7ffc04dd725197d1d90ca7058b9dd
|
4
|
+
data.tar.gz: 74beb40f3a9299295113a675ba049bbeb4fe47f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e490c0634e0104b611ffd397c1e1adf0f23430156f433b774bf06441e1de65afdc9c86a50163078458a4d683d2a6af8f35214d49d0b74c33f8ce5177b515203
|
7
|
+
data.tar.gz: f25d346db49b6b2a559d3dab8c040ed52726d75e4ba1d2bf901d6ef0cf7f0236bf6ffb051199103cfc2ef69137f391b1b219bad7ada7d7d4bcf0963be5084b0e
|
data/lib/gtk3/tree-view.rb
CHANGED
@@ -37,5 +37,29 @@ module Gtk
|
|
37
37
|
targets = ensure_drag_targets(targets)
|
38
38
|
enable_model_drag_dest_raw(targets, actions)
|
39
39
|
end
|
40
|
+
|
41
|
+
alias_method :insert_column_raw, :insert_column
|
42
|
+
def insert_column(*args, &block)
|
43
|
+
case args.size
|
44
|
+
when 2
|
45
|
+
column, position = args
|
46
|
+
insert_column_raw(column, position)
|
47
|
+
when 3
|
48
|
+
position, title, cell = args
|
49
|
+
insert_column_with_data_func(position, title, cell, &block)
|
50
|
+
when 4
|
51
|
+
position, title, cell, attributes = args
|
52
|
+
column = TreeViewColumn.new
|
53
|
+
column.sizing = :fixed if fixed_height_mode?
|
54
|
+
column.title = title
|
55
|
+
column.pack_start(cell, true)
|
56
|
+
attributes.each do |name, column_id|
|
57
|
+
column.add_attribute(cell, name, column_id)
|
58
|
+
end
|
59
|
+
insert_column_raw(column, position)
|
60
|
+
else
|
61
|
+
raise ArgumentError, "wrong number of arguments (#{args.size} for 2..4)"
|
62
|
+
end
|
63
|
+
end
|
40
64
|
end
|
41
65
|
end
|
data/test/test-gtk-tree-view.rb
CHANGED
@@ -101,5 +101,32 @@ class TestGtkTreeView < Test::Unit::TestCase
|
|
101
101
|
@view.row_expanded?(parent.path)
|
102
102
|
end
|
103
103
|
end
|
104
|
+
|
105
|
+
sub_test_case "#insert_column" do
|
106
|
+
def setup
|
107
|
+
@store = Gtk::TreeStore.new(String)
|
108
|
+
@view = Gtk::TreeView.new(@store)
|
109
|
+
end
|
110
|
+
|
111
|
+
test "column, position" do
|
112
|
+
column = Gtk::TreeViewColumn.new("Label",
|
113
|
+
Gtk::CellRendererText.new,
|
114
|
+
:text => 0)
|
115
|
+
@view.insert_column(column, 0)
|
116
|
+
assert_equal([column], @view.columns)
|
117
|
+
end
|
118
|
+
|
119
|
+
test "position, title, cell" do
|
120
|
+
@view.insert_column(0, "Label", Gtk::CellRendererText.new) do
|
121
|
+
end
|
122
|
+
assert_equal(["Label"], @view.columns.collect(&:title))
|
123
|
+
end
|
124
|
+
|
125
|
+
test "position, title, cell, attributes" do
|
126
|
+
@view.insert_column(0, "Label", Gtk::CellRendererText.new,
|
127
|
+
:text => 0)
|
128
|
+
assert_equal(["Label"], @view.columns.collect(&:title))
|
129
|
+
end
|
130
|
+
end
|
104
131
|
end
|
105
132
|
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.
|
4
|
+
version: 3.0.7
|
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: 2015-10-
|
11
|
+
date: 2015-10-06 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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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.7
|
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: []
|