Changes

Jump to: navigation, search

GEPS 029: GTK3-GObject introspection Conversion

4,043 bytes added, 11:31, 12 January 2013
Ubuntu 12.10 (Linux Mint 14)
== Installation ==
 
=== Ubuntu 12.10 (Linux Mint 14) ===
 
On Ubuntu 12.10 (as of December 1, 2012), or Linux Mint 14 (as of December 24, 2012), you need only ('''replace python with python3 if you want to run the python 3 version!'''):
 
sudo apt-get install python-dev libglib2.0-dev libcairo2-dev
sudo apt-get install python-cairo-dev python-gobject-dev libgirepository1.0-dev
sudo apt-get install gir1.2-freedesktop python-gi python-gobject python-gi-cairo
sudo apt-get install gir1.2-pango-1.0 libgtkspell-3-0 python-gtkspell
 
The removal of python-gnome2 (and anything that relies on it) is necessary apparently because some "selectors" have not yet been converted. The right thing to do here is to fix the selectors rather than removing the package.
 
You can also run Gramps 4.0+ in [[GEPS_031:_Python_3_support#Ubuntu_12.10|Python 3]] first Install the Python BSDDB interface and check that it [[Install_latest_BSDDB#Python_BSDDB_interface|works]]
sudo apt-get install python3-bsddb3
 
You will probably want these optional packages:
 
sudo apt-get install python-pygoocanvas gir1.2-goocanvas-2.0-9
 
For additional functionality, install these:
 
sudo apt-get install python-pyexiv2
 
=== Ubuntu 12.04 ===
For people on Ubuntu 12.04, you need:
=== Debian Testing ===
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.34.42-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:
* [http://packages.debian.org/experimental/python-gi python-gi]
Install the package files with dpkg. eg
dpkg -i python-gi_3.34.42-1_i3862_i386.deb
=== GTK 3 theme ===A GTK3 theme engine is required to make Gramps look visually more appealing. * Try gtk3-engines-oxygen.* install [http://www.webupd8.org/2012/09/customize-gtk3-gtk2-theme-colors-using.html GTK Theme Preferences]
=== GTK 3 theme ===
If Gramps looks ugly in GTK 3, you probably are not using a GTK 3 theme. In that case, GTK falls back to the Raleigh theme.
[[Image:gramps-gtk3-elementarydark.png|center|550px|Gramps in GTK3 elementary dark theme]]
 
* Elementary theme and warnings
 
[[Image:Elementary_theme.png|thumb|431px|center|Default GTK3 elementary engine under Elementary OS]]
 
If you see some warnings[https://bugs.launchpad.net/egtk/+bug/999277] by running Gramps with Elementary theme:
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:217:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:218:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:250:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:251:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:277:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: button.css:151:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: button.css:152:20:
Not using units is deprecated. Assuming 'px'.
 
(Gramps.py:3359): Gtk-WARNING **: Theme parsing error: content-view.css:92:20:
Not using units is deprecated. Assuming 'px'.
 
then the best solution is maybe to try to fix it by yourself,
/usr/share/themes/elementary/gtk-3.0/
 
GtkSwitch {
- text-shadow: 0 1 alpha (#fff, 0.4);
+ text-shadow: 0 1px alpha (#fff, 0.4);
- icon-shadow: 0 1 alpha (#fff, 0.4);
+ icon-shadow: 0 1px alpha (#fff, 0.4);
..
 
and to provide a patch for this theme!
http://bazaar.launchpad.net/~elementary-design/egtk/egtk-2a/files/head:/gtk-3.0/
==== KDE ====
=== Spell Check Install ===
For working spell check, we you need a patched gtkspell version that supports gobject introspection. A working version is the '''changes''' branch at [httpshttp://githubgtkspell.comsourceforge.net/manisandro/gtkspell3/tree/changes https://githubgtkspell 3.3.com/manisandro/gtkspell3/tree/changes0]. So one needs to install  In Ubuntu 12.10, this version of gtkspellis available in your distribution as libgtkspell-3-0 package. The python-gtkspell code  If the package is then no longer needednot in your distributions packages, and can be removedyou need to compile the spell check. Source of For this code is a sourceforge bug entry [https://sourceforge, obtain the GtkSpell 3.net/tracker/index3.php?func=detail&aid=3298132&group_id=7896&atid=107896] 0 or later source code, and extract the code to a redhat bug entry: [https://bugzilladirectory, eg gtkspell3, and go into this directory using the terminal.redhat.com/show_bug.cgi?id=675504]
Gramps supports this Before continuing, remove any old version since revision 20130: [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/gui/spell.py?r1=20057&r2=20130]of gtkspell v3 you might have installed before!
==== Installation of spell check in Ubuntu 12.04 ====
First we install the git package to obtain the code:
sudo apt-get install git
Obtain the source code, and change to the version with gtk3 and gobject introspection support:
git clone git://github.com/manisandro/gtkspell3.git
cd gtkspell3/
git checkout -b changes origin/changes
Now obtain the packages needed to compile this code. In my case I had most code (see above installation introspection for other packages that might be needed). I still needed to install the following:
sudo apt-get install gtk-doc-tools libenchant-dev
sudo apt-get install gtk+-3.0-dev
Now compile and install the code
./autogen.shconfigure
make
sudo make install
If you followed the guide above and compiled your own pygobject module, you need to start Gramps with the command
PYTHONPATH=/usr/local/lib/python2.7/site-packages/ LD_LIBRARY_PATH=/usr/local/lib python src/gramps.py
 
 
==== Old install method ====
we need a patched gtkspell version that supports gobject introspection. A working version is the '''changes''' branch at [https://github.com/manisandro/gtkspell3/tree/changes https://github.com/manisandro/gtkspell3/tree/changes]. So one needs to install this version of gtkspell. The python-gtkspell code is then no longer needed, and can be removed. Source of this code is a sourceforge bug entry [https://sourceforge.net/tracker/index.php?func=detail&aid=3298132&group_id=7896&atid=107896] and a redhat bug entry: [https://bugzilla.redhat.com/show_bug.cgi?id=675504]
 
Gramps supports this version since revision 20130: [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/gui/spell.py?r1=20057&r2=20130]
 
First we install the git package to obtain the code:
sudo apt-get install git
Obtain the source code, and change to the version with gtk3 and gobject introspection support:
git clone git://github.com/manisandro/gtkspell3.git
cd gtkspell3/
git checkout -b changes origin/changes
=== WebKit for Htmlrenderer ===
LD_LIBRARY_PATH=/usr/local/lib PYTHONPATH=/usr/local/lib/python2.7/site-packages/ python src/gramps.py
 
or
 
LD_LIBRARY_PATH=/usr/local/lib PYTHONPATH=/usr/local/lib/python2.7/site-packages/ python -c 'from gramps.grampsapp import main; main()'
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
* pyexiv2 module causes a segmentation fault when exiting Gramps - see bug [http://www.gramps-project.org/bugs/view.php?id=6042 #6042]
* python-gnome2 package causes a segmentation fault when Gramps starts - see bug [http://www.gramps-project.org/bugs/view.php?id=5972 #5972]
<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>
* Geography : missing tiles : osm-gps-map problem.
* 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*.typelib)
* 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 : We cannot mix osmgpsmap between trunk and gramps34 and others.
===Solved or workaround===
* Many Gtk elements no longer grab certain events. '''Solved:''' Add a Gtk.EventBox under them to grab the event.
* Geography : bad placement of markers : osm-gps-map problem. '''Solved''' : git pull the latest version. Need to be acknowledge by osm-gps-map team.
* Geography : We cannot mix osmgpsmap between trunk and gramps34 and others. '''Solved''' : git pull the latest version. You must remove all libosmgps* from /usr/local/lib before make install
== Related Gramps Bugs ==

Navigation menu