Changes

Jump to: navigation, search

GEPS 029: GTK3-GObject introspection Conversion

2,071 bytes added, 18:24, 6 November 2017
m
OsmGpsMap for Geography
{{GEPS-Finished}}
{{man menu|Implemented for the release of Gramps 4.0}}
 
Gramps was written with GTK 2 toolkit. This has been replaced upstream with GTK 3, so Gramps should convert to GTK 3.
As of 25 July 2012, the Debian repositories does not contain sufficiently up-to-date python GObject introspection packages and so need to be installed from the experimental repository, which currently contains version 3.4.2-2. Perhaps the simplest way to install is just to download the latest packages from the Debian packages web site. The files required can be found for different architectures at:
* <del>[http://packages.debian.org/experimental/python-gi python-gi]</del> Error: Package not available in this suite.
* [http://packages.debian.org/experimental/python-gi-cairo python-gi-cairo]
=== Spell Check Install ===
For working spell check, you need [http://gtkspell.sourceforge.net/ gtkspell 3.gtkspell3 3.0].
(In Ubuntu 12.10, the libgtkspell-3-0 package is not suitable [https://bugs.launchpad.net/ubuntu/+source/gtkspell3/+bug/1114403] as it is API incompatible with the official release 3.0.0, released on 2012-11-12 )
If the package is not in your distributions packages, you need to compile the spell check. For this, obtain the GtkSpell 3.GtkSpell3 3.0 or later source code, and extract the code to a directory, eg gtkspell3, and go into this directory using the terminal.
Before continuing, remove any old version of gtkspell v3 you might have installed before!
Download the Gtkspell code with:
hg clone <nowiki>http://hg.code.sf.net/p/gtkspell/code </nowiki> gtkspell-code
You may need to install the following:
sudo apt-get install gtk-doc-tools libenchant-devvalac
You may also need gtk3 devel packages:
sudo apt-get install gtk+-3.0-dev
==== Install your Dictionary ====
 
Note, dictionnaries provided by hunspell work fine and have unicode support.
 
If your language is missing from the list of dictionaries to spellcheck against you can install them.
eg: For Australian English:
sudo apt-get install myspell-en-au hunspell-en-au
You can check that the language installed correctly by running
eg:
en_AU (myspell)
en_AU (hunspell)
==== Old install method ====
=== OsmGpsMap for Geography ===
The [[Gramps_4.0_Wiki_Manual_-_Categories#Geography_Category|Geography]] requires osmgpsmap. Introspection bindings for this is not currently available, so you need to compile it from the repository listed below:
 
Or simply install from package (Linux Mint 18.2):
 
Libosmgpsmap-1.0-dev
 
 
==== Download from the home site ====
 
http://nzjrs.github.io/osm-gps-map/
 
Download the tar source and do :
tar zxvf osm-gps-map-1.0.1.tar.gz
cd osm-gps-map-1.0.1
 
==== Download from github ====
 
You can also continue to use git to get the last development version :
git clone git://github.com/nzjrs/osm-gps-map.git
git pull
==== How to compile osm-gps-map ==== You might have all your dependencies as if you already compiled pygobjectas explained above. For Ubuntu you still need packages libsoup2.4-dev and libsoup2.4
You may also need gtk3 and gobject-introspection devel packages:
sudo apt-get install gtk+-3.0-dev libgirepository1.0-devcheckinstall
and some other stuff like:
Now compile osmgpsmap:
./gnome-autogen.sh
make
sudo make install
sudo cp /usr/local/lib/girepository-1.0/OsmGpsMap-1.0.8.typelib /usr/lib/girepository-1.0/
To use this now, you have to, or remove the installed version of osmgpsmap on your computer, or set the LD_LIBRARY_PATH to point at the installed version. Using the latter, you can start Gramps in trunk with:
First sets library to ''/usr/local/lib'' so as to find osmgpsmap and gtkspell, second ''/usr/local/lib/python2.7/site-packages/'' to find the local install of pygobject
 
An easier way is to do it with checkinstall:
gnome-autogen.sh
./configure --prefix=/usr
make
sudo checkinstall make install
then you don't need all the path wizardry, and can later manage the package via the package management system
 
==== Ubuntu 14.04 - Trusty Tahr ====
 
The packages contained in the repository are too old (0.7.3) so use (1.0.2-1~ubuntu14.04.1) from the backports (universe) made available 2014-07-03. Or (Not recommended) You could download 1.0.x packages manually from the Utopic (14.10) proposed repository. https://launchpad.net/ubuntu/+source/osm-gps-map
 
 
sudo dpkg -i libosmgpsmap-1.0-0_1.0.2-1_amd64.deb
sudo dpkg -i gir1.2-osmgpsmap-1.0_1.0.2-1_amd64.deb
=== GExiv2 for Image metadata ===
from gi.repository import GExiv2"
tests OK.
 
==== Ubuntu 14.04 - Trusty Tahr ====
 
On Ubuntu 14.04 it is a lot easier. According to the Gramps-devel mailing list you can simply install:
 
sudo apt-get install gir1.2-gexiv2-0.10
 
You can verify that everything is correct by executing the following command:
 
python -c "from gi.repository import GExiv2"
 
No errors should be displayed.
== Problems ==
=== Open ===
* We cannot set strings in struct, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=678401] It seems we can do without this, so not an issue at the moment* No rows_reordered function on treemodels in python, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=684558]. Current fix: disconnect and reconnect the model so sort need not emit rows-reordered signal. However, this means the history of expand collapse of nodes in a treeview is lost after rows have been reordered (this happens in gramps on click on the column that is already sorted.* Geography : missing tiles : osm-gps-map problem. issue:{{bug|??}}
(Gramps.py:4515): OsmGpsMap-WARNING **: Error getting missing tile
[http://gramps.1791082.n4.nabble.com/osm-gps-map-Error-getting-missing-tile-td4669643.html discussion on mailinglist]* Geography : for all other problems, use last version with git pull. Be careful, osm-gps-map is now 0.8. You must remove all 1.0 versions (OsmGpsMap*.gir and OsmGpsMap*.typelibfile issues on the bugtracker)* Geography : We cannot mix osmgpsmap between trunk and gramps34 and others.
===Solved or workaround===
<pre> TypeError: Error when calling the metaclass bases
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases</pre>
* Gtk.ColorSelectionDialog has no more colorsel attribute : it's replaced by get_color_selection() - see bug #{{bug|6917}} - resolved* We cannot set strings in struct, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=678401] It seems we can do without this, so not an issue at the moment (upstream bug shows: RESOLVED FIXED 2013-01-11)* No rows_reordered function on treemodels in python, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=684558]. Current fix: disconnect and reconnect the model so sort need not emit rows-reordered signal. However, this means the history of expand collapse of nodes in a treeview is lost after rows have been reordered (this happens in gramps on click on the column that is already sorted. (upstream bug shows: RESOLVED FIXED 2013-07-22)* GraphView : GooCanvas and dash lines : https://bugzilla.gnome.org/show_bug.cgi?id=703592 (upstream bug shows: RESOLVED FIXED 2013-11-02)
== Related Gramps Bugs ==
18
edits

Navigation menu