View Single Post
Old 07-18-2018, 09:52 AM   #142
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,808
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by jcn363 View Post
I realy prefer to make a device dedicated one versus worldwide one.

It depends on the patch and/or the value of parameter/variable. If you pass a number of devices as parameter the patch will made for those devices. If you don't pass a parameter (or var is null) the program acts as now.

This could be a comparative
Spoiler:
Code:
  - FindZlib: "#connectedPixmap {"
  - ReplaceZlib:
      Find:    "#title[qApp_deviceIsTrilogy=true] {\n  font-size: 29px;\n}\n#title[qApp_deviceIsPhoenix=true] {\n  font-size: 36px;\n}\n#title[qApp_deviceIsDragon=true] {\n  font-size: 46px;\n}\n#title[qApp_deviceIsDaylight=true] {\n  font-size: 60px;\n}"
#      Replace: "#title[qApp_deviceIsTrilogy=true]{font-size:33px;}"
#      Replace: "#title[qApp_deviceIsPhoenix=true]{font-size:39px;}"
#      Replace: "#title[qApp_deviceIsDragon=true]{font-size:49px;}"
      Replace: "#title[qApp_deviceIsDaylight=true]{font-size:60px;}"

  - FindZlib: "#connectedPixmap {"
  - ReplaceZlib:
      Find:    "#title[qApp_deviceIsTrilogy=true] {\n  font-size: 29px;\n}\n#title[qApp_deviceIsPhoenix=true] {\n  font-size: 36px;\n}\n#title[qApp_deviceIsDragon=true] {\n  font-size: 46px;\n}\n#title[qApp_deviceIsDaylight=true] {\n  font-size: 60px;\n}"
      Replace: "#title[qApp_deviceIs{{device}}=true] !If [AuraOne, {font-size:60px;}, [Dragon, {font-size:49px;}, [Phoenix, {font-size:39px;}, {font-size:33px;}]]]"

In the first case (now) the user must go patch by patch changing the value he/she wants. In the second one he/she only must say the device once.
I think it's pretty simple for the common user.

Good luck.
Hmm. I'm not totally convinced this is a good idea. This would add a lot of parsing complexity, make patches less readable, and increase the change of mistakes and bugs. The only benefits would be shorter patches and less comments if I understand this correctly.

Also, did you get the quotes working properly?
geek1011 is offline   Reply With Quote