shoefiti

Check-in [d43fb93b4f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Redraw calendar each time
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d43fb93b4f2b9744c64828214a27a2d57a7966f8d75acc2bb4bf9350e81ca57f
User & Date: i5ivem@gmail.com 2010-04-07 16:12:43
Context
2010-04-15
15:59
Fix rendering of mailpane when new calendar

* Removed commented out old code
* Hide calendar when selecting a new list or year
* Show calendar when selecting month
* Remove drawmailpane function from month listbox block
as don't need a new mailpane each time, just need to clear and
redraw. This was causing a scrollbar to appear in main window and
odd display glitches
* Replace with @messagelist.clear in the calendar function and just
one drawmailpane call at app initialisation
* Still room for improvement check-in: fb0c7e5ad8 user: i5ivem@gmail.com tags: trunk

2010-04-07
16:12
Redraw calendar each time check-in: d43fb93b4f user: i5ivem@gmail.com tags: trunk
2010-04-06
16:16
Started making less-clever, but more usuable lists check-in: c2b66f1570 user: i5ivem@gmail.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to shoefiti.rb.

99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
...
197
198
199
200
201
202
203



204
205
206
207
208

	#Need to clear and redraw like mailpane
	def drawcalendar(month, year, list, maildays)
		off=Date.new(year, month, 01).wday-1 #Offset, not sure why I need the -1 here, but I do.
		mdays=(Date.new(year, 12, 31) << (12-month)).day #Days in the month
		rows=((mdays+off+1).to_f/7.0).ceil #Number of rows in calendar, plus 1 to compensate for -1 above. Have confused myself
		days = %w{Su Mo Tu We Th Fr Sa}

		days.each do |column|
			i = days.index(column)
			row = 0
			stack :left => i*40+250, :top => 0 do
				para column
				until row == rows do
					calday = i-off+7*row
					if (1..mdays) === calday #Only want to draw if greater than zero and less than max days
						if calday.to_s.length == 1
							caldaystr = "0"+calday.to_s #need "0" in front of single digits
						else
................................................................................
						end
					else 
						para ""
					end
					row += 1
				end
			end
		end
	end


	def make_date_link(list, year, month, day) #http://thread.gmane.org/gmane.comp.lib.shoes/4042/focus=4044
		link(day){getmails(list, year, month, day)}
	end
	
................................................................................
	@listurl = ""
	


	@stack_list.hide
	@stack_year.hide
	@stack_day.hide




	init 		
	

end







>



|







 







|







 







>
>
>





99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
...
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

	#Need to clear and redraw like mailpane
	def drawcalendar(month, year, list, maildays)
		off=Date.new(year, month, 01).wday-1 #Offset, not sure why I need the -1 here, but I do.
		mdays=(Date.new(year, 12, 31) << (12-month)).day #Days in the month
		rows=((mdays+off+1).to_f/7.0).ceil #Number of rows in calendar, plus 1 to compensate for -1 above. Have confused myself
		days = %w{Su Mo Tu We Th Fr Sa}
		@stack_cal.clear{
		days.each do |column|
			i = days.index(column)
			row = 0
			stack :left => i*40+250, :top => -100 do
				para column
				until row == rows do
					calday = i-off+7*row
					if (1..mdays) === calday #Only want to draw if greater than zero and less than max days
						if calday.to_s.length == 1
							caldaystr = "0"+calday.to_s #need "0" in front of single digits
						else
................................................................................
						end
					else 
						para ""
					end
					row += 1
				end
			end
		end}
	end


	def make_date_link(list, year, month, day) #http://thread.gmane.org/gmane.comp.lib.shoes/4042/focus=4044
		link(day){getmails(list, year, month, day)}
	end
	
................................................................................
	@listurl = ""
	


	@stack_list.hide
	@stack_year.hide
	@stack_day.hide

	@stack_cal = stack do
	end

	init 		
	

end