Thread Locked This thread is locked - replies are not allowed.


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


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

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 26 Mar 22, 14:54   in response to: RobM in response to: RobM
 
RobM wrote:
Unfortunately external tools still need to account for oddball naming.

Fortunately, we have an oddball tool developer to rely upon.

(For fans of ambiguous adjectives. ;) )
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 27 Mar 22, 23:18   in response to: davidekholm in response to: davidekholm
 
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.

I don't think there's anything wrong with a skin saying, "if you want to use this new version of the skin, you must have the latest version of jAlbum." If users don't want to keep their jAlbum licenses current, they have the option of not updating the skin, either.

While I don't need the ad hoc ability of an API call, it does have the virtue of making it much more difficult for users to tinker with the settings.
davidekholm

Posts: 3,796
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 13:33   in response to: JeffTucker in response to: JeffTucker
 
I've now released v27.0.4 as a core update. This version supports the new skin property disabledControls. Here's an example that will disable a list of UI controls by supplying a comma separated list of component names:
disabledControls=processFolderThumbs,superimposeFilmIcon,widgetInjection,directoryChaining
You can also separate them with comma and space:
disabledControls=processFolderThumbs, superimposeFilmIcon, widgetInjection, directoryChaining

The tool-tip for disabled controls will say "Disabled by current skin", but this requires an update to texts.properties:
ui.disabledBySkin=Disabled by current skin

When another skin is loaded, the disabled state is reverted and old tool-tips reinstalled.
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 14:11   in response to: davidekholm in response to: davidekholm
 
I like it. Works well. :)

I'll tinker, just to see if there's anything really weird that needs to be addressed.
davidekholm

Posts: 3,796
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 14:14   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
I like it. Works well. :)

I'll tinker, just to see if there's anything really weird that needs to be addressed.


Good.

FYI: This mechanism doesn't disable whole panels, just individual components, so you may still wish to use the enableThumbnailLayout=false property to disable thumbnail layout.
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 14:30   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
FYI: This mechanism doesn't disable whole panels, just individual components, so you may still wish to use the enableThumbnailLayout=false property to disable thumbnail layout.

Great minds think alike - I initially thought this change would make that older setting unnecessary, but quickly realized that it's a field disabler, not a panel disabler.

Offhand, I can think of only one other panel that I might want to disable in its entirety, and that's the Image linking from thumbnails panel on the Pages tab. In my NoPages skin, the skin settings take over all of that. But that's a pretty extreme fringe case.

ETA: Actually, a couple more of the panels on that tab. But there's no need for the core to address this, since it would be for only one very strange "skin." ;)
davidekholm

Posts: 3,796
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 14:32   in response to: davidekholm in response to: davidekholm
Helpful
Update: I prefer for this new mechanism to handle wholes panels too, so now I've fixed that. Just issue a core update to get the updated version.

Your skin.properties may now, for instance, contain the following in order to disable the thumbnail layout panel:
disabledControls=thumbnailLayoutPanel


You may naturally wonder what names are being used for various panels and controls. Here's a new API call that "visits" all components and prints out the names of those who contain the word "Panel" (execute from the system console, using Groovy:
window.binder.walkComponents((name, comp) -> {
	if (name.contains("Panel")) {
		println name
	}
})
This prints the following:
mainSettingsPanel
accountStatusPanel
imageLinkingPanel
notesPanel
imagesPanel
imageEffectsPanel
videosPanel
generalPanel
imageBoundsPanel
creditLinksPanel
commentSourcesPanel
skinSettingsPanel
scalingMethodPanel
variantsPanel
thumbnailLayoutPanel
copyrightEmbeddingPanel
homepageLinkingPanel
advancedPanel
imagesAdvancedPanel
imageOrderingPanel
outputDirectoryPanel
collaborativePanel
imageDirectoryPanel
upperPanel
davidekholm

Posts: 3,796
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 14:38   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:

Offhand, I can think of only one other panel that I might want to disable in its entirety, and that's the Image linking from thumbnails panel on the Pages tab. In my NoPages skin, the skin settings take over all of that.

In that case you'd add:
disabledControls=imageLinkingPanel
RobM

Posts: 3,876
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 15:00   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
This all sounds great, just checking it is for real, given the date ;)
Will have a play tonight.
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 15:13   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
Update: I prefer for this new mechanism to handle wholes panels too, so now I've fixed that. Just issue a core update to get the updated version.

I like it - a generalized solution is best.

You may naturally wonder what names are being used for various panels and controls.

Calling WikiRobM! This is the kind of information that tends to get lost in the mists of time.
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 15:14   in response to: RobM in response to: RobM
 
RobM wrote:
This all sounds great, just checking it is for real, given the date ;)

Yes, this might just be another cruel jAlbum hoax. ;)
RobM

Posts: 3,876
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 15:43   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
davidekholm wrote:
Update: I prefer for this new mechanism to handle wholes panels too, so now I've fixed that. Just issue a core update to get the updated version.

I like it - a generalized solution is best.

You may naturally wonder what names are being used for various panels and controls.

Calling WikiRobM! This is the kind of information that tends to get lost in the mists of time.

I expect the API will be updated to include walkComponents, but to make it easier I have updated the console snippets page, last entry - at the moment.

Edited by: RobM on 1 Apr 2022, 19:11
Added the information to
https://jalbum.net/help/en/GUI_Settings_and_jalbum-settings.jap
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 15:56   in response to: davidekholm in response to: davidekholm
 
Found one situation in which the left hand doesn't know what the right hand is doing. Not important, but worth noting.

The core enables/disables the Make slide pages control based upon whether the skin has a slide.htt file. Logical. But if a skin wants to insist that slide pages are always made, and the user can't turn it off, the skin can't disable slides - the core overrides it. It's easy enough, of course, to force the issue in init.bsh.

This did not actually surprise me. ;)
RobM

Posts: 3,876
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 16:12   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
Found one situation in which the left hand doesn't know what the right hand is doing. Not important, but worth noting.

The core enables/disables the Make slide pages control based upon whether the skin has a slide.htt file. Logical. But if a skin wants to insist that slide pages are always made, and the user can't turn it off, the skin can't disable slides - the core overrides it. It's easy enough, of course, to force the issue in init.bsh.

This did not actually surprise me. ;)

Thinking out aloud, without deep thinking. If there is still a need for an override in init bsh maybe a getter/setter method, based on the ‘walkComponents‘ idea, would be better? If not then the core should really obey the skin disabledControls property. Having one exception sets a bad precedent.
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 16:22   in response to: RobM in response to: RobM
 
There are two things here that are related, but not the same.

A setting can be forced to true or false. This gets confusing because it can be done in init.bsh or by the skin's UI. This also gets dodgy because changing a setting via init.bsh might not update the project's hash values early enough to trigger the necessary reprocessing (as is the case with trying to programmatically change something like image bounds). Very murky.

A setting can be enabled or disabled. This is done only by skin.properties.

I think I need a large whiteboard. ;)
Legend
Forum admins
Helpful Answer
Correct Answer

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