projects
/
embrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4fb9f48
)
use EvasObject#name to identify icons
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Thu, 25 May 2006 10:04:02 +0000
(12:04 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Thu, 25 May 2006 10:04:02 +0000
(12:04 +0200)
bin/embrace
patch
|
blob
|
history
diff --git
a/bin/embrace
b/bin/embrace
index 2316b0ddbc3cc8bd703a4260109e85e4efc38849..9772596e4280c26e21eeb6148f706d9049379765 100755
(executable)
--- a/
bin/embrace
+++ b/
bin/embrace
@@
-110,6
+110,8
@@
module Embrace
def initialize(evas, label)
super(evas)
def initialize(evas, label)
super(evas)
+ self.name = label
+
@slot = nil
@alpha_anim = nil
@slot = nil
@alpha_anim = nil
@@
-125,16
+127,12
@@
module Embrace
@img.set_file(ICON_FILE)
@img.set_fill(0, 0, *@img.get_size)
@img.set_file(ICON_FILE)
@img.set_fill(0, 0, *@img.get_size)
- @label.text =
label
+ @label.text =
name
@label.set_font("VeraBd", 10)
resize(*@img.get_size)
end
@label.set_font("VeraBd", 10)
resize(*@img.get_size)
end
- def label
- @label.text
- end
-
# smart callbacks
def on_show
@objects.each { |o| o.show }
# smart callbacks
def on_show
@objects.each { |o| o.show }
@@
-175,8
+173,6
@@
module Embrace
class ContainerFullError < ContainerError; end
class ContainerLockedError < ContainerError; end
class ContainerFullError < ContainerError; end
class ContainerLockedError < ContainerError; end
- include Enumerable
-
def initialize(evas)
super
def initialize(evas)
super
@@
-192,10
+188,6
@@
module Embrace
@add_lock_count = 0
end
@add_lock_count = 0
end
- def each
- @icons.compact.each { |i| yield i }
- end
-
def <<(i)
Kernel.raise(ContainerFullError) if slots_left.zero?
Kernel.raise(ContainerLockedError) unless @add_lock_count.zero?
def <<(i)
Kernel.raise(ContainerFullError) if slots_left.zero?
Kernel.raise(ContainerLockedError) unless @add_lock_count.zero?
@@
-358,7
+350,7
@@
module Embrace
lbl = md.captures.first
end
lbl = md.captures.first
end
- found =
@container.find { |i| i.label == lbl }
+ found =
evas.find_object(lbl)
begin
if ev.count.zero?
begin
if ev.count.zero?