The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: THLeaderH on March 28, 2017, 12:57:39 AM

Title: [patch]Adding name filter to depot
Post by: THLeaderH on March 28, 2017, 12:57:39 AM
(This is a remaking version of this (https://forum.japanese.simutrans.com/index.php?topic=361). I got a permission of reproduction from the original author.)
This patch adds a name filter to a depot.
  • The left button switches whether the filter is applied or not.
  • Pak names or translated texts can be used for search. It's case sensitive.
This patch is r8121 based, but I confirmed that this patch can be applied to r8154 without any problems.
Title: Re: [patch]Adding name filter to depot
Post by: Leartin on March 28, 2017, 05:53:14 AM
Would it be possible to add a way to safe some search words in a dropdown list? Ideally, pakset-sensitive and with the possibility for paksets to come with some pre-defined filters :)
Title: Re: [patch]Adding name filter to depot
Post by: prissi on March 29, 2017, 12:29:18 AM
Extending the standard size is not very nice, as it break the tileability. Also which the checkbox? If empty, then there should be no filtering ...

Also the adding of listeners must be done on initialisation, not when updating the size.

EDIT: There were also lot of obsolete code in the depot frame after combobox renovation. All repaired and incorporated in r8160.
Title: Re: [patch]Adding name filter to depot
Post by: Yona-TYT on April 03, 2017, 09:29:41 AM
A small detail with the filter.
(https://www.mediafire.com/convkey/e60d/krhbr75fa2trnc96g.jpg)
Title: Re: [patch]Adding name filter to depot
Post by: prissi on April 03, 2017, 11:55:38 PM
This works fine for me. Maybe some of your defines still had a wrong height?
Title: Re: [patch]Adding name filter to depot
Post by: Yona-TYT on April 04, 2017, 01:51:52 AM
This works fine for me. Maybe some of your defines still had a wrong height?
Select the drop-down filter and then you must resize the deposit window, that should be enough.
Title: Re: [patch]Adding name filter to depot
Post by: Yona-TYT on July 24, 2019, 01:15:13 PM
Sorry for reliving an old theme.

I had never used the word search in the warehouse, and now that I try it, I have found a little inconvenience.

The problem is the distinction between upper and lower case letters, I think that in searches for text in much more useful terms, there are no differences between upper and lower case letters, in my humble opinion.
Title: Re: [patch]Adding name filter to depot
Post by: prissi on August 04, 2019, 12:15:50 PM
There is unfortunately no standard UTF-8 compatible pattern matching. So while A and a are the same ä and Ä would not.