gtk2_treeview_settings 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ source "http://rubygems.org"
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
6
  gem "gtk2"
7
+ gem "knjrbfw"
7
8
 
8
9
  # Add dependencies to develop your gem here.
9
10
  # Include everything needed to run rake, tests, features, etc.
@@ -1,29 +1,40 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- atk (1.1.4)
5
- glib2 (>= 1.1.4)
4
+ atk (1.1.5)
5
+ glib2 (>= 1.1.5)
6
6
  cairo (1.12.2)
7
7
  pkg-config
8
+ datet (0.0.20)
8
9
  diff-lcs (1.1.3)
9
- gdk_pixbuf2 (1.1.4)
10
- glib2 (>= 1.1.4)
10
+ gdk_pixbuf2 (1.1.5)
11
+ glib2 (>= 1.1.5)
11
12
  git (1.2.5)
12
- glib2 (1.1.4)
13
+ glib2 (1.1.5)
13
14
  pkg-config
14
- gtk2 (1.1.4)
15
- atk (>= 1.1.4)
16
- gdk_pixbuf2 (>= 1.1.4)
17
- pango (>= 1.1.4)
15
+ gtk2 (1.1.5)
16
+ atk (>= 1.1.5)
17
+ gdk_pixbuf2 (>= 1.1.5)
18
+ pango (>= 1.1.5)
19
+ http2 (0.0.10)
18
20
  jeweler (1.8.4)
19
21
  bundler (~> 1.0)
20
22
  git (>= 1.2.5)
21
23
  rake
22
24
  rdoc
23
- json (1.7.4)
24
- pango (1.1.4)
25
+ json (1.7.5)
26
+ knjrbfw (0.0.98)
27
+ datet
28
+ http2
29
+ php4r
30
+ tsafe
31
+ wref
32
+ pango (1.1.5)
25
33
  cairo (>= 1.10.0)
26
- glib2 (>= 1.1.4)
34
+ glib2 (>= 1.1.5)
35
+ php4r (0.0.3)
36
+ datet
37
+ http2
27
38
  pkg-config (1.1.4)
28
39
  rake (0.9.2.2)
29
40
  rdoc (3.12)
@@ -36,6 +47,8 @@ GEM
36
47
  rspec-expectations (2.8.0)
37
48
  diff-lcs (~> 1.1.2)
38
49
  rspec-mocks (2.8.0)
50
+ tsafe (0.0.11)
51
+ wref (0.0.5)
39
52
 
40
53
  PLATFORMS
41
54
  ruby
@@ -44,5 +57,6 @@ DEPENDENCIES
44
57
  bundler (>= 1.0.0)
45
58
  gtk2
46
59
  jeweler (~> 1.8.4)
60
+ knjrbfw
47
61
  rdoc (~> 3.12)
48
62
  rspec (~> 2.8.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{gtk2_treeview_settings}
8
- s.version = "0.0.2"
7
+ s.name = "gtk2_treeview_settings"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kasper Johansen"]
12
- s.date = %q{2012-08-26}
13
- s.description = %q{A gem that helps with ordering of columns and more.}
14
- s.email = %q{k@spernj.org}
12
+ s.date = "2012-09-28"
13
+ s.description = "A gem that helps with ordering of columns and more."
14
+ s.email = "k@spernj.org"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README.rdoc"
@@ -30,23 +30,25 @@ Gem::Specification.new do |s|
30
30
  "spec/gtk2_treeview_settings_spec.rb",
31
31
  "spec/spec_helper.rb"
32
32
  ]
33
- s.homepage = %q{http://github.com/kaspernj/gtk2_treeview_settings}
33
+ s.homepage = "http://github.com/kaspernj/gtk2_treeview_settings"
34
34
  s.licenses = ["MIT"]
35
35
  s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.6.2}
37
- s.summary = %q{A gem that helps with ordering of columns and more.}
36
+ s.rubygems_version = "1.8.24"
37
+ s.summary = "A gem that helps with ordering of columns and more."
38
38
 
39
39
  if s.respond_to? :specification_version then
40
40
  s.specification_version = 3
41
41
 
42
42
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
43
  s.add_runtime_dependency(%q<gtk2>, [">= 0"])
44
+ s.add_runtime_dependency(%q<knjrbfw>, [">= 0"])
44
45
  s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
45
46
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
46
47
  s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
47
48
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
48
49
  else
49
50
  s.add_dependency(%q<gtk2>, [">= 0"])
51
+ s.add_dependency(%q<knjrbfw>, [">= 0"])
50
52
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
51
53
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
52
54
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
@@ -54,6 +56,7 @@ Gem::Specification.new do |s|
54
56
  end
55
57
  else
56
58
  s.add_dependency(%q<gtk2>, [">= 0"])
59
+ s.add_dependency(%q<knjrbfw>, [">= 0"])
57
60
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
58
61
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
59
62
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
@@ -13,6 +13,7 @@ class Gtk2_treeview_settings
13
13
  def initialize(args)
14
14
  @args = args
15
15
  @tv = @args[:tv]
16
+ @renderers = {}
16
17
 
17
18
  #Set the initial order of the columns so we can recognize them later.
18
19
  @col_ids = {}
@@ -31,6 +32,14 @@ class Gtk2_treeview_settings
31
32
  end
32
33
  end
33
34
 
35
+ def cellrenderer_for_id(id)
36
+ col_no = self.col_no_for_id(id)
37
+ col = tv.columns[col_no]
38
+ renderer = col.cell_renderers.first
39
+ raise Errno::ENOENT, "Could not find cell-renderer for that ID: '#{id}', '#{col_no}'." if !renderer
40
+ return renderer
41
+ end
42
+
34
43
  #Returns a column-number for a specific ID (given at initialize-time).
35
44
  def col_no_for_id(id)
36
45
  obj_id = @saved_ids[id]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gtk2_treeview_settings
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kasper Johansen
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-08-26 00:00:00 +02:00
14
- default_executable:
13
+ date: 2012-09-28 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: gtk2
@@ -25,8 +24,19 @@ dependencies:
25
24
  prerelease: false
26
25
  version_requirements: *id001
27
26
  - !ruby/object:Gem::Dependency
28
- name: rspec
27
+ name: knjrbfw
29
28
  requirement: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ requirement: &id003 !ruby/object:Gem::Requirement
30
40
  none: false
31
41
  requirements:
32
42
  - - ~>
@@ -34,10 +44,10 @@ dependencies:
34
44
  version: 2.8.0
35
45
  type: :development
36
46
  prerelease: false
37
- version_requirements: *id002
47
+ version_requirements: *id003
38
48
  - !ruby/object:Gem::Dependency
39
49
  name: rdoc
40
- requirement: &id003 !ruby/object:Gem::Requirement
50
+ requirement: &id004 !ruby/object:Gem::Requirement
41
51
  none: false
42
52
  requirements:
43
53
  - - ~>
@@ -45,10 +55,10 @@ dependencies:
45
55
  version: "3.12"
46
56
  type: :development
47
57
  prerelease: false
48
- version_requirements: *id003
58
+ version_requirements: *id004
49
59
  - !ruby/object:Gem::Dependency
50
60
  name: bundler
51
- requirement: &id004 !ruby/object:Gem::Requirement
61
+ requirement: &id005 !ruby/object:Gem::Requirement
52
62
  none: false
53
63
  requirements:
54
64
  - - ">="
@@ -56,10 +66,10 @@ dependencies:
56
66
  version: 1.0.0
57
67
  type: :development
58
68
  prerelease: false
59
- version_requirements: *id004
69
+ version_requirements: *id005
60
70
  - !ruby/object:Gem::Dependency
61
71
  name: jeweler
62
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ requirement: &id006 !ruby/object:Gem::Requirement
63
73
  none: false
64
74
  requirements:
65
75
  - - ~>
@@ -67,7 +77,7 @@ dependencies:
67
77
  version: 1.8.4
68
78
  type: :development
69
79
  prerelease: false
70
- version_requirements: *id005
80
+ version_requirements: *id006
71
81
  description: A gem that helps with ordering of columns and more.
72
82
  email: k@spernj.org
73
83
  executables: []
@@ -90,7 +100,6 @@ files:
90
100
  - lib/gtk2_treeview_settings.rb
91
101
  - spec/gtk2_treeview_settings_spec.rb
92
102
  - spec/spec_helper.rb
93
- has_rdoc: true
94
103
  homepage: http://github.com/kaspernj/gtk2_treeview_settings
95
104
  licenses:
96
105
  - MIT
@@ -104,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
113
  requirements:
105
114
  - - ">="
106
115
  - !ruby/object:Gem::Version
107
- hash: 342797625950162940
116
+ hash: -3796037243720896730
108
117
  segments:
109
118
  - 0
110
119
  version: "0"
@@ -117,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
126
  requirements: []
118
127
 
119
128
  rubyforge_project:
120
- rubygems_version: 1.6.2
129
+ rubygems_version: 1.8.24
121
130
  signing_key:
122
131
  specification_version: 3
123
132
  summary: A gem that helps with ordering of columns and more.