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 ] - Last Post: 9 Apr 22, 12:15 Last Post By: davidekholm Threads: [ Previous | Next ]
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 17:42   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. ;)


Good that you spotted that one. I easily fixed it by rearranging the order of calls so the disabledControls skin property is handled last.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 17:47   in response to: RobM in response to: RobM
 
RobM wrote:
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.

I wouldn't recommend calling walkComponents in init.bsh, but a skin may call it during onload in order to apply more complex logic for the disabling of components for instance. IF a skin takes this path, then it's important that the skin installs a callback that restores the enabled state for controls when the skin is unloaded. It's highly recommended to instead use the disabledComponents skin property as it takes care of restoring the state.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 18:18   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
It's highly recommended to instead use the disabledComponents skin property as it takes care of restoring the state.

A walk down memory lane.... Years ago, there was one skin (don't remember which) that turned off processing of thumbnail images, but didn't reset it. These days, the core takes care of that, but back then, it led to all sorts of fun in the form of bug reports. There would be no thumbnails in the output, but there's no user setting to turn them back on.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 20:15   in response to: RobM in response to: RobM
 

Good place for it. Thanks!
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 21:35   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.

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

To Minimal skin I added disabledControls=advancedPanel
When I open the Advanced panel all of the tabs are disabled, so I can't select Metadata for example. But, I can change the settings on the General tab and those changes are made and saved.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 21:44   in response to: RobM in response to: RobM
 
Yeah, I wasn't sure which panel was actually being referenced with that panel name - thought it might be the advanced settings on the Video panel. But no, it's the whole Advanced tab. Probably not a very useful option!
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 21:54   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
Yeah, I wasn't sure which panel was actually being referenced with that panel name - thought it might be the advanced settings on the Video panel. But no, it's the whole Advanced tab. Probably not a very useful option!
Not a particularly useful thing to do, but I am just testing and now how do I:
Disable the settings that are left active, one at a time?
Disable a a tab on a pane, like Advanced on the Images pane? Is it not possible? Can I disable the pane but enable a specific tab?

Not sure any of the above will actually be wanted, just trying to establish the limits.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 22:09   in response to: RobM in response to: RobM
 
RobM wrote:
Disable the settings that are left active, one at a time?

For those, you just need to disable the individual variables, like directoryChaining, includeDirectories, updatedDirsOnly, subdirs, and so on.

Disable a tab on a pane, like Advanced on the Images pane? Is it not possible?

It would appear that the panel layouts aren't done with a consistent structure, so unless there's an outline box around something, you can't really count on the fact that it has a panel name that you can target. Some you can, some you can't.

Can I disable the pane but enable a specific tab?

No, since there's no "enable" mechanism.

And there's one that you can't target by panel name or by variable name, and that's the entire Structure tab (which also explains the occasionally odd behavior of those settings after saving - they're not like other variables).
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 1 Apr 22, 22:20   in response to: JeffTucker in response to: JeffTucker
 
JeffTucker wrote:
RobM wrote:
Disable the settings that are left active, one at a time?

For those, you just need to disable the individual variables, like directoryChaining, includeDirectories, updatedDirsOnly, subdirs, and so on.

Seems to me that disabling a pane should disable all controls on the pane, not just other tabs on that pane.
Disable a tab on a pane, like Advanced on the Images pane? Is it not possible?

It would appear that the panel layouts aren't done with a consistent structure, so unless there's an outline box around something, you can't really count on the fact that it has a panel name that you can target. Some you can, some you can't.

It would be nice to able able to disable Images.General or Images.Advanced, or even Images{Advanced} or whatever.
Can I disable the pane but enable a specific tab?

No, since there's no "enable" mechanism.

Symmetry ;)
And there's one that you can't target by panel name or by variable name, and that's the entire Structure tab (which also explains the occasionally odd behavior of those settings after saving - they're not like other variables).
There's aways one, and before you say it, it's not me! ;)
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 2 Apr 22, 10:45   in response to: RobM in response to: RobM
 
Did I just open a can of worms? ;-)

Yes, this reveals some internal naming that isn't fully consistent (with regards to panels I think), but let's not be too anal about this. I hope and think that this general API will only be used to disable some specific UI controls.

You've noticed that disabling a whole tab doesn't in fact disable all contents within, but disabling panels work. In Swing (the UI framework mostly used in jAlbum), disabling a parent component, like a panel actually doesn't visually disable the components it contains. I think this is a design mistake really. In my own panels (ControlPanel class) I've handled this disabling of containing components manually, but I obviously haven't done the same trick with tabs. Let me know if this is really important for you.

I'll be away skiing a couple of days, so I may not be that responsive in the forum until next Friday.
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 2 Apr 22, 12:46   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
Did I just open a can of worms? ;-)
Enjoy your break, everything can wait a wee or so. For when you do get back:

The control of individual settings is of more interest to me than panels. My observations on panels were just that, me trying to figure out what to expect and if the results were as intended.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: Let a skin disable "Process folder thumbs"
Posted: 2 Apr 22, 13:35   in response to: davidekholm in response to: davidekholm
 
Attachment triton1.png (26.5 KB)
Attachment triton2.png (21.3 KB)
Attachment triton3.png (21.5 KB)
Attachment triton4.png (21.5 KB)
davidekholm wrote:
I hope and think that this general API will only be used to disable some specific UI controls.

I've had no problem disabling the things I want to, and it's a different set for various skins. Triton, for example, doesn't support folders, doesn't create thumbnails, and has no place to put things like a credit link, and it's been easy to target the things I need to target (see screenshots). NoPages is even more fun. ;)

You've noticed that disabling a whole tab doesn't in fact disable all contents within, but disabling panels work. In Swing (the UI framework mostly used in jAlbum), disabling a parent component, like a panel actually doesn't visually disable the components it contains.

Familiar territory. I ran into that when trying to disable the Custom panel in my skins when the user hasn't chosen the Custom style. There's no nice, quick shortcut. Instead of disabling all of the settings on that panel, I just swap out the whole thing.

Let me know if this is really important for you.

We can certainly just wait for a use case to arise, then deal with it.
davidekholm

Posts: 3,825
Registered: 18-Oct-2002
Re: Let a skin disable "Process folder thumbs"
Posted: 9 Apr 22, 12:15   in response to: JeffTucker in response to: JeffTucker
 
Sounds good Jeff. Let's wait and see whether we need to tweak this new mechanism further.
Legend
Forum admins
Helpful Answer
Correct Answer

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