GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
 * lib/shoes.rb: rename Shoes.load to Shoes.visit.  underscore widget name 
 fix by jeff and seth.
 * lib/shoes/setup.rb: fix from seth, regarding use of app.slot.
why (author)
Mon Sep 29 22:04:40 -0700 2008
commit  9472f0fba53872923fc50c68d4fc5f0cb0e16d21
tree    6c17b47bc59ad9473fb9cbb50b17506dd2c36096
parent  c9a29cfa5a917e6a8b5389884abed078ba4e2d36
...
109
110
111
112
 
113
114
115
...
315
316
317
318
 
319
320
321
...
422
423
424
425
 
426
427
428
...
109
110
111
 
112
113
114
115
...
315
316
317
 
318
319
320
321
...
422
423
424
 
425
426
427
428
0
@@ -109,7 +109,7 @@ class Shoes
0
 
0
   def self.show_selector
0
     fname = ask_open_file
0
- Shoes.load(fname) if fname
0
+ Shoes.visit(fname) if fname
0
   end
0
 
0
   def self.make_pack
0
@@ -315,7 +315,7 @@ class Shoes
0
     end
0
   end
0
 
0
- def self.load(path)
0
+ def self.visit(path)
0
     uri = Shoes.uri(path)
0
 
0
     case uri
0
@@ -422,7 +422,7 @@ class Shoes
0
 
0
   def Widget.inherited subc
0
     Shoes.class_eval %{
0
- def #{subc.to_s[/::(\w+)$/, 1].
0
+ def #{subc.to_s[/(^|::)(\w+)$/, 2].
0
             gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
0
             gsub(/([a-z\d])([A-Z])/,'\1_\2').downcase}(*a, &b)
0
         a.unshift #{subc}
...
132
133
134
135
 
136
137
138
...
274
275
276
277
 
278
279
280
...
132
133
134
 
135
136
137
138
...
274
275
276
 
277
278
279
280
0
@@ -132,7 +132,7 @@ class Shoes::Setup
0
     end
0
     Gem::DefaultUserInteraction.ui = old_ui
0
 
0
- Shoes.load(@script)
0
+ Shoes.visit(@script)
0
     app.close
0
   end
0
 
0
@@ -274,7 +274,7 @@ class Gem::ShoesFace
0
   end
0
 
0
   def initialize app
0
- @title, @status, @prog, = app.contents[-1].contents
0
+ @title, @status, @prog, = app.slot.contents[-1].contents
0
   end
0
   def title msg
0
     @title.replace msg
...
24
25
26
27
28
29
30
 
 
 
 
31
...
24
25
26
 
 
 
 
27
28
29
30
31
0
@@ -24,8 +24,8 @@ end
0
 Shoes.app :width => 400, :height => 130 do
0
   style(Link, :underline => nil)
0
   style(LinkHover, :fill => nil, :underline => nil)
0
- menupanel green, :width => 170, :height => 120, :margin => 4
0
- menupanel blue, :width => 140, :height => 120, :margin => 4
0
- menupanel red, :width => 140, :height => 120, :margin => 4
0
- menupanel purple, :width => 140, :height => 120, :margin => 4
0
+ menu_panel green, :width => 170, :height => 120, :margin => 4
0
+ menu_panel blue, :width => 140, :height => 120, :margin => 4
0
+ menu_panel red, :width => 140, :height => 120, :margin => 4
0
+ menu_panel purple, :width => 140, :height => 120, :margin => 4
0
 end
...
117
118
119
120
 
121
122
123
...
117
118
119
 
120
121
122
123
0
@@ -117,7 +117,7 @@ shoes_load(char *path)
0
 
0
   if (path)
0
   {
0
- sprintf(bootup, "Shoes.load(%%q<%s>);", path);
0
+ sprintf(bootup, "Shoes.visit(%%q<%s>);", path);
0
 
0
     VALUE v = rb_rescue2(CASTHOOK(shoes_load_begin), (VALUE)bootup, CASTHOOK(shoes_load_exception), Qnil, rb_cObject, 0);
0
     if (rb_obj_is_kind_of(v, rb_eException))

Comments

    No one has commented yet.