Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2011, 04:39 AM   #421
TJ27
Enthusiast
TJ27 doesn't litterTJ27 doesn't litter
 
Posts: 44
Karma: 198
Join Date: Mar 2011
Location: Russia, Saratov
Device: Sony PRS-350
BenChen Last (from repo) calendar work fine.
I want more icons for event (birthday, marry, rip) and medium font for event (current fof my eyes too small)
I manually edit calendar.dat
TJ27 is offline   Reply With Quote
Old 07-16-2011, 02:17 PM   #422
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by TJ27 View Post
BenChen Last (from repo) calendar work fine.
I want more icons for event (birthday, marry, rip) and medium font for event (current fof my eyes too small)
I manually edit calendar.dat
The current icons for events looked good in the Sim but looked terrible on the reader. So tomorrow I will redo the existing ones, and possibly add a couple more. There is already a birthday icon, and I will add a wedding/anniversary one. But what is "rip"?

As for the font size, I really don't know. The multi-line textbox is one of the built-in widgets. I don't know if the font size can be changed. Do you know, Mark?

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Advert
Old 07-16-2011, 02:53 PM   #423
elcreative
Wizard
elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.elcreative ought to be getting tired of karma fortunes by now.
 
Posts: 2,888
Karma: 5875940
Join Date: Dec 2007
Device: PRS505, 600, 350, 650, Nexus 7, Note III, iPad 4 etc
RIP = Rest in Peace probably for a death/anniversary of a death...
elcreative is offline   Reply With Quote
Old 07-16-2011, 03:05 PM   #424
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by elcreative View Post
RIP = Rest in Peace probably for a death/anniversary of a death...
Hmmm. If so, what would be suitable as an icon?
BenChen is offline   Reply With Quote
Old 07-16-2011, 03:08 PM   #425
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by BenChen View Post
As for the font size, I really don't know. The multi-line textbox is one of the built-in widgets. I don't know if the font size can be changed.
Hi Ben,

<text>is build in, but fully customizable.
Your are defining
Code:
      	<skin id="eventText"
				cutouts="htext-lt,htext-ct,htext-rt,htext-lm,htext-cm,htext-rm,htext-lb,htext-cb,htext-rb" 
				styles="htext-e,htext-e,htext-p,htext-s"/>
implicit using this definitions form AppAssets.xml
Spoiler:

Code:
  		<style font="Swis721 BT" size="15" style="bold">
			<style id="htext-e" halign="left" left="8" top="8" right="8" bottom="8">
			<style id="htext-d" color="#959595" background="#6D6D6D"/>
			<style id="htext-p" background="#B49AFF"/>
			<style id="htext-s" background="#B49AFF"/>
		 </style>	
		</style>
..
        <texture href="../AppAssets/AppLabels.png">
..		
			<cutout id="htext-lt" x="305" y="230" width="5" height="5" lines="30"/>
			<cutout id="htext-ct" x="311" y="230" width="10" height="5" lines="30" />
			<cutout id="htext-rt" x="325" y="230" width="10" height="5" lines="30"/>
			<cutout id="htext-lm" x="305" y="240" width="5" height="10" lines="30"/>
			<cutout id="htext-cm" x="311" y="240" width="10" height="10" lines="30"/>
			<cutout id="htext-rm" x="325" y="240" width="10" height="10" lines="30"/>
			<cutout id="htext-lb" x="305" y="250" width="5" height="10" lines="30"/>
			<cutout id="htext-cb" x="311" y="250" width="10" height="10" lines="30"/>
			<cutout id="htext-rb" x="325" y="250" width="10" height="10" lines="30"/>

so the new style "eventText" will be the same as "helpText" from AppAssets.

Just replace the second line of your definitions with some other text-styles to meet your requirements.

The four text-styles (indicated by the trailing char d,e,p,s) stands for the four (4) possible states of the element:
d-isabled
e-nable
p-ressed
s-elected
The order may vary from element to element, but you can always check with the defsked sources of fskin.

Regards
Mark
Mark Nord is offline   Reply With Quote
Advert
Old 07-16-2011, 03:14 PM   #426
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi Mark,

Excellent. I was just checking out AppAssests and realised that the font was customisable, but I didn't know what the "d", "e", "p" and "s" stood for.

I will do the changes tomorrow (Sunday).

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 07-16-2011, 03:15 PM   #427
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Ben,

A question to Calendar:
Are the floating holidays, tied to the easter-date also supported?
(e.g. Pentecost)

Regards
Mark
Mark Nord is offline   Reply With Quote
Old 07-16-2011, 03:17 PM   #428
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi Mark,

Excellent. I was just checking out AppAssests and realised that the font was customisable, but I didn't know what the "d", "e", "p" and "s" stood for.

I will do the changes tomorrow (Sunday).

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 07-16-2011, 03:32 PM   #429
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
A question to Calendar:
Are the floating holidays, tied to the easter-date also supported?
(e.g. Pentecost)
Well, there is a special function to handle easter. I think it would be easy enough to copy the easter function and modify to obtain other dates tied to easter. But you would probably need a separate function for each date, and a separate "code".

All the special events have a code: "C" for Christmas, "B" for birthday, "E" for easter, "V" for Valentine's Day, etc. Repeating yearly events are coded with "Y", monthly events with "M" and weekly events with "W". There is also "F" for floating (which can handle things like Thanksgiving.) I have already been asked to add "Wedding/Anniversary" and "RIP". There is a limit to how much we can add without needing to change the event data-structure completely. (I guess that isn't out of the question, but I think I was hoping to avoid it!)


Actually, I should probably add Thanksgiving to the default set of events so as to model a Floating holiday... Something for tomorrow...

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 07-16-2011, 04:47 PM   #430
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Ben,

Thanksgiving is already there!
Furthermore there is no "E"aster, but "F" with param 3,0,0

And if you are interested, there is a way to avoid reading the dat-file twice:
Spoiler:
Code:
target.init = function () {
		var i, tempfile,lines, tempnumevents;
		//this.bubble("tracelog","initialising...");
		this.appTitle.setValue(kbook.autoRunRoot._title);
		this.appIcon.u = kbook.autoRunRoot._icon;

		// Load events from save file
		try {
			if (FileSystem.getFileInfo(datPath)) {
				// read whole file in first to count how many events there are
				tempfile = getFileContent(datPath,'savefile missing');
				if (tempfile!='savefile missing') {
					lines = tempfile.split("\r\n");	// CR LF is used by stream.writeLine()
					tempnumevents = (lines.length-1)/5;
					//this.bubble("tracelog","Events="+tempnumevents);
					for (i=0; i<tempnumevents; i++) {
						events.push([lines[i*5],lines[i*5+1],lines[i*5+2],lines[i*5+3],lines[i*5+4]]);
						} 
		/*	this isn't necessary! As there are already lines[]
					// now read file in using stream
					var stream = new Stream.File(datPath);
					for (i=0; i<tempnumevents; i++) {
						temptype = stream.readLine();
						tempmonth = stream.readLine();
						tempdate = stream.readLine();
						tempyear = stream.readLine();
						tempdescription = stream.readLine();
						events.push([temptype, tempmonth, tempdate, tempyear, tempdescription]);
					}
					stream.close();  
					this.bubble("tracelog","Events="+_Core.debug.dumpToString(events,"",2)); 
		*/		}
			} else {
				// no savefile, so push default events
				events.push(["Y", "1", "1", "2006", "New Year's Day"]);
				events.push(["V", "2", "14", "2005", "Valentine's Day"]);
				events.push(["F", "3", "0", "0", "Easter Sunday"]);		// easter is a special float with param 3,0,0
				events.push(["Y", "3", "17", "2005", "St. Patrick's Day"]);
				events.push(["F", "11", "4", "5", "Thanksgiving"]);
				events.push(["C", "12", "25", "2005", "Christmas"]);
			}
		} catch (e) { stream.close(); }

Regards
Mark

PS: Maybe editing (of the dat-file) would be easier if one event per row would be stored. Using something like a CSV-format, allowing events.push(lines[i].split(";"))

Last edited by Mark Nord; 07-16-2011 at 04:52 PM.
Mark Nord is offline   Reply With Quote
Old 07-17-2011, 01:36 AM   #431
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi Mark,

Thanks for the code for reading in the file once. I had tried to do something similar, but hadn't managed to get it to work. (I had used

Code:
lines = tempfile.split("\n");
and couldn't work out why there were still returns at the end of every line!)

I like the idea of events all on one line. I will see how it goes.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 07-17-2011, 06:21 AM   #432
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi everyone,

Calendar updates pushed to apps repository. This has been tested on my 600 and it looks good.

Changes are: Improved layout and event icons; added "Anniversary"; increased event font size; changed event file-format; non-Touch cursor now moves.

Note, in particular, that the save file format has been changed. If you have a save file already, you need to edit it so that it looks like the following:

Code:
Y;1;1;2006;New Year's Day
V;2;14;2005;Valentine's Day
F;3;0;0;Easter Sunday
Y;3;17;2005;St. Patrick's Day
F;11;4;5;Thanksgiving
C;12;25;2005;Christmas
And it is important to have that extra blank line at the end.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 07-17-2011, 03:20 PM   #433
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi everyone,

Another calendar update pushed to the apps repository.

Changes are: Added settings popup panel; 'Week starts with' option (Sunday or Monday).

It should work with touch and non-touch (with panel open, press up/down to move between option and buttons, press left/right when option is enabled to change).

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 07-17-2011, 07:21 PM   #434
surquizu
Evangelist
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 411
Karma: 902071
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
I like the calendar! Good job!
Thanks Ben

In the 505 works fine but crashes when I push the enter when OK is selected to change the starting day of the week.

Nor do I know how to add events on the calendar. I don´t see any option.
Attached Thumbnails
Click image for larger version

Name:	2011-7-18.jpg
Views:	208
Size:	39.9 KB
ID:	74508   Click image for larger version

Name:	2011-7-18_0.jpg
Views:	232
Size:	31.7 KB
ID:	74509  
surquizu is offline   Reply With Quote
Old 07-17-2011, 08:49 PM   #435
TJ27
Enthusiast
TJ27 doesn't litterTJ27 doesn't litter
 
Posts: 44
Karma: 198
Join Date: Mar 2011
Location: Russia, Saratov
Device: Sony PRS-350
surquizu
For add/delete events manually edit file calendar.dat in /data/databook/system/prsplus/gamesave/calendar
TJ27 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fsk error, code = -13 Brian Charles Sony Reader 4 04-23-2010 04:21 PM
Fsk error code= -43 shrktank Sony Reader 1 12-24-2009 09:32 AM
Just a silly tweak: AUTORUN.INF for Windows Rootman Kindle Developer's Corner 3 12-04-2009 10:17 AM
Request for test in Windows XP kovidgoyal Calibre 5 08-26-2009 01:14 PM
Windows Develpment Environment issue itimpi Calibre 20 01-17-2009 07:15 PM


All times are GMT -4. The time now is 09:45 PM.


MobileRead.com is a privately owned, operated and funded community.