#1 2018-02-12 19:34:31

van der Decken
Member
Registered: 2018-01-30
Posts: 27

[Patch] Hide Tonight menu item if no <random> in model

The existing code hides the "Tonight" toolbar entry when there's no filter in the model's <random> tag, but the menu entry is still shown. I discovered this in my "I wonder what this does" exploration of the UI. I've attached a patch that hides the menu item too when there's no random filter.


Attachments:
Attachment Icon hide-tonight-menu-item.patch, Size: 1,206 bytes, Downloads: 48

Offline

 

#2 2018-02-13 13:44:36

kerenoc
Member
Registered: 2016-03-19
Posts: 217
Website

Re: [Patch] Hide Tonight menu item if no <random> in model

Do we really want to hide this feature? It just picks an item in the whole collection at random even if there is no filter. It could be a way to rediscover some forgottent hidden gems in large collections.

Offline

 

#3 2018-02-13 17:03:00

van der Decken
Member
Registered: 2018-01-30
Posts: 27

Re: [Patch] Hide Tonight menu item if no <random> in model

If you look at the existing code, it already hides the toolbar "Tonight" item when there is no random filter. To be consistent, shouldn't both the toolbar and menu items either both be hidden, or both be visible? They both do the same thing, so why hide just one of them when there's no random filter?

Offline

 

#4 2018-02-13 17:41:47

kerenoc
Member
Registered: 2016-03-19
Posts: 217
Website

Re: [Patch] Hide Tonight menu item if no <random> in model

You're right. For me, "tonight" is not very explicit. I would suggest to keep both the menu item and the toolbar icons in all case but then change the name to "Random".

I think the current situation reveals the history of GCstar that started as GCFilms!

Offline

 

#5 2018-02-13 18:41:23

van der Decken
Member
Registered: 2018-01-30
Posts: 27

Re: [Patch] Hide Tonight menu item if no <random> in model

"Tonight" had me scratching my head when I first found it. It wasn't until I started digging into the code that I figured out what it was doing.

For films, books, and TV episodes it's definitely a handy thing. "Hmm. I'm bored. What shall I watch/read tonight?" Especially I suppose when the random filter is based on a viewed/read flag. But for other types of collections, it doesn't seem to make a whole lot of sense. "What stamp/coin shall I look at next?" just doesn't seem all that useful a thing to do.

Given that the similar toolbar item is shown or hidden based on the model, I imagine that the menu item not doing the same is simply something that slipped through. I think leaving it up to the model is a good idea. If the model file has a random filter, show it. Rename it perhaps so that it's more obvious what it is. But each to their own; I know what I'm going to do! smile

Last edited by van der Decken (2018-02-13 18:41:39)

Offline

 

#6 2018-02-13 20:46:58

kerenoc
Member
Registered: 2016-03-19
Posts: 217
Website

Re: [Patch] Hide Tonight menu item if no <random> in model

I have similar thoughts for the Play button : it makes sense for digital media (films, series, ebooks) but for other collections it only opens the directory where the collection is!

Offline

 

#7 2018-02-13 21:18:56

van der Decken
Member
Registered: 2018-01-30
Posts: 27

Re: [Patch] Hide Tonight menu item if no <random> in model

Interesting... I just opened up a new coin collection to have a look at the toolbar and menus and saw that the Play button was there in the toolbar. I don't see a Play button with a stamp collection. The difference is that GCcoins.gcm has <options>...<fields>...<play/> and GCstamps.gcm doesn't. It seems that even an empty <play/> tag is sufficient for GCModel to return a true value for hasPlay, whereas hasRandom won't return a true unless the <random> tag actually contains a filter. I'm kind of glad that whoever put the stamps schema together was a bit lazy!

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.