Place selector defaults

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Place selector defaults

adrian.davey
Is it possible when selecting a place [in the event editor] to set the
default of the search criterion selector?

It appears to default ot "Name contains", but there are many situations
where I would much prefer to set it to look for "Title contains", since
I use custom titles extensively. It is extremely tedious to have to
change the search criterion every time via the drop-down.

Adrian Davey



_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Place selector defaults

Dave Scheipers
Hi Adrian

The Default of the Search is dependent on the order of the columns
displayed. You could modify the code changing the order of the
columns. That would just establish a new default.

But the "Name" field has the place hierarchy which is used to manually
traverse the list. So I believe that at least that field must remain
the first column.... which means that "Name contains..." will be the
default search option.

Dave

On Sat, Feb 16, 2019 at 1:53 AM Adrian Davey <[hidden email]> wrote:

>
> Is it possible when selecting a place [in the event editor] to set the
> default of the search criterion selector?
>
> It appears to default ot "Name contains", but there are many situations
> where I would much prefer to set it to look for "Title contains", since
> I use custom titles extensively. It is extremely tedious to have to
> change the search criterion every time via the drop-down.
>
> Adrian Davey
>
>
>
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Place selector defaults

prculley
In reply to this post by adrian.davey
It is possible, by modifying the Gramps code.
If you can find the source code sub-directory and file gramps/gui/selectors/selectplace.py you could add
cols = [cols[3],cols[0],cols[1],cols[2],cols[4]]
just before line 87 (assuming Gramps 5.0.1) so that it looked like this:
        cols = [(pair[3],
                 pair[1] if pair[1] else 11,
                 pair[0] in self.exact_search())
                for pair in self.column_order() if pair[0]
                ]
        cols = [cols[3],cols[0],cols[1],cols[2],cols[4]]
        self.search_bar.setup_filter(cols)

This rearranges the order of items in the drop down list so that Title is first.

Paul C.


On Sat, Feb 16, 2019 at 12:53 AM Adrian Davey <[hidden email]> wrote:
Is it possible when selecting a place [in the event editor] to set the
default of the search criterion selector?

It appears to default ot "Name contains", but there are many situations
where I would much prefer to set it to look for "Title contains", since
I use custom titles extensively. It is extremely tedious to have to
change the search criterion every time via the drop-down.

Adrian Davey



_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org