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 04-03-2012, 02:30 PM   #3601
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
Hey, great work so far!

Don't be shy! How do you think other developers (beside of kartu, who is a naturally born Sony hacker ) started?
For instance: see my post about the FSK-Test-Environment (or short SIM) here

And not to anticipate kartu, but IMHO your save/load settings code as well as this CSS manipulation will have the best chances to be integrated into "official" PRS+

But this is the fine thing on GPL code, each and everyon has the chance and the rigth to use and change the code to his liking, but will have to share his results to the public.

So again, don't be shy and push what you have to your repository.
So maybe someone can lend a helping hand.

Reagards
Mark

PS: if your button is a descendant of "radio-button" it should be using your mentioned "state-var". See if it can be defined in the xlm's "<model>" section.
For the Calculator I've done it like this:
Code:
 <model>
 		<variable id="BASIS" value="dec"/>
 		<variable id="TRIG" value="deg"/>
 </model>
....
<radio id="RBUTTON_HEX" variable="BASIS" on="hex" active="true" text="HEX" left="040" width="55" top="0" height="30" do="setNumberBase"/>

Last edited by Mark Nord; 04-03-2012 at 02:33 PM. Reason: typos; :( as always
Mark Nord is offline   Reply With Quote
Old 04-03-2012, 04:49 PM   #3602
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
Hi Mark

Thank you for flowers. Pushig will come - after the code has been cleaned from my stupid comments inside ;-)

Concerning buttons:
I allready have made this variable(s). Problem is:

Buttons become black when pushed. So far so good.
But I would prefer when one of the 4 buttons is pressed it should be stay black until another button is pressed. Same as SONY's font-size-buttons. So you could remember which font-size/line-height has been chosen.

Intermediate state of the interface to give an expression. There are now 2 groups with 4 buttons:
Click image for larger version

Name:	2020-4-30_0.jpg
Views:	298
Size:	56.1 KB
ID:	84828

Another wish:
I try to deactivate this buttons when an non-Epub-file is open. Therefor I would need to make a function in the XML-file which ask wether it's a Epub or not.

There are functions like this:
Code:
<function id="canStyleMode"><![CDATA[return this.getVariable("VAR_ENABLE_STYLE");
So I would need a function which gives 0 or 1 wether it's an epub or not. Some ideas?

A.

Edit: Code online

Last edited by Analogus; 04-09-2012 at 04:33 PM.
Analogus is offline   Reply With Quote
Advert
Old 04-04-2012, 11:23 AM   #3603
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 Analogus View Post
So I would need a function which gives 0 or 1 wether it's an epub or not. Some ideas?
Hi there,

If you know the path of the current book, you can get the mime type using

Code:
mime = FileSystem.getMIMEType(path);
If the book is an EPUB, mime will be 'application/epub+zip'.

You can get the path of the current book using

Code:
path = kbook.model.currentBook.media.path;
Hope this helps.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 04-04-2012, 02:20 PM   #3604
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 Analogus View Post
Concerning buttons:
I allready have made this variable(s). Problem is:

Buttons become black when pushed. So far so good.
But I would prefer when one of the 4 buttons is pressed it should be stay black until another button is pressed. Same as SONY's font-size-buttons. So you could remember which font-size/line-height has been chosen.

Intermediate state of the interface to give an expression. There are now 2 groups with 4 buttons:
Without your current code, it is hard to say,
but have you grouped your new buttons into <group> </group> tags?
I think, this will do the trick with my Calculator.
Mark Nord is offline   Reply With Quote
Old 04-04-2012, 03:43 PM   #3605
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
BenChen:

Thanks. Yes, this helps.

Mark:
Added GROUP-Tags but this does not work. Buttons are black until function is finished and the Epub reloaded.

Code in Attachement:
sizeOverlay.xml
Analogus is offline   Reply With Quote
Advert
Old 04-05-2012, 03:12 PM   #3606
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
Analogus,

obvious difference between your definition and the Sony/kinoma one is their use of
variableUpdate="VAR_UPDATE_FONTSIZE"

I would digg into de-fsked kbook.xs to learn more.

For your info please find the de-fsked sourcecode of this.pageSizeOverlayModel in the spoiler.
(No guaranty that there is something useful)

Spoiler:
Code:
	this.pageSizeOverlayModel = new this.pageOverlayModel
	this.pageSizeOverlayModel.VAR_MAX_FONTSCALE = this.__xs__number.parse('0');
	this.pageSizeOverlayModel.VAR_MIN_FONTSCALE = this.__xs__number.parse('0');
	this.pageSizeOverlayModel.VAR_RADIO_FONTSIZE = this.__xs__number.parse('0');
	this.pageSizeOverlayModel.VAR_ENABLE_ZOOM = this.__xs__boolean.parse('true');
	this.pageSizeOverlayModel.VAR_ENABLE_STYLE = this.__xs__boolean.parse('true');
	this.pageSizeOverlayModel.VAR_UPDATE_FONTSIZE = this.__xs__boolean.parse('false');
	this.pageSizeOverlayModel.zoomModel = this.pageZoomOverlayModel;
	this.pageSizeOverlayModel.selectStyle = this.pageSelectStyleOverlayModel;
	this.pageSizeOverlayModel.commonMinScale = this.__xs__number.parse('0');
	this.pageSizeOverlayModel.commonMaxScale = this.__xs__number.parse('3');
	this.pageSizeOverlayModel.SHOW = this.__xs__boolean.parse('false');
	this.pageSizeOverlayModel.initialized = function () {
		<global>.pageOverlayModel.initialized.call(this);
		this.SetSub('SIZE', this);
		this.commonMinScale = <global>.parseInt(<global>.System.applyEnvironment('[kFskDocumentViewerMinTextScale]'));
		this.commonMaxScale = <global>.parseInt(<global>.System.applyEnvironment('[kFskDocumentViewerMaxTextScale]'));
	};
	this.pageSizeOverlayModel.closeCurrentOverlay = function () {
		this.zoomModel.closeCurrentOverlay();
		if (this.SHOW == true) {
			this.setVariable('SHOW', false);
			this.targetModel.setVariable('OVERLAY', false);
		}
	};
	this.pageSizeOverlayModel.openCurrentOverlay = function () {
		this.closeCurrentOverlay();
		this.initSizeMenu();
		<global>.Fskin.overlayTool.setShowHide(this);
		this.targetModel.setVariable('OVERLAY', true);
		this.setVariable('SHOW', true);
	};
	this.pageSizeOverlayModel.UpdateModel = function () {
		this.initModel();
	};
	this.pageSizeOverlayModel.onSize = function () {
		<global>.kbook.model.dictionaryMode.clearPopup();
		if (this.zoomModel.SHOW) {
			this.zoomModel.closeCurrentOverlay();
		}
		else {
			if (this.selectStyle.SHOW) {
				this.selectStyle.doCloseSelectStyle();
				this.openCurrentOverlay();
			}
			else {
				if (this.SHOW) {
					this.closeCurrentOverlay();
				}
				else {
					this.openCurrentOverlay();
				}
			}
		}
	};
	this.pageSizeOverlayModel.onInstantZoom = function (zoomPlus) {
		if (this.zoomModel.SHOW) {
			if (zoomPlus) {
				if (!this.zoomModel.checkZoomLock()) {
					this.zoomModel.zoomRateChanged(10);
				}
				else {
					this.targetModel.doSomething('doBlink');
				}
			}
			else {
				if (!this.zoomModel.checkZoomLock()) {
					this.zoomModel.zoomRateChanged(-10);
				}
				else {
					this.targetModel.doSomething('doBlink');
				}
			}
		}
		else {
			if (zoomPlus) {
				this.targetModel.overlayModel.onZoomUp(10);
			}
			else {
				this.targetModel.overlayModel.onZoomUp(-10);
			}
		}
	};
	this.pageSizeOverlayModel.changeFontSize = function () {
		var scale;
		if (this.SHOW == true) {
			scale = <global>.parseInt(this.VAR_RADIO_FONTSIZE);
			scale = scale + this.commonMinScale;
			if (this.isDictionaryShown()) {
				this.setDictionaryScale(scale);
			}
			else {
				this.targetModel.doSomething('sizeTo', scale);
			}
		}
	};
	this.pageSizeOverlayModel.goZoomMode = function () {
		if (this.SHOW == true) {
			this.closeCurrentOverlay();
			this.zoomModel.onZoom();
		}
	};
	this.pageSizeOverlayModel.doSelectStyle = function () {
		if (this.SHOW == true) {
			this.selectStyle.openSelectStyle();
			this.closeCurrentOverlay();
		}
	};
	this.pageSizeOverlayModel.initSizeMenu = function () {
		var model, scale, minScale, maxScale, target;
		model = <global>.kbook.model;
		if (model) {
			switch (model.STATE) {
			case 'PAGE':
			case 'DICTIONARY':
				target = this.container;
				if (this.isDictionaryShown()) {
					scale = <global>.kbook.model.dictionaryCurrentScale;
					maxScale = this.commonMaxScale;
					minScale = this.commonMinScale;
					target.sandbox.initBtnShowHide(true);
					this.setVariable('VAR_ENABLE_ZOOM', false);
					this.setVariable('VAR_ENABLE_STYLE', false);
				}
				else {
					scale = <global>.parseInt(this.targetModel.doSomething('getAbsoluteScale'));
					maxScale = <global>.parseInt(this.targetModel.doSomething('getMaxScale'));
					minScale = <global>.parseInt(this.targetModel.doSomething('getMinScale'));
					target.sandbox.initBtnShowHide(false);
					this.setVariable('VAR_ENABLE_ZOOM', true);
					this.setVariable('VAR_ENABLE_STYLE', true);
				}
				scale = scale - this.commonMinScale;
				minScale = minScale - this.commonMinScale;
				maxScale = maxScale - this.commonMinScale;
				this.setVariable('VAR_RADIO_FONTSIZE', scale);
				this.setVariable('VAR_MAX_FONTSCALE', maxScale);
				this.setVariable('VAR_MIN_FONTSCALE', minScale);
				this.setVariable('VAR_UPDATE_FONTSIZE', false);
				this.setVariable('VAR_UPDATE_FONTSIZE', true);
			}
		}
	};
	this.pageSizeOverlayModel.initModel = function () {
		var model;
		model = <global>.kbook.model;
		if (model) {
			switch (model.STATE) {
			case 'PAGE':
			case 'DICTIONARY':
				if (model.STATE == 'PAGE') {
					this.setVariable('VAR_ENABLE_ZOOM', true);
					this.setVariable('VAR_ENABLE_STYLE', true);
				}
				else {
					this.setVariable('VAR_ENABLE_ZOOM', false);
					this.setVariable('VAR_ENABLE_STYLE', false);
				}
			case 'PICTURE':
				this.setVariable('VAR_RADIO_FONTSIZE', -1);
				this.setVariable('VAR_MAX_FONTSCALE', -1);
				this.setVariable('VAR_MIN_FONTSCALE', -1);
				this.setVariable('VAR_ENABLE_ZOOM', true);
				this.setVariable('VAR_ENABLE_STYLE', false);
			case 'MENU':
			case 'MENU_HOME':
			default:
				this.setVariable('VAR_RADIO_FONTSIZE', -1);
				this.setVariable('VAR_MAX_FONTSCALE', -1);
				this.setVariable('VAR_MIN_FONTSCALE', -1);
				this.setVariable('VAR_ENABLE_ZOOM', false);
				this.setVariable('VAR_ENABLE_STYLE', false);
			}
		}
		return true;
	};
	this.pageSizeOverlayModel.zoomChange = function () {
		this.zoomModel.onZoom();
	};
	this.pageSizeOverlayModel.doNext = function () {
		if (this.targetModel.overlayModel.onNextInstantZoom()) {
			return;
		}
		this.targetModel.doSomething('doBlink');
	};
	this.pageSizeOverlayModel.doPrevious = function () {
		if (this.targetModel.overlayModel.onPreviousInstantZoom()) {
			return;
		}
		this.targetModel.doSomething('doBlink');
	};
	this.pageSizeOverlayModel.doRoot = function () {
		this.closeCurrentOverlay();
		this.targetModel.doSomething('doRoot');
	};
	this.pageSizeOverlayModel;


6.4.2012 after some thinking:

SizeOverlay is loaded and initialized each time you press the size-button.
So your xml-variables will get initialized too.
If you look in the function initSizeMenu, in the spoiler above, you will notice this.setVariable('VAR_RADIO_FONTSIZE', scale); where scale is a variable outside the xml, preserving the state.

So you will have to add simillar to your JS code.
Define a var to hold your custom value lets name it myFontSize,
write a function myInitSizeMenu with a line
Code:
this.setVariable('VAR_RADIO_CSS_FONTSIZE', myFontSize);
and hook that new function to initSizeMenu, so that it will be executed right after.
Code:
Core.hook.hookAfter(..context to be found.. pageSizeOverlayModel, "initSizeMenu", myInitSizeMenu  );
Another notice:
the sending object is passed to every button-action.
So there is no need for different functions doFontSize5/7/6/8

You can go for: doFineFontSize = function (sender)
and within check for sender.id. It's the id defined in the xml.

Last edited by Mark Nord; 04-06-2012 at 08:33 AM. Reason: Additions 6.4.2012
Mark Nord is offline   Reply With Quote
Old 04-06-2012, 10:04 AM   #3607
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
Thank you for your further thinking. I was just writing an answer that contents the observation that VAR_RADIO_FONTSIZE is responsible for the button-behaviour. How can I get the decompiled files? They could be usefull.

I myself would have to give up at this point. Will work on it this evening and hopefully can finish the job over the weekend.

Sorry for another question - should be very easy to answer:

I have to write an OPTION-VALUE directly from within a function without using the option-menu. Option value is therefor not written automatically. I struggle to manage it.
What would be the command for say storing tha value 'size1' in the option named 'Option_Fontsize' from file ANALOGUS_OPTIONS.js?

A.
Analogus is offline   Reply With Quote
Old 04-06-2012, 11:15 AM   #3608
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
To answer the questiong
// Saves addon's non-default options as JSON object.
// WARNING: no escaping is done!
// Arguments:
// addon - addon who's settings must be saved
//
Core.settings.saveOptions = function(addon)

should do the trick.

To de-fsk (decompile) the fw.files you need:
fimware dump (e.g. form the-ebook.org)
cramfsck to extracted the cramfs-image
phyton 2.6x - not the current 2.7
dfsk (boroda-version)
Mark Nord is offline   Reply With Quote
Old 04-06-2012, 11:24 AM   #3609
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
I allready tried that with several variations. For example:
Core.settings.saveOptions = Option_Fontsize(ANALOGUS_OPTIONS)
But where to put the value ('Size1') to be stored?

This did not work in my case. I have problems to understand where I should put the name of the File ('ANALOGUS_OPTIONS.JS'), the Value ('Size1') and the Optionname ('Option_Fontsize').

What should I write on the position of 'function':
Core.settings.saveOptions = function(addon)

What on the position of addon? I guess the name of the addon-file ('ANALOGUS_OPTIONS').

A.
Analogus is offline   Reply With Quote
Old 04-06-2012, 11:36 AM   #3610
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
it' the name of your addon,
the one you specify in the last lines of your code
Core.addAddon(yourNameHere);

and you have to call it like this

Core.settings.saveOptions(yourNameHere);
Mark Nord is offline   Reply With Quote
Old 04-06-2012, 12:08 PM   #3611
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
I don't understand how value XY can be stored in the optionfile. How does Core.settings.saveOptions(yourNameHere) know, what value for what option to be stored?

Other way round:

The reason I want to do that is this:

1) I can change CSS-settings with several option-points from within PRS+ - options. No problem. Option value is stored automatically.

2) I can change CSS-settings from the Font-Size overlay too. This is done by calling another function which will manage it. But the chosen value should be stored in the optionfile responsible for the function in (1). So same value is displayed when going into PRS+ - options again later on. Otherwise the old value is displayed.

Edit: the stored option-value has just the to be there to display the chosen value in PRS+-options. No calling up on starting the reader or whatever...

A.

Last edited by Analogus; 04-06-2012 at 12:12 PM.
Analogus is offline   Reply With Quote
Old 04-06-2012, 12:54 PM   #3612
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
A,

Core.settings.saveOptions(yourNameHere);

simply saves all option-values not equal to default.

Code in spoiler taken from BookManagement.js
Spoiler:
Code:
optionDefs: [
			{
				name: 'subCollections',
				title: L('SUB_COLLECTIONS'),
				icon: 'BOOKS',
				defaultValue: 'false',
				values: ['true','false'],
				valueTitles: {
					'true': L('VALUE_TRUE'),
					'false': L('VALUE_FALSE')
				}
			},
			{
				name: 'subCollSeparator',
				title: L('SUB_COLLECTIONS_SEPARATOR'),
				icon: 'BOOKS',
				defaultValue: '|',
				values: ['|', '.', ',', ':', ';', '/', '~'],
			},
			{
				name: 'clearHistsOnShutdown',
				title: L('CLEAR_PAGE_HISTORY_ON_SHUTDOWN'),
				icon: 'CLOCK',
				helpText: L('CLEAR_PAGE_HIST_HELPTEXT'),
				defaultValue: 'false',
				values: ['true', 'false'],
				valueTitles: {
					'true': L('VALUE_TRUE'),
					'false': L('VALUE_FALSE')
				}	
			}
		],

Again, without knowing your code it is hard to be more specific.
Mark Nord is offline   Reply With Quote
Old 04-09-2012, 04:16 PM   #3613
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
Hi all!

A first compiled rough version for the PRS350 is online. Feel free to give it a try:
http://erhartc.bplaced.net/ereader/index.php
Click image for larger version

Name:	S6.jpg
Views:	521
Size:	54.8 KB
ID:	85077Click image for larger version

Name:	S8.jpg
Views:	495
Size:	39.2 KB
ID:	85078

New features:

- Changing line-height and font-size on the fly in most EPUBs
- Changing allignment (left, center, justified) & text-indent over options for most EPUBs
- New font-size-overlay

Source-Code (forgive the big mess inside the code...) online.

A.

Edit 14.04:
New features:
Changing reader-interface-font
Flexible way tuning CSS-tags

Last edited by Analogus; 04-14-2012 at 04:20 PM.
Analogus is offline   Reply With Quote
Old 04-09-2012, 05:24 PM   #3614
VICTORSJG
Addict
VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.
 
Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
Quote:
Originally Posted by Analogus View Post
Hi all!

A first compiled rough version for the PRS350 is online. Feel free to give it a try:
http://erhartc.bplaced.net/ereader/index.php
Attachment 85077Attachment 85078

New features:

- Changing line-height and font-size on the fly in most EPUBs
- Changing allignment (left, center, justified) & text-indent over options for most EPUBs
- New font-size-overlay

Source-Code (forgive the big mess inside the code...) online.

A.
Good work,

These options made for you are an improve to add to the default repository not only for x50 if not for the 300, 505 and 600 doing the modifications necessary to work out on them. I hope the developers take a count to add them (including the modification made for Terisa to take the sort of the collections)

Resetting/Storing/Restoring settings of PRS+:

Search for this function in PRS-options.
Easy changing system-fonts for TXT, LRF, RTF:
You will find this options in PRS-options.
There are 2 allready pre-installed fonts:
CharisSIL; LexiaDaMa and of course the original SONY-settings. 2 places are prepared to use your own fonts. Reader will restart automatically after changing!
Saving of System Cache.
Ever have had problems with vansihed notes, markups or reading progress? Make a backup to have a second chance!
Toggle battery-symbol. Whatfor? I don't want to be remembered that there is a battery while reading. It's an eReader and not the cockpit of a Learjet.
Changing Line-Height & fine graind Font-Size in EPUB-books on the fly in the redesigned Font-Size-Overlay
Changing Alignment & Indent for EBUP-books over options.
This new formattings don't work in every eBook. Regard this as a pre-release-version. Future will bring improvements.
New button in Font-Size-Overlay which function is user-assignable (close book, open TOC, open notes, open 'Swiss Knife'). Search in 'Additional Options' in PRS-options.

Last edited by VICTORSJG; 04-09-2012 at 05:32 PM.
VICTORSJG is offline   Reply With Quote
Old 04-14-2012, 11:47 AM   #3615
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
Question to developers:

I want to edit a specific TXT-file with the MEMO-App on/with my reader. How to manage it?

More info:

I have a specific TXT-file on a specific place on the reader. I want to be able to edit this file with the memo-application. Why?
Idea is to edit CSS-files without plug the reader to the PC. I tried to solve it with the functionality allready exists (copy notes to txt and vice versa).

My code goes like that:
Code:
...
case 'CopyTo':
	Core.shell.exec ('cp -f /Data/Notepads/1334415424314.963.note.txt /Data/database/system/PRSPlus/epub/CSS/extern.css'); 
break;

case 'CopyFrom':
	Core.shell.exec ('cp -f /Data/database/system/PRSPlus/epub/CSS/extern.css /Data/Notepads/1334415424314.963.note.txt'); 
break; 
...
Problem is a NEW TXT-file in /Notepads will not be recognized as Memo. And every new memo gets a new filename. If I would delete this note, code is not working any longer.

Any ideas?

A.
Analogus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using HD Folders as Collections on Sony PRS-505 fglaysher Calibre 8 07-26-2010 09:55 PM
Enhanced Firmware for V3 keng2000 HanLin eBook 12 04-12-2010 09:30 AM
Poll: Sony Reader PRS-505 upgrade to Sony PRS-700 Kris777 Sony Reader 70 02-18-2009 06:34 PM
Sony Reader PRS-505 upgrade to Sony PRS-700 Kris777 Sony Reader 23 12-08-2008 06:56 AM
Sub folders in firmware v1.08 Prince Hal Amazon Kindle 28 10-23-2008 03:20 PM


All times are GMT -4. The time now is 10:49 AM.


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