Place displayer testing

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

Place displayer testing

Nick Hall
For those of you who would like to test the new place displayer
functionality, I have pushed a branch called "displayer" to my git
fork.  To checkout the branch use:

git remote add nick git://git.code.sf.net/u/nick-h/gramps
git checkout -b displayer nick/displayer

You will see a new "Place format" option in the "Display" tab in the
preferences.  Set this to "Automatic" to generate place names from the
place hierarchy.

The standard Gramps date matching functionality is used when generating
place names.  You may wish to change the "Date before range" and "Date
after range" options in the "Dates" tab of the preferences.  An empty
date in a place reference will match all dates.  A place name generated
without a date supplied will use today's date to generate a modern place
name.

Everything should be working, except that family lines graph and report
substitution variables will only show modern place names. This needs
further work.  Also, please note that all third-party add-ons will still
use the place title field.

The branch is based on the gramps41 maintenance branch, and the changes
don't involve code that writes to the database.  Although I don't expect
any problems, I still recommend making a backup before testing.

Any comments and suggestions are welcome.

Regards,


Nick.


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

Re: Place displayer testing

Philip Weiss
How do you want us to send feedback?  I've found a bug or two.

Phil

On Fri, Nov 7, 2014 at 2:41 PM, Nick Hall <[hidden email]> wrote:

Any comments and suggestions are welcome.


------------------------------------------------------------------------------

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

Re: Place displayer testing

Nick Hall
Posting to the list is probably easiest for now.

Nick.


On 08/11/14 02:50, Philip Weiss wrote:
How do you want us to send feedback?  I've found a bug or two.

Phil

On Fri, Nov 7, 2014 at 2:41 PM, Nick Hall <[hidden email]> wrote:

Any comments and suggestions are welcome.



------------------------------------------------------------------------------

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

Re: Place displayer testing

enno
In reply to this post by Nick Hall
Nick,
> For those of you who would like to test the new place displayer
> functionality, I have pushed a branch called "displayer" to my git
> fork.  To checkout the branch use:
>
> git remote add nick git://git.code.sf.net/u/nick-h/gramps
> git checkout -b displayer nick/displayer
Today, I got these errors:

enno@enno-MS-7797 ~/gramps-source $ git checkout -b displayer nick/displayer
fatal: Cannot update paths and switch to branch 'displayer' at the same
time.
Did you intend to checkout 'nick/displayer' which can not be resolved as
commit?
enno@enno-MS-7797 ~/gramps-source $ git checkout nick/displayer
error: pathspec 'nick/displayer' did not match any file(s) known to git.

Any idea?

thanks,

Enno


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

Re: Place displayer testing

Sebastian Schubert

Hi Enno,

I cannot check at the moment, but I guess you have to fetch from nick remote first. Something like

git fetch nick
or
git pull

after adding the nick remote should work. Then you can do the checkout command.

HTH
Sebastian

Am 09.11.2014 15:13 schrieb "Enno Borgsteede" <[hidden email]>:
Nick,
> For those of you who would like to test the new place displayer
> functionality, I have pushed a branch called "displayer" to my git
> fork.  To checkout the branch use:
>
> git remote add nick git://git.code.sf.net/u/nick-h/gramps
> git checkout -b displayer nick/displayer
Today, I got these errors:

enno@enno-MS-7797 ~/gramps-source $ git checkout -b displayer nick/displayer
fatal: Cannot update paths and switch to branch 'displayer' at the same
time.
Did you intend to checkout 'nick/displayer' which can not be resolved as
commit?
enno@enno-MS-7797 ~/gramps-source $ git checkout nick/displayer
error: pathspec 'nick/displayer' did not match any file(s) known to git.

Any idea?

thanks,

Enno


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

------------------------------------------------------------------------------

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

Re: Place displayer testing

enno
Hallo Sebastian,

> I cannot check at the moment, but I guess you have to fetch from nick
> remote first. Something like
>
> git fetch nick
> or
> git pull
>
> after adding the nick remote should work. Then you can do the checkout
> command.
>
Thanks, the fetch helped, but I got another error now:

po/eo.po:32403: dubbele definitie van een bericht...
po/eo.po:11228: ...dit is de plek van de eerste definitie
msgfmt: 1 fatale fout gevonden

You'll probably recognize some of the Dutch written here. For others,
it's a duplicate message definition, with the 2nd line telling where the
1st definition was found.

I found a duplicate

msgid "Citation:"
msgstr "Rotacio:"

at the end of the file, and removing that helped.

regards,

Enno


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

Re: Place displayer testing

enno
In reply to this post by Nick Hall
Hi Nick,

> For those of you who would like to test the new place displayer
> functionality, I have pushed a branch called "displayer" to my git
> fork.  To checkout the branch use:
>
> git remote add nick git://git.code.sf.net/u/nick-h/gramps
> git checkout -b displayer nick/displayer
>
> You will see a new "Place format" option in the "Display" tab in the
> preferences.  Set this to "Automatic" to generate place names from the
> place hierarchy.
Right now, I can't edit locations. My locations are all titles, without
names, and when I try to add a name, I get this:

2014-11-09 16:03:11.075: ERROR: grampsapp.py: line 114: Unhandled exception
Traceback (most recent call last):
   File
"/home/enno/gramps-source/gramps/gui/widgets/monitoredwidgets.py", line
148, in _on_change
     self.changed(obj)
   File "/home/enno/gramps-source/gramps/gui/editors/editplace.py", line
175, in name_changed
     self.update_title()
   File "/home/enno/gramps-source/gramps/gui/editors/editplace.py", line
170, in update_title
     new_name = ', '.join(get_location_list(self.db, self.obj))
TypeError: sequence item 0: expected string or Unicode, tuple found

I set the display to automatic as advised, and the error suggests that
that's the place where it goes wrong.

regards,

Enno


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

Re: Place displayer testing

Sebastian Schubert
In reply to this post by Nick Hall
Hi Nick,

Am 07.11.2014 um 23:41 schrieb Nick Hall:
> For those of you who would like to test the new place displayer
> functionality, I have pushed a branch called "displayer" to my git
> fork.
[...]
>
> Any comments and suggestions are welcome.

Thanks a lot for your work. I really enjoy looking at the automatic
titles following the place hierarchy!

I found two bugs, though:

The automatic title seems to end when there is a place with an "after
..." date the correct choice in the hierarchy.

The second is probably the same as Enno's: When saving an edited
location, I get the following error:

28471: ERROR: grampsapp.py: line 114: Unhandled exception
Traceback (most recent call last):
  File "/home/sebschub/code/Gramps/gramps/gui/editors/editplaceref.py",
line 98, in save
    self.callback(self.obj)
  File
"/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/placerefembedlist.py",
line 101, in edit_callback
    self.rebuild()
  File
"/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/embeddedlist.py",
line 603, in rebuild
    self.post_rebuild(selectedpath)
  File
"/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/placerefembedlist.py",
line 105, in post_rebuild
    self.callback()
  File "/home/sebschub/code/Gramps/gramps/gui/editors/editplace.py",
line 170, in update_title
    new_name = ', '.join(get_location_list(self.db, self.obj))
TypeError: sequence item 0: expected string or Unicode, tuple found

Thanks a lot!
Sebastian

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

Re: Place displayer testing

enno
Nick, Sebastian,

> The second is probably the same as Enno's: When saving an edited
> location, I get the following error:
>
> 28471: ERROR: grampsapp.py: line 114: Unhandled exception
> Traceback (most recent call last):
>    File "/home/sebschub/code/Gramps/gramps/gui/editors/editplaceref.py",
> line 98, in save
>      self.callback(self.obj)
>    File
> "/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/placerefembedlist.py",
> line 101, in edit_callback
>      self.rebuild()
>    File
> "/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/embeddedlist.py",
> line 603, in rebuild
>      self.post_rebuild(selectedpath)
>    File
> "/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/placerefembedlist.py",
> line 105, in post_rebuild
>      self.callback()
>    File "/home/sebschub/code/Gramps/gramps/gui/editors/editplace.py",
> line 170, in update_title
>      new_name = ', '.join(get_location_list(self.db, self.obj))
> TypeError: sequence item 0: expected string or Unicode, tuple found
I got an error while typing the name, which is triggered at the same
line 170. Reason is that get_location_list doesn't return a list of
names, but names and dates. The following code change, copied from
another piece, cures that:

diff --git a/gramps/gui/editors/editplace.py
b/gramps/gui/editors/editplace.py
index 93f6b0b..b0dbe48 100644
--- a/gramps/gui/editors/editplace.py
+++ b/gramps/gui/editors/editplace.py
@@ -167,7 +167,7 @@ class EditPlace(EditPrimary):
                                     _('48.21"E, -18.2412 or -18:9:48.21)'))

      def update_title(self):
-        new_name = ', '.join(get_location_list(self.db, self.obj))
+        new_name = ', '.join([item[0] for item in
get_location_list(self.db, self.obj)])
          self.top.get_object("place_title").set_text(new_name)
          self.obj.set_title(new_name)

diff --git a/po/eo.po b/po/eo.po
index f2fd00d..1e813a9 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -32400,5 +32400,3 @@ msgstr "Apliku ekzakte unu regulon"
  #~ msgid "State/County:"
  #~ msgstr "Urbo/Distrikto:"

-msgid "Citation:"
-msgstr "Rotacio:"

I cloned Nick's repository by following the instructions on

http://sourceforge.net/u/nick-h/gramps/ci/master/tree/

and checked out the displayer branch.

regards,

Enno


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Place displayer testing

enno
In reply to this post by Sebastian Schubert
Nick, Sebastian,

> The second is probably the same as Enno's: When saving an edited
> location, I get the following error:
>
> 28471: ERROR: grampsapp.py: line 114: Unhandled exception
> Traceback (most recent call last):
>    File "/home/sebschub/code/Gramps/gramps/gui/editors/editplaceref.py",
> line 98, in save
>      self.callback(self.obj)
>    File
> "/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/placerefembedlist.py",
> line 101, in edit_callback
>      self.rebuild()
>    File
> "/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/embeddedlist.py",
> line 603, in rebuild
>      self.post_rebuild(selectedpath)
>    File
> "/home/sebschub/code/Gramps/gramps/gui/editors/displaytabs/placerefembedlist.py",
> line 105, in post_rebuild
>      self.callback()
>    File "/home/sebschub/code/Gramps/gramps/gui/editors/editplace.py",
> line 170, in update_title
>      new_name = ', '.join(get_location_list(self.db, self.obj))
> TypeError: sequence item 0: expected string or Unicode, tuple found
I got an error while typing the name, which is triggered at the same
line 170. Reason is that get_location_list doesn't return a list of
names, but names and dates. The following code change, copied from
another piece, cures that:

diff --git a/gramps/gui/editors/editplace.py
b/gramps/gui/editors/editplace.py
index 93f6b0b..b0dbe48 100644
--- a/gramps/gui/editors/editplace.py
+++ b/gramps/gui/editors/editplace.py
@@ -167,7 +167,7 @@ class EditPlace(EditPrimary):
                                     _('48.21"E, -18.2412 or -18:9:48.21)'))

      def update_title(self):
-        new_name = ', '.join(get_location_list(self.db, self.obj))
+        new_name = ', '.join([item[0] for item in
get_location_list(self.db, self.obj)])
          self.top.get_object("place_title").set_text(new_name)
          self.obj.set_title(new_name)

diff --git a/po/eo.po b/po/eo.po
index f2fd00d..1e813a9 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -32400,5 +32400,3 @@ msgstr "Apliku ekzakte unu regulon"
  #~ msgid "State/County:"
  #~ msgstr "Urbo/Distrikto:"

-msgid "Citation:"
-msgstr "Rotacio:"

I cloned Nick's repository by following the instructions on

http://sourceforge.net/u/nick-h/gramps/ci/master/tree/

and checked out the displayer branch.

regards,

Enno


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Place displayer testing

Nick Hall
In reply to this post by enno
On 11/11/14 19:52, Enno Borgsteede wrote:
> I got an error while typing the name, which is triggered at the same
> line 170. Reason is that get_location_list doesn't return a list of
> names, but names and dates. The following code change, copied from
> another piece, cures that:
>

My mistake.  I intend to remove the update_title method.

To fix the problem please replace its contents by "pass" for now.

Nick.


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users