The International Simutrans Forum

 

Author Topic: [patch]Adding name filter to depot  (Read 5958 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 334
  • Languages: JP,EN
[patch]Adding name filter to depot
« on: March 28, 2017, 12:57:39 AM »
(This is a remaking version of this. 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.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1269
  • PAK-DEV P192C
  • Languages: DE, EN
Re: [patch]Adding name filter to depot
« Reply #1 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 :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: [patch]Adding name filter to depot
« Reply #2 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.
« Last Edit: March 29, 2017, 02:28:56 AM by prissi »

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1232
    • Simutrans-BLOG
  • Languages: ES
Re: [patch]Adding name filter to depot
« Reply #3 on: April 03, 2017, 09:29:41 AM »
A small detail with the filter.


Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: [patch]Adding name filter to depot
« Reply #4 on: April 03, 2017, 11:55:38 PM »
This works fine for me. Maybe some of your defines still had a wrong height?

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1232
    • Simutrans-BLOG
  • Languages: ES
Re: [patch]Adding name filter to depot
« Reply #5 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.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1232
    • Simutrans-BLOG
  • Languages: ES
Re: [patch]Adding name filter to depot
« Reply #6 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: [patch]Adding name filter to depot
« Reply #7 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.