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

public
Description: A collection of apps developed with Ruby and Shoes
Clone URL: git://github.com/ChrisColon/abagofshoes.git
toggling messages does work now
ChrisColon (author)
Fri Jul 25 14:02:06 -0700 2008
commit  5fa1c7416880972aaa4ce77239e902140b078553
tree    c1d232f2fb0a80da782d9c0838576b213bfa223b
parent  0fd4b42a07d3c49f04532becd25530c840a93d80
...
10
11
12
13
 
14
15
16
...
39
40
41
42
43
 
 
 
 
44
45
46
...
50
51
52
53
 
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
 
 
74
75
76
77
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
80
81
...
10
11
12
 
13
14
15
16
...
39
40
41
 
 
42
43
44
45
46
47
48
...
52
53
54
 
55
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
58
59
60
 
 
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
0
@@ -10,7 +10,7 @@
0
 #
0
 # Status:
0
 # -------
0
-# Working, but some features are missing and the RSS feed on gmane.org is limited to 21 items, haven't
0
+# Working, but the RSS feed on gmane.org is limited to 21 items, haven't
0
 # found a way around that yet
0
 
0
 require 'rexml/document'
0
@@ -39,8 +39,10 @@ Shoes.app do
0
     end
0
     @groups = (groups.values.sort_by { |msgs| msgs.first[:date] }).reverse
0
     
0
- @groups.each do |item|
0
- cur = stack(:margin_left => 15, :margin_right => 30, :margin_top => 15) do
0
+ @remsgs = []
0
+
0
+ @groups.each_with_index do |item, count|
0
+ stack(:margin_left => 15, :margin_right => 30, :margin_top => 15) do
0
         background black
0
         stack do
0
           background "#464646".."#000000"
0
@@ -50,32 +52,31 @@ Shoes.app do
0
           end
0
           para item[0][:title], :stroke => white
0
         end
0
- opened = false
0
+
0
         click do
0
- if !opened
0
- opened = true
0
- cur.after do
0
- item.length.times do |count|
0
- stack(:margin_left => 15, :margin_right => 15, :margin_top => 15) do
0
- background white
0
- stack(:margin_left => 15, :margin_right => 15, :margin_top => 15) do
0
- flow do
0
- para item[count][:creator], :stroke => red
0
- para " - "
0
- para item[count][:date], :stroke => orange
0
- end
0
- para item[count][:description]
0
- click do
0
- visit(item[count][:link])
0
- end
0
- end
0
- end
0
- end
0
+ @remsgs.each do |msg|
0
+ if msg[:group] == count
0
+ msg[:stack].toggle
0
             end
0
- else
0
- # I'll have to figure out how to hide the posts again
0
           end
0
         end
0
+
0
+ item.length.times do |msgcount|
0
+ @remsgs << {:group => count, :stack => (stack(:margin_left => 15, :margin_right => 15, :margin_top => 15) do
0
+ background white
0
+ stack(:margin_left => 15, :margin_right => 15, :margin_top => 15) do
0
+ flow do
0
+ para item[msgcount][:creator], :stroke => red
0
+ para " - "
0
+ para item[msgcount][:date], :stroke => orange
0
+ end
0
+ para item[msgcount][:description]
0
+ click do
0
+ visit(item[msgcount][:link])
0
+ end
0
+ end
0
+ end).hide }
0
+ end
0
       end
0
     end
0
   end

Comments

    No one has commented yet.