This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 42 - Pages: 3 [ 1 2 3 | Next ] - Last Post: 9 Apr 22, 12:15 Last Post By: davidekholm Threads: [ Previous | Next ]
JeffTucker

Posts: 8,225
Registered: 31-Jan-2006
Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 12:39
 
  Click to reply to this thread Reply
(This was mentioned in the beta thread - I just wanted to memorialize it on its own.)

A skin should be able to "gray out" the Process folder thumbs checkbox, while keeping the folder bounds accessible. In several of my skins, the use of folder thumbs is mandatory - the user shouldn't be able to turn it off manually.
davidekholm

Posts: 3,483
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 12:54   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I'll look into that. What if I let the skin developer simply supply a "disabled-controls.properties" file that simply lists the controls to disable for that skin?
JeffTucker

Posts: 8,225
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 12:57   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That would be a good generalized solution. There's a handful of settings that many skins no longer use, and it would be helpful to disable them, rather than letting the user tinker with them, then wonder why they don't work!
RobM

Posts: 3,845
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 12:58   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I'll look into that. What if I let the skin developer simply supply a "disabled-controls.properties" file that simply lists the controls to disable for that skin?
If that lets you disable rows and columns etc. I’m in favour of it :)
JeffTucker

Posts: 8,225
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 13:00   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
You can already disable Thumbnail layout, but it's a single-purpose skin property setting, enableThumbnailLayout=false. This would be more flexible, letting you target pretty much anything, I assume.
AndreWolff

Posts: 1,158
Registered: 14-Dec-2007
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 13:20   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I'll look into that. What if I let the skin developer simply supply a "disabled-controls.properties" file that simply lists the controls to disable for that skin?
The skin should be able to dynamically "gray out" the Process folder thumbs checkbox, so not only after skin loading. Is that possible with your proposal?
davidekholm

Posts: 3,483
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 13:43   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
I'll look into that. What if I let the skin developer simply supply a "disabled-controls.properties" file that simply lists the controls to disable for that skin?
The skin should be able to dynamically "gray out" the Process folder thumbs checkbox, so not only after skin loading. Is that possible with your proposal?

I don't get it. Why should this checkbox be grayed-out before skin loading?
AndreWolff

Posts: 1,158
Registered: 14-Dec-2007
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 14:10   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
AndreWolff wrote:
davidekholm wrote:
I'll look into that. What if I let the skin developer simply supply a "disabled-controls.properties" file that simply lists the controls to disable for that skin?
The skin should be able to dynamically "gray out" the Process folder thumbs checkbox, so not only after skin loading. Is that possible with your proposal?

I don't get it. Why should this checkbox be grayed-out before skin loading?

I said it should dynamically possible to enable or disable this setting. Because you are talking about a file with properties, I thought that this was a static setting set after skin loading.
davidekholm

Posts: 3,483
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 18:30   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
The proposal is to use a descriptive way, i.e. let the skin signal what controls to disable via a property file. The other way would be an imperative API way, i.e. to call a method in onload to disable select fields.
AndreWolff

Posts: 1,158
Registered: 14-Dec-2007
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 22:51   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
The proposal is to use a descriptive way, i.e. let the skin signal what controls to disable via a property file. The other way would be an imperative API way, i.e. to call a method in onload to disable select fields.
I have no idea what you mean by this.
Please say simple yes or no to the next question:
With your proposal, can I call a function in init.bsh to enable or disable the “Process folder thumbs” check-mark?
JeffTucker

Posts: 8,225
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 25 Mar 22, 22:59   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
The proposal is to use a descriptive way, i.e. let the skin signal what controls to disable via a property file. The other way would be an imperative API way, i.e. to call a method in onload to disable select fields.

For my skins, it makes no difference. Fields would be either enabled or disabled from the get-go. I wouldn't ever be changing them on an ad hoc basis, based on choices in the skin's UI.
davidekholm

Posts: 3,483
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 26 Mar 22, 13:39   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
The proposal is to use a descriptive way, i.e. let the skin signal what controls to disable via a property file. The other way would be an imperative API way, i.e. to call a method in onload to disable select fields.
I have no idea what you mean by this.
Please say simple yes or no to the next question:
With your proposal, can I call a function in init.bsh to enable or disable the “Process folder thumbs” check-mark?

Well, that would be my 2:nd option. My initial option involves adding a "disabled-components.properties" file to skins that wish to disable select component. With that approach, skins can't change the disabled state ad-hoc, so it's less powerful than calling a method, but also more abstract, meaning that it gives more space for jAlbum to be clever about it, for instance to not just re-enable a disabled component when the skin closes because that would violate another rule. My property file approach is also forward-compatible meaning, it won't break if you load a skin supporting this in an older jAlbum version. That property file will simply be ignored then. The API approach on the other hand causes errors with earlier versions of jAlbum unless the skin wraps this new call in try-catch blocks.
JeffTucker

Posts: 8,225
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 26 Mar 22, 13:53   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Just for info, I took a quick look at the jAlbum settings, and I would "gray out" the following:

  • Process folder thumbs in the 5 skins that support folder thumbs. In 4 of them, they're mandatory, and in the 5th, it's indirectly controlled by a related skin setting.
  • Thumbnail layout in all skins. With responsive design, that's an anachronism.
  • Superimpose play icon on video thumbnails in all of my skins that support videos. They now all provide their own thumbnail overlays for videos, web locations, folders, and audio files, with a consistent style, so the jAlbum overlay shouldn't ever be used.
  • Directory chaining in 3 skins that are inherently incompatible with it.
  • Include jAlbum widget support in all my skins.

I can't think of any jAlbum setting that I would enable/disable ad hoc.
AndreWolff

Posts: 1,158
Registered: 14-Dec-2007
Re: Let a skin disable "Process folder thumbs"
Posted: 26 Mar 22, 14:50   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
The API approach on the other hand causes errors with earlier versions of jAlbum unless the skin wraps this new call in try-catch blocks.
That is the same problem as using the new functions
engine.setFolderThumbSize()
engine.setProcessFolderThumbs()
I call these functions only if I see that the jAlbum version number is > 26. That is also possible with your new API I guess.
RobM

Posts: 3,845
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 26 Mar 22, 14:51   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
Just for info, I took a quick look at the jAlbum settings, and I would "gray out" the following:
Being able to diable all of the naming settings, like closeupDirectory, pageExtension etc. would certainly simplify coding of skins. Unfortunately external tools still need to account for oddball naming.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums