rui 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,3 @@
1
+ # 0.1.0
2
+
3
+ * Initial release.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.2
@@ -140,7 +140,6 @@ module ActionHandler
140
140
  def plug_action_list(name, actions)
141
141
  action_list_entries[name].each do |entry|
142
142
  actions.each do |action|
143
- puts "adding action to #{entry.parent}: #{action.text}"
144
143
  entry.add_action(action)
145
144
  end
146
145
  end
@@ -132,8 +132,31 @@ module RUI
132
132
  #
133
133
  class ActionList
134
134
  include GuiBuilder
135
+
136
+ class Entry
137
+ attr_reader :parent
138
+
139
+ def initialize(parent)
140
+ @parent = parent
141
+ @actions = []
142
+ end
143
+
144
+ def add_action(action)
145
+ @parent.add_action(action)
146
+ @actions << action
147
+ end
148
+
149
+ def clear
150
+ @actions.each do |action|
151
+ action.dispose
152
+ end
153
+ @actions = []
154
+ end
155
+ end
135
156
 
136
157
  def create_element(window, parent, desc)
158
+ entry = Entry.new(parent)
159
+ window.action_list_entries[desc.opts[:name]] << entry
137
160
  parent
138
161
  end
139
162
  end
data/rui.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rui}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paolo Capriotti"]
12
- s.date = %q{2011-01-01}
12
+ s.date = %q{2011-01-09}
13
13
  s.description = %q{GUI abstraction library supporting Qt and KDE backends}
14
14
  s.email = %q{p.capriotti@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  ]
18
18
  s.files = [
19
19
  ".document",
20
+ "CHANGELOG",
20
21
  "COPYING",
21
22
  "Gemfile",
22
23
  "Gemfile.lock",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rui
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paolo Capriotti
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-01 00:00:00 +00:00
18
+ date: 2011-01-09 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -118,6 +118,7 @@ extra_rdoc_files:
118
118
  - README.md
119
119
  files:
120
120
  - .document
121
+ - CHANGELOG
121
122
  - COPYING
122
123
  - Gemfile
123
124
  - Gemfile.lock