Compare commits
48 Commits
v4.2.7
...
v4.0.0-alp
Author | SHA1 | Date | |
---|---|---|---|
c18d73ea8f | |||
671f64c08c | |||
b9cd27550f | |||
8b26f688cb | |||
e41c6db70d | |||
fdcc02d1bd | |||
f4f5104b72 | |||
0caf61b805 | |||
c46a66ecd1 | |||
35d553b4eb | |||
8bc6d475d9 | |||
b5fec9d1a3 | |||
1a5c516179 | |||
054d29612c | |||
ad066ba200 | |||
ffb3b1e232 | |||
76c896f977 | |||
5e00312139 | |||
c7ad3f3295 | |||
11723ffd8c | |||
cb9bebee1e | |||
a9ac56b33c | |||
19038fab93 | |||
fd13311aa0 | |||
ec0b9fb54b | |||
8b94955772 | |||
9a229466fd | |||
647c9cfef5 | |||
29443339cb | |||
f4f2747c65 | |||
ba7913fe3c | |||
5526f64e1f | |||
0a17eab461 | |||
fcce312e0a | |||
4ed2b0bace | |||
759075b3e4 | |||
7f4956dd00 | |||
e1ab03348e | |||
2033fd6567 | |||
7c6872c11a | |||
71f87a31b3 | |||
eb2ca43ff6 | |||
71b951f31d | |||
a542081e25 | |||
5b8da49bae | |||
4d7e1043ef | |||
2040716b9c | |||
8a3a477ea4 |
@ -37,8 +37,8 @@ global-exclude *.pyo
|
||||
global-exclude *.bak
|
||||
|
||||
# Remove directories which should not be included in the distribution
|
||||
prune src/guiQML
|
||||
prune src/webapp
|
||||
prune gramps/guiQML
|
||||
prune gramps/webapp
|
||||
|
||||
# Remove Makefiles used by autotools
|
||||
global-exclude Makefile*
|
||||
|
17
NEWS
17
NEWS
@ -1,3 +1,20 @@
|
||||
2012-10-28
|
||||
Version 3.4.2 -- the "We're all individuals!" bug fix release.
|
||||
* Some fixes on NarrativeWeb report
|
||||
* Some fixes on book report
|
||||
* Improvement on database path interface and user's preferences
|
||||
* Consistency on Name display and regex support
|
||||
* Some platform-specific fixes for Windows system environment
|
||||
* Better support for media links on Gedcom file format
|
||||
* Fix possible incorrect family relations on Gedcom file format
|
||||
* Various fixes on citation records
|
||||
* Fix and improve places handling on Geography views
|
||||
* Fix on command line arguments
|
||||
* Consistency on PDF file format
|
||||
* New language: Greek
|
||||
* Various updated translations
|
||||
* Changelog: http://www.gramps-project.org/bugs/changelog_page.php?version_id=32
|
||||
|
||||
2012-08-23
|
||||
Version 3.4.1 -- The "A tiger? In Africa?!" bug fix release.
|
||||
Mention in the release that upgrading is advised for two critical issues:
|
||||
|
@ -1,24 +1,33 @@
|
||||
Gramps 3.2 Release Notes
|
||||
"UNSTABLE Gramps 4.0.0 Alpha2 release.
|
||||
|
||||
General Improvements
|
||||
This is a technology preview to allow plugin writers and packagers-installer
|
||||
writers to update their plugins and scripts. This release is not production
|
||||
ready, so use for testing!"
|
||||
|
||||
* New Plugin System
|
||||
In the Help Menu -> Menu Status, all available plugins are visible. All plugins can be hidden, saving resources and hiding options you do not need. Eg: You don't use the Pedigree View? Hide it in the Plugin Status, and it will not be present anymore. You don't use vcard export? Hide it in the Plugin Status, and it will not be offered anymore.
|
||||
It is recommended to use Gramps 4.0.0 with python 3.2 so as to be ready
|
||||
for the future (python 2.7 works though).
|
||||
|
||||
* Faster
|
||||
Many under the hood improvements have occurred that should improve perfamance enormously. Yes, new features are present to use all your processing power, but they are all implemented as plugins that can be hidden. Eg: Insert of a person in a 30000 people family tree took 4sec on 1.4Ghz PC in 3.1, Now it is done in milliseconds.
|
||||
The dependencies for Gramps 4.0.0 are _completely_ different than 3.4 due
|
||||
to the switch to GObject introspection, and the removal of autotools. So
|
||||
only install 4.0.0 if you are certain you can obtain the dependencies,
|
||||
see README and INSTALL.
|
||||
|
||||
*New Views
|
||||
There are new views, and some views have been greatly improved
|
||||
- People view can now be sorted on the columns
|
||||
- A Place treeview is present, nicely grouping your places under country groups
|
||||
- GeoView has left it's beta status behind and shows your data on an
|
||||
online map (Openstreetmap or google maps, fast internet connection required)
|
||||
- Help Menu -> Extra Reports/Tools open a webpage with downloadable extra views
|
||||
For linux, in Ubuntu 12.10 you can install 4.0.0, but you will need to
|
||||
compile and install osmgpsmap manually to have the maps working (see
|
||||
http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion#OsmGpsMap_for_Geography )
|
||||
|
||||
|
||||
Other Improvements
|
||||
Major enhancements in Gramps 4.0.0:
|
||||
|
||||
* Styled Notes now in most output formats that support styles, eg in the web report
|
||||
* New languages
|
||||
* Select language in which report should be created (only present now in some reports)
|
||||
* GEP 8: code reorganization: http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
|
||||
|
||||
* GEP 26: Replace make: http://www.gramps-project.org/wiki/index.php?title=GEPS_026:_Replace_%27make%27_for_Gramps_build
|
||||
|
||||
* GEP 29: Gtk 3 :http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion
|
||||
|
||||
* GEP 31: Python 3 support: http://www.gramps-project.org/wiki/index.php?title=GEPS_031:_Python_3_support
|
||||
|
||||
More info in the manual
|
||||
http://www.gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_What%27s_new%3F
|
||||
|
||||
Everybody is invited to update the manual to make it current!
|
||||
|
@ -50,7 +50,7 @@ copyright = u'2012, Gramps project'
|
||||
# The short X.Y version.
|
||||
version = '4.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.0.0'
|
||||
release = '4.0.0-alpha2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -249,7 +249,9 @@ gramps(1) 3.4.0 gramps(1)
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps*
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
English
|
||||
=======
|
||||
|
||||
gramps(1) 4.0.0 gramps(1)
|
||||
gramps(1) @VERSION@ gramps(1)
|
||||
|
||||
|
||||
|
||||
@ -262,11 +262,14 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
**KNOWN BUGS AND LIMITATIONS**
|
||||
**FILES**
|
||||
|
||||
**FILES**
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps*
|
||||
|
||||
@ -293,4 +296,4 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
|
||||
January 2013 4.0.0 gramps(1)
|
||||
gramps(1) @VERSION@ gramps(1)
|
||||
|
@ -50,7 +50,7 @@ copyright = u'2012, Gramps project'
|
||||
# The short X.Y version.
|
||||
version = '4.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.0.0'
|
||||
release = '4.0.0-alpha2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -1,9 +1,7 @@
|
||||
French
|
||||
=======
|
||||
|
||||
|
||||
gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
gramps(1) @VERSION@ gramps(1)
|
||||
|
||||
|
||||
**NOM**
|
||||
@ -34,33 +32,33 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
**OPTIONS**
|
||||
**gramps** *FICHIER*
|
||||
Si *FICHIER* est désigné (sans autres commandes) comme arbre
|
||||
familial ou comme répertoire d'arbre familial, alors une session
|
||||
interactive est ouverte. Si *FICHIER* est un format de fichier
|
||||
supporté par Gramps, une base vide est créée dont le nom est
|
||||
celui du *FICHIER* et les données y seront importées. Les autres
|
||||
options sont ignorées. Ce type de lancement permet d'utiliser
|
||||
gramps pour manipuler des données comme dans un navigateur web.
|
||||
Les formats natifs de gramps sont acceptés, voir ci-dessous.
|
||||
Si *FICHIER* est désigné (sans autres commandes) comme arbre
|
||||
familial ou comme répertoire d'arbre familial, alors une session
|
||||
interactive est ouverte. Si *FICHIER* est un format de fichier
|
||||
supporté par Gramps, une base vide est créée dont le nom est
|
||||
celui du *FICHIER* et les données y seront importées. Les autres
|
||||
options sont ignorées. Ce type de lancement permet d'utiliser
|
||||
gramps pour manipuler des données comme dans un navigateur web.
|
||||
Les formats natifs de gramps sont acceptés, voir ci-dessous.
|
||||
|
||||
|
||||
**-f** , **--format=** *FORMAT*
|
||||
Le format spécifique du *FICHIER* est précédé par les arguments
|
||||
**-i** , ou **-e** . Si l'option **-f** n'est pas donnée pour le *FICHIER* ,
|
||||
alors le format sera celui de l'extension ou du type-MIME.
|
||||
Le format spécifique du *FICHIER* est précédé par les arguments
|
||||
**-i** , ou **-e** . Si l'option **-f** n'est pas donnée pour le *FICHIER* ,
|
||||
alors le format sera celui de l'extension ou du type-MIME.
|
||||
|
||||
Les formats de sortie disponibles sont **gramps-xml** (deviné si
|
||||
*FICHIER* se termine par **.gramps** ), et **gedcom** (deviné si *FICHIER* se
|
||||
termine par **.ged** ), ou tout autre fichier d'exportation
|
||||
disponible dans le système de plugin Gramps.
|
||||
Les formats de sortie disponibles sont **gramps-xml** (deviné si
|
||||
*FICHIER* se termine par **.gramps** ), et **gedcom** (deviné si *FICHIER* se
|
||||
termine par **.ged** ), ou tout autre fichier d'exportation
|
||||
disponible dans le système de plugin Gramps.
|
||||
|
||||
Les formats disponibles pour l'importation sont **grdb** ,
|
||||
**gramps-xml** , **gedcom** , **gramps-pkg** (deviné si *FICHIER* se termine par
|
||||
**.gpkg** ), et **geneweb** (deviné si *FICHIER* se termine par **.gw** ).
|
||||
Les formats disponibles pour l'importation sont **grdb** ,
|
||||
**gramps-xml** , **gedcom** , **gramps-pkg** (deviné si *FICHIER* se termine par
|
||||
**.gpkg** ), et **geneweb** (deviné si *FICHIER* se termine par **.gw** ).
|
||||
|
||||
Les formats disponibles pour l'exportation sont **gramps-xml** , **ged‐
|
||||
com** , **gramps-pkg** , **wft** (deviné si *FICHIER* se termine par **.wft** ),
|
||||
**geneweb** .
|
||||
Les formats disponibles pour l'exportation sont **gramps-xml** , **ged‐
|
||||
com** , **gramps-pkg** , **wft** (deviné si *FICHIER* se termine par **.wft** ),
|
||||
**geneweb** .
|
||||
|
||||
|
||||
**-l**
|
||||
@ -68,29 +66,29 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
**-u** , **--force-unlock**
|
||||
Débloquer une base de données verrouillée.
|
||||
Débloquer une base de données verrouillée.
|
||||
|
||||
|
||||
**-O** , **--open=** *BASE_DE_DONNEES*
|
||||
Ouvrir une *BASE_DE_DONNEES* qui doit être une base présente dans
|
||||
le répertoire des bases ou le nom d'un arbre familial existant.
|
||||
Si aucune action n'est définie, les options d'import ou d'export
|
||||
sont données par la ligne de commande puis une session interac‐
|
||||
tive est ouverte, utilisant cette base de données.
|
||||
Ouvrir une *BASE_DE_DONNEES* qui doit être une base présente dans
|
||||
le répertoire des bases ou le nom d'un arbre familial existant.
|
||||
Si aucune action n'est définie, les options d'import ou d'export
|
||||
sont données par la ligne de commande puis une session interactive
|
||||
est ouverte, utilisant cette base de données.
|
||||
|
||||
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
||||
sources, vous devez utiliser l'option d'import.
|
||||
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
||||
sources, vous devez utiliser l'option d'import.
|
||||
|
||||
|
||||
**-i** , **--import=** *FICHIER*
|
||||
Importer des données depuis un *FICHIER* . Si vous n'avez pas
|
||||
spécifié de base de données alors une base de données temporaire
|
||||
est utilisée; elle sera effacée quand vous quitterez gramps.
|
||||
Importer des données depuis un *FICHIER* . Si vous n'avez pas
|
||||
spécifié de base de données alors une base de données temporaire
|
||||
est utilisée; elle sera effacée quand vous quitterez gramps.
|
||||
|
||||
Quand plus d'un fichier doit être importé, chacun doit être
|
||||
précédé par la commande **-i** . Ces fichiers sont importés dans le
|
||||
même ordre, i.e. **-i** *FICHIER1* **-i** *FICHIER2* et **-i** *FICHIER2* **-i**
|
||||
*FICHIER1* vont tous les deux produire différents IDs gramps.
|
||||
Quand plus d'un fichier doit être importé, chacun doit être
|
||||
précédé par la commande **-i** . Ces fichiers sont importés dans le
|
||||
même ordre, **-i** *FICHIER1* **-i** *FICHIER2* et **-i** *FICHIER2* **-i**
|
||||
*FICHIER1* vont tous les deux produire différents IDs gramps.
|
||||
|
||||
|
||||
**-e** , **--export=** *FICHIER*
|
||||
@ -104,38 +102,38 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
**-a** , **--action=** *ACTION*
|
||||
Accomplir une *ACTION* sur les données importées. C'est effectué à
|
||||
la fin de l'importation. Les actions possibles sont **summary**
|
||||
(comme le rapport -> Afficher -> Statistiques sur la base),
|
||||
**check** (comme l'outil -> Réparation de la base -> Vérifier et
|
||||
réparer), **report** (produit un rapport) et **tool** (utilise un
|
||||
outil), ces derniers ont besoin de *OPTION* précédé par la commande -p.
|
||||
Accomplir une *ACTION* sur les données importées. C'est effectué à
|
||||
la fin de l'importation. Les actions possibles sont **summary**
|
||||
(comme le rapport -> Afficher -> Statistiques sur la base),
|
||||
**check** (comme l'outil -> Réparation de la base -> Vérifier et
|
||||
réparer), **report** (produit un rapport) et **tool** (utilise un
|
||||
outil), ces derniers ont besoin de *OPTION* précédé par la commande -p.
|
||||
|
||||
L' *OPTION* doit satisfaire ces conditions:
|
||||
Il ne doit pas y avoir d'espace. Si certains arguments doivent
|
||||
utiliser des espaces, la chaîne doit être encadrée par des
|
||||
guillemets. Les options vont par paire nom et valeur. Une
|
||||
paire est séparée par un signe égal. Différentes paires sont
|
||||
séparées par une virgule.
|
||||
L' *OPTION* doit satisfaire ces conditions:
|
||||
Il ne doit pas y avoir d'espace. Si certains arguments doivent
|
||||
utiliser des espaces, la chaîne doit être encadrée par des
|
||||
guillemets. Les options vont par paire nom et valeur. Une
|
||||
paire est séparée par un signe égal. Différentes paires sont
|
||||
séparées par une virgule.
|
||||
|
||||
La plupart des options sont spécifiques à chaque rapport. Même
|
||||
s'il existe des options communes.
|
||||
La plupart des options sont spécifiques à chaque rapport. Même
|
||||
s'il existe des options communes.
|
||||
|
||||
**name=name**
|
||||
Cette option est obligatoire, elle détermine quel rapport ou
|
||||
outil sera utilisé. Si le name saisi ne correspond à aucun
|
||||
module disponible, un message d'erreur sera ajouté.
|
||||
**name=name**
|
||||
Cette option est obligatoire, elle détermine quel rapport ou
|
||||
outil sera utilisé. Si le name saisi ne correspond à aucun
|
||||
module disponible, un message d'erreur sera ajouté.
|
||||
|
||||
**show=all**
|
||||
Cette option produit une liste avec les noms des options
|
||||
disponibles pour un rapport donné.
|
||||
**show=all**
|
||||
Cette option produit une liste avec les noms des options
|
||||
disponibles pour un rapport donné.
|
||||
|
||||
**show=optionname**
|
||||
Cette option affiche une description de toutes les fonctionnalités
|
||||
proposées par optionname, aussi bien les types que les valeurs pour une option.
|
||||
|
||||
Utiliser les options ci-dessus pour trouver tout sur un rapport
|
||||
choisi.
|
||||
choisi.
|
||||
|
||||
|
||||
Quand plus d'une action doit être effectuée, chacune doit être précédée
|
||||
@ -144,23 +142,23 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
**-d** , **--debug=** *NOM_LOGGER*
|
||||
Permet les logs de debug pour le développement et les tests.
|
||||
Regarder le code source pour les détails.
|
||||
Permet les logs de debug pour le développement et les tests.
|
||||
Regarder le code source pour les détails.
|
||||
|
||||
**--version**
|
||||
Imprime le numéro de version pour gramps puis quitte.
|
||||
Imprime le numéro de version pour gramps puis quitte.
|
||||
|
||||
|
||||
|
||||
|
||||
**Opération**
|
||||
Si le premie argument de la ligne de commande ne commence pas par un
|
||||
tiret (i.e. pas d'instruction), gramps va essayer d'ouvrir la base de
|
||||
données avec le nom donné par le premier argument et démarrer une ses‐
|
||||
tiret (i.e. pas d'instruction), gramps va essayer d'ouvrir la base de
|
||||
données avec le nom donné par le premier argument et démarrer une ses‐
|
||||
sion interactive, en ignorant le reste de la ligne de commande.
|
||||
|
||||
|
||||
Si la commande **-O** est notée, alors gramps va essayer le fichier défini
|
||||
Si la commande **-O** est notée, alors gramps va essayer le fichier défini
|
||||
et va travailler avec ses données, comme pour les autres paramètres de
|
||||
la ligne de commande.
|
||||
|
||||
@ -183,7 +181,7 @@ gramps(1) 4.0.0 gramps(1)
|
||||
Cette base sera **import_db.grdb** dans le répertoire **~/.gramps/import**.
|
||||
|
||||
|
||||
Les erreurs rencontrées lors d'importation, d'exportation, ou d'action, seront
|
||||
Les erreurs rencontrées lors d'importation, d'exportation, ou d'action, seront
|
||||
mémorisées en *stdout* (si elles sont le fait de la manipulation par
|
||||
gramps) ou en *stderr* (si elles ne sont pas le fait d'une manipulation).
|
||||
Utilisez les shell de redirection de *stdout* et *stderr* pour sauver
|
||||
@ -191,16 +189,16 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
**EXEMPLES**
|
||||
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
||||
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
||||
saisir:
|
||||
|
||||
**gramps -O** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
||||
**gramps -O** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
||||
|
||||
Ceci ouvre un arbre familial, pour faire la même chose, mais importer
|
||||
dans un arbre familial temporaire et démarrer une session interactive,
|
||||
on peut saisir:
|
||||
dans un arbre familial temporaire et démarrer une session interactive,
|
||||
on peut saisir :
|
||||
|
||||
**gramps -i** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
||||
**gramps -i** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
||||
|
||||
Lecture de quatre bases de données dont les formats peuvent être
|
||||
devinés d'après les noms, puis vérification des données:
|
||||
@ -225,12 +223,12 @@ gramps(1) 4.0.0 gramps(1)
|
||||
Pour lire trois ensembles de données puis lancer une session
|
||||
interactive de gramps sur le tout :
|
||||
|
||||
**gramps -i** *file1.ged* **-i** *file2.tgz* **-i** *~/db3.gramps*
|
||||
**gramps -i** *file1.ged* **-i** *file2.tgz* **-i** *~/db3.gramps*
|
||||
|
||||
Pour lancer l'outil de vérification de la base de données depuis la
|
||||
ligne de commande et obtenir le résultat :
|
||||
|
||||
**gramps -O** *'My Family Tree'* **-a** *tool* **-p name=** *verify*
|
||||
**gramps -O** *'My Family Tree'* **-a** *tool* **-p name=** *verify*
|
||||
|
||||
Enfin, pour lancer une session interactive normale, entrer :
|
||||
|
||||
@ -253,21 +251,24 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
**CONCEPTS**
|
||||
Gramps est un système basé sur le support de plugin-python, permettant
|
||||
d'importer et d'exporter, la saisie, générer des rapports, des outils,
|
||||
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
||||
d'importer et d'exporter, la saisie, générer des rapports, des outils,
|
||||
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
||||
|
||||
Par ailleurs, gramps permet la génération directe : impression, rap‐
|
||||
ports avec sortie vers d'autres formats, comme *LibreOffice.org* ,
|
||||
*HTML* , ou *LaTeX* pour permettre à l'utilisateur de choisir selon ses
|
||||
*HTML* , ou *LaTeX* pour permettre à l'utilisateur de choisir selon ses
|
||||
besoins
|
||||
|
||||
|
||||
**BUGS CONNUS ET LIMITATIONS**
|
||||
|
||||
**FICHIERS**
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps*
|
||||
|
||||
@ -296,4 +297,4 @@ gramps(1) 4.0.0 gramps(1)
|
||||
|
||||
|
||||
|
||||
Janvier 2013 4.0.0 gramps(1)
|
||||
gramps(1) @VERSION@ gramps(1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH "GRAMPS" "1" "04 December 2012" "4.0" "Gramps"
|
||||
.TH "GRAMPS" "1" "28 December 2012" "4.0" "Gramps"
|
||||
.SH NAME
|
||||
gramps \- Gramps Documentation
|
||||
.
|
||||
@ -28,10 +28,10 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||
..
|
||||
.\" Man page generated from reStructeredText.
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.sp
|
||||
gramps(1) 4.0.0 gramps(1)
|
||||
gramps(1) @VERSION@ gramps(1)
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \fBNOM\fP
|
||||
@ -72,7 +72,7 @@ Les formats natifs de gramps sont acceptés, voir ci\-dessous.
|
||||
.TP
|
||||
.B \fB\-f\fP , \fB\-\-format=\fP \fIFORMAT\fP
|
||||
Le format spécifique du \fIFICHIER\fP est précédé par les arguments
|
||||
\fB\-i\fP , ou \fB\-e\fP . Si l\(aqoption \fB\-f\fP n\(aqest pas donnée pour le \fIFICHIER\fP ,
|
||||
\fB\-i\fP , ou \fB\-e\fP . Si l\(aqoption \fB\-f\fP n\(aqest pas donnée pour le \fIFICHIER\fP ,
|
||||
alors le format sera celui de l\(aqextension ou du type\-MIME.
|
||||
.sp
|
||||
Les formats de sortie disponibles sont \fBgramps\-xml\fP (deviné si
|
||||
@ -96,10 +96,10 @@ Débloquer une base de données verrouillée.
|
||||
.TP
|
||||
.B \fB\-O\fP , \fB\-\-open=\fP \fIBASE_DE_DONNEES\fP
|
||||
Ouvrir une \fIBASE_DE_DONNEES\fP qui doit être une base présente dans
|
||||
le répertoire des bases ou le nom d\(aqun arbre familial existant.
|
||||
le répertoire des bases ou le nom d\(aqun arbre familial existant.
|
||||
Si aucune action n\(aqest définie, les options d\(aqimport ou d\(aqexport
|
||||
sont données par la ligne de commande puis une session interac‐
|
||||
tive est ouverte, utilisant cette base de données.
|
||||
sont données par la ligne de commande puis une session interactive
|
||||
est ouverte, utilisant cette base de données.
|
||||
.sp
|
||||
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
||||
sources, vous devez utiliser l\(aqoption d\(aqimport.
|
||||
@ -109,9 +109,9 @@ Importer des données depuis un \fIFICHIER\fP . Si vous n\(aqavez pas
|
||||
spécifié de base de données alors une base de données temporaire
|
||||
est utilisée; elle sera effacée quand vous quitterez gramps.
|
||||
.sp
|
||||
Quand plus d\(aqun fichier doit être importé, chacun doit être
|
||||
Quand plus d\(aqun fichier doit être importé, chacun doit être
|
||||
précédé par la commande \fB\-i\fP . Ces fichiers sont importés dans le
|
||||
même ordre, i.e. \fB\-i\fP \fIFICHIER1\fP \fB\-i\fP \fIFICHIER2\fP et \fB\-i\fP \fIFICHIER2\fP \fB\-i\fP
|
||||
même ordre, \fB\-i\fP \fIFICHIER1\fP \fB\-i\fP \fIFICHIER2\fP et \fB\-i\fP \fIFICHIER2\fP \fB\-i\fP
|
||||
\fIFICHIER1\fP vont tous les deux produire différents IDs gramps.
|
||||
.TP
|
||||
.B \fB\-e\fP , \fB\-\-export=\fP \fIFICHIER\fP
|
||||
@ -124,17 +124,15 @@ précédé par la commande \fB\-e\fP . Ces fichiers sont importés dans le
|
||||
même ordre.
|
||||
.TP
|
||||
.B \fB\-a\fP , \fB\-\-action=\fP \fIACTION\fP
|
||||
.INDENT 7.0
|
||||
.INDENT 3.5
|
||||
Accomplir une \fIACTION\fP sur les données importées. C\(aqest effectué à
|
||||
la fin de l\(aqimportation. Les actions possibles sont \fBsummary\fP
|
||||
(comme le rapport \-> Afficher \-> Statistiques sur la base),
|
||||
\fBcheck\fP (comme l\(aqoutil \-> Réparation de la base \-> Vérifier et
|
||||
réparer), \fBreport\fP (produit un rapport) et \fBtool\fP (utilise un
|
||||
la fin de l\(aqimportation. Les actions possibles sont \fBsummary\fP
|
||||
(comme le rapport \-> Afficher \-> Statistiques sur la base),
|
||||
\fBcheck\fP (comme l\(aqoutil \-> Réparation de la base \-> Vérifier et
|
||||
réparer), \fBreport\fP (produit un rapport) et \fBtool\fP (utilise un
|
||||
outil), ces derniers ont besoin de \fIOPTION\fP précédé par la commande \-p.
|
||||
.sp
|
||||
L\(aq \fIOPTION\fP doit satisfaire ces conditions:
|
||||
Il ne doit pas y avoir d\(aqespace. Si certains arguments doivent
|
||||
Il ne doit pas y avoir d\(aqespace. Si certains arguments doivent
|
||||
utiliser des espaces, la chaîne doit être encadrée par des
|
||||
guillemets. Les options vont par paire nom et valeur. Une
|
||||
paire est séparée par un signe égal. Différentes paires sont
|
||||
@ -144,25 +142,21 @@ La plupart des options sont spécifiques à chaque rapport. Même
|
||||
s\(aqil existe des options communes.
|
||||
.sp
|
||||
\fBname=name\fP
|
||||
Cette option est obligatoire, elle détermine quel rapport ou
|
||||
Cette option est obligatoire, elle détermine quel rapport ou
|
||||
outil sera utilisé. Si le name saisi ne correspond à aucun
|
||||
module disponible, un message d\(aqerreur sera ajouté.
|
||||
.sp
|
||||
\fBshow=all\fP
|
||||
Cette option produit une liste avec les noms des options
|
||||
disponibles pour un rapport donné.
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
\fBshow=optionname\fP
|
||||
Cette option affiche une description de toutes les fonctionnalités
|
||||
proposées par optionname, aussi bien les types que les valeurs pour une option.
|
||||
.INDENT 7.0
|
||||
.TP
|
||||
.B Utiliser les options ci\-dessus pour trouver tout sur un rapport
|
||||
.sp
|
||||
Utiliser les options ci\-dessus pour trouver tout sur un rapport
|
||||
choisi.
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
Quand plus d\(aqune action doit être effectuée, chacune doit être précédée
|
||||
par la commande \fB\-a\fP . Les actions seront réalisées une à une, dans
|
||||
@ -179,11 +173,11 @@ Imprime le numéro de version pour gramps puis quitte.
|
||||
.TP
|
||||
.B \fBOpération\fP
|
||||
Si le premie argument de la ligne de commande ne commence pas par un
|
||||
tiret (i.e. pas d\(aqinstruction), gramps va essayer d\(aqouvrir la base de
|
||||
données avec le nom donné par le premier argument et démarrer une ses‐
|
||||
tiret (i.e. pas d\(aqinstruction), gramps va essayer d\(aqouvrir la base de
|
||||
données avec le nom donné par le premier argument et démarrer une ses‐
|
||||
sion interactive, en ignorant le reste de la ligne de commande.
|
||||
.sp
|
||||
Si la commande \fB\-O\fP est notée, alors gramps va essayer le fichier défini
|
||||
Si la commande \fB\-O\fP est notée, alors gramps va essayer le fichier défini
|
||||
et va travailler avec ses données, comme pour les autres paramètres de
|
||||
la ligne de commande.
|
||||
.sp
|
||||
@ -208,7 +202,7 @@ Utilisez les shell de redirection de \fIstdout\fP et \fIstderr\fP pour sauver
|
||||
les messages et les erreurs dans les fichiers.
|
||||
.TP
|
||||
.B \fBEXEMPLES\fP
|
||||
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
||||
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
||||
saisir:
|
||||
.INDENT 7.0
|
||||
.INDENT 3.5
|
||||
@ -217,8 +211,8 @@ saisir:
|
||||
.UNINDENT
|
||||
.sp
|
||||
Ceci ouvre un arbre familial, pour faire la même chose, mais importer
|
||||
dans un arbre familial temporaire et démarrer une session interactive,
|
||||
on peut saisir:
|
||||
dans un arbre familial temporaire et démarrer une session interactive,
|
||||
on peut saisir :
|
||||
.INDENT 7.0
|
||||
.INDENT 3.5
|
||||
\fBgramps \-i\fP \fI\(aqMon Arbre Familial\(aq\fP \fB\-i\fP \fI~/db3.gramps\fP
|
||||
@ -292,22 +286,25 @@ PROFILE pour Windows 2000/XP).
|
||||
.TP
|
||||
.B \fBCONCEPTS\fP
|
||||
Gramps est un système basé sur le support de plugin\-python, permettant
|
||||
d\(aqimporter et d\(aqexporter, la saisie, générer des rapports, des outils,
|
||||
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
||||
d\(aqimporter et d\(aqexporter, la saisie, générer des rapports, des outils,
|
||||
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
||||
.sp
|
||||
Par ailleurs, gramps permet la génération directe : impression, rap‐
|
||||
ports avec sortie vers d\(aqautres formats, comme \fILibreOffice.org\fP ,
|
||||
\fIHTML\fP , ou \fILaTeX\fP pour permettre à l\(aqutilisateur de choisir selon ses
|
||||
\fIHTML\fP , ou \fILaTeX\fP pour permettre à l\(aqutilisateur de choisir selon ses
|
||||
besoins
|
||||
.UNINDENT
|
||||
.sp
|
||||
\fBBUGS CONNUS ET LIMITATIONS\fP
|
||||
.sp
|
||||
\fBFICHIERS\fP
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
\fI${PREFIX}/bin/gramps\fP
|
||||
.sp
|
||||
\fI${PREFIX}/share/gramps\fP
|
||||
\fI${PREFIX}/lib/python/dist\-packages/gramps/\fP
|
||||
.sp
|
||||
\fI${PREFIX}/share/\fP
|
||||
.sp
|
||||
\fI${HOME}/.gramps\fP
|
||||
.UNINDENT
|
||||
@ -336,11 +333,10 @@ La documentation pour développeur est disponible sur le site
|
||||
\fI\%http://www.gramps-project.org/wiki/index.php?title=Portal:Developers\fP .
|
||||
.UNINDENT
|
||||
.sp
|
||||
Janvier 2013 4.0.0 gramps(1)
|
||||
gramps(1) @VERSION@ gramps(1)
|
||||
.SH AUTHOR
|
||||
Jerome Rapinat
|
||||
.SH COPYRIGHT
|
||||
2012, Gramps project
|
||||
.\" Generated by docutils manpage writer.
|
||||
.\"
|
||||
.
|
||||
|
@ -298,9 +298,11 @@ or LaTeX to allow the users to modify the format to suit their needs.
|
||||
|
||||
.SH FILES
|
||||
.LP
|
||||
\fI${PREFIX}/bin/gramps\fP
|
||||
\fI${PREFIX}/bin/gramps\fP
|
||||
.br
|
||||
\fI${PREFIX}/share/gramps\fP
|
||||
\fI${PREFIX}/lib/python/dist\-packages/gramps/\fP
|
||||
.br
|
||||
\fI${PREFIX}/share/\fP
|
||||
.br
|
||||
\fI${HOME}/.gramps\fP
|
||||
|
||||
|
@ -227,11 +227,14 @@ gramps(1) 3.4.0 gramps(1)
|
||||
|
||||
|
||||
**GEKENDE BUGS EN BEPERKINGEN**
|
||||
|
||||
**BESTANDEN**
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps*
|
||||
|
||||
|
@ -276,7 +276,9 @@ gramps(1) 3.4.0 gramps(1)
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps (jeśli nie użyta została zmienna środowiskowa GRAMP‐
|
||||
SHOME)*
|
||||
|
@ -255,9 +255,11 @@ gramps(1) 4.0.0 gramps(1)
|
||||
*ARQUIVOS**
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
|
||||
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps*
|
||||
|
||||
|
||||
|
@ -246,7 +246,9 @@ Gramps(1) 3.4.0 Gramps(1)
|
||||
|
||||
*${PREFIX}/bin/gramps*
|
||||
|
||||
*${PREFIX}/share/gramps*
|
||||
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||
|
||||
*${PREFIX}/share/*
|
||||
|
||||
*${HOME}/.gramps*
|
||||
|
||||
|
@ -151,6 +151,7 @@ register('behavior.surname-guessing', 0)
|
||||
register('behavior.use-tips', False)
|
||||
register('behavior.welcome', 100)
|
||||
register('behavior.web-search-url', 'http://google.com/#&q=%(text)s')
|
||||
register('behavior.addons-url', "http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/branches/gramps40/")
|
||||
|
||||
register('export.proxy-order', [
|
||||
["privacy", 0],
|
||||
|
@ -89,19 +89,7 @@ APP_VCARD = ["text/x-vcard", "text/x-vcalendar"]
|
||||
# system paths
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
if sys.platform == "win32":
|
||||
if sys.prefix == os.path.dirname(os.getcwd()):
|
||||
PREFIXDIR = sys.prefix
|
||||
SYSCONFDIR = os.path.join(sys.prefix, "etc")
|
||||
else:
|
||||
PREFIXDIR = os.path.join(os.path.dirname(__file__), os.pardir)
|
||||
SYSCONFDIR = os.path.join(PREFIXDIR, "etc")
|
||||
elif sys.platform == "darwin" and sys.prefix != sys.exec_prefix:
|
||||
PREFIXDIR = sys.prefix
|
||||
SYSCONFDIR = os.path.join(sys.prefix, "etc")
|
||||
else:
|
||||
PREFIXDIR = "@prefix@"
|
||||
SYSCONFDIR = "@sysconfdir@"
|
||||
LOCALE_DIR = "@LOCALE_DIR@"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -176,4 +176,4 @@ class DateDisplayNb(DateDisplay):
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(('nb_NO', 'nb', 'norsk', 'Norwegian'), DateParserNb, DateDisplayNb)
|
||||
register_datehandler(('nb_NO', 'nb', 'nn_NO', 'nn', 'norsk', 'Norwegian'), DateParserNb, DateDisplayNb)
|
||||
|
@ -745,6 +745,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
return self.get_from_handle(handle, Tag, self.tag_map)
|
||||
|
||||
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
||||
if isinstance(tbl, dict): return None ## trying to get object too early
|
||||
if isinstance(val, UNITYPE):
|
||||
val = val.encode('utf-8')
|
||||
try:
|
||||
|
@ -35,7 +35,8 @@ from __future__ import division
|
||||
#-------------------------------------------------------------------------
|
||||
import time
|
||||
import collections
|
||||
|
||||
import logging
|
||||
_LOG = logging.getLogger(".gen")
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Callback updater
|
||||
@ -71,6 +72,9 @@ class UpdateCallback(object):
|
||||
|
||||
def set_total(self, total):
|
||||
self.total = total
|
||||
if self.total == 0:
|
||||
_LOG.warning('UpdateCallback with total == 0 created')
|
||||
self.total = 1
|
||||
|
||||
def update_empty(self, count=None):
|
||||
pass
|
||||
|
@ -41,7 +41,7 @@ import logging
|
||||
# gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..const import PREFIXDIR, ROOT_DIR
|
||||
from ..const import LOCALE_DIR
|
||||
from ..constfunc import mac, UNITYPE
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -49,22 +49,16 @@ from ..constfunc import mac, UNITYPE
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
if "GRAMPSI18N" in os.environ:
|
||||
if os.path.exists(os.environ["GRAMPSI18N"]):
|
||||
LOCALEDIR = os.environ["GRAMPSI18N"]
|
||||
else:
|
||||
LOCALEDIR = None
|
||||
elif os.path.exists( os.path.join(ROOT_DIR, "lang") ):
|
||||
LOCALEDIR = os.path.join(ROOT_DIR, "lang")
|
||||
elif os.path.exists(os.path.join(PREFIXDIR, "share/locale")):
|
||||
LOCALEDIR = os.path.join(PREFIXDIR, "share/locale")
|
||||
else:
|
||||
LOCALEDIR = os.environ["GRAMPSI18N"]
|
||||
else:
|
||||
LOCALEDIR = LOCALE_DIR
|
||||
|
||||
if not os.path.exists(LOCALEDIR):
|
||||
lang = os.environ.get('LANG', 'en')
|
||||
if lang and lang[:2] == 'en':
|
||||
pass # No need to display warning, we're in English
|
||||
else:
|
||||
logging.warning('Locale dir does not exist at ' +
|
||||
os.path.join(PREFIXDIR, "share/locale"))
|
||||
logging.warning('Running python setup.py install --prefix=YourPrefixDir might fix the problem')
|
||||
logging.warning('Locale dir does not exist at ' + LOCALEDIR)
|
||||
LOCALEDIR = None
|
||||
|
||||
LOCALEDOMAIN = 'gramps'
|
||||
|
@ -236,14 +236,27 @@ def show_settings():
|
||||
except ImportError:
|
||||
gobjectver_str = 'not found'
|
||||
|
||||
try:
|
||||
from gi.repository import Pango
|
||||
try:
|
||||
pangover_str = Pango.version_string()
|
||||
except :# any failure to 'get' the version
|
||||
pangover_str = 'unknown version'
|
||||
|
||||
except ImportError:
|
||||
pangover_str = 'not found'
|
||||
|
||||
try:
|
||||
import cairo
|
||||
try:
|
||||
cairover_str = '%d.%d.%d' % cairo.version_info
|
||||
pycairover_str = '%d.%d.%d' % cairo.version_info
|
||||
cairover_str = cairo.cairo_version_string()
|
||||
except :# any failure to 'get' the version
|
||||
pycairover_str = 'unknown version'
|
||||
cairover_str = 'unknown version'
|
||||
|
||||
except ImportError:
|
||||
pycairover_str = 'not found'
|
||||
cairover_str = 'not found'
|
||||
|
||||
try:
|
||||
@ -279,7 +292,8 @@ def show_settings():
|
||||
else:
|
||||
import bsddb
|
||||
bsddb_str = bsddb.__version__
|
||||
bsddb_db_str = str(bsddb.db.version())
|
||||
bsddb_db_str = str(bsddb.db.version()).replace(', ', '.')\
|
||||
.replace('(', '').replace(')', '')
|
||||
except:
|
||||
bsddb_str = 'not found'
|
||||
bsddb_db_str = 'not found'
|
||||
@ -327,6 +341,7 @@ def show_settings():
|
||||
print (' gramps : %s' % gramps_str)
|
||||
print (' gtk++ : %s' % gtkver_str)
|
||||
print (' gobject : %s' % gobjectver_str)
|
||||
print (' pango : %s' % pangover_str)
|
||||
if usebsddb3:
|
||||
print (' Using bsddb3')
|
||||
else:
|
||||
@ -334,6 +349,7 @@ def show_settings():
|
||||
print (' bsddb : %s' % bsddb_str)
|
||||
print (' bsddb.db : %s' % bsddb_db_str)
|
||||
print (' cairo : %s' % cairover_str)
|
||||
print (' pycairo : %s' % pycairover_str)
|
||||
print (' osmgpsmap : %s' % osmgpsmap_str)
|
||||
print (' pyexiv2 : %s' % pyexiv2_str)
|
||||
print (' o.s. : %s' % operating_system)
|
||||
|
@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2008 Raphael Ackermann
|
||||
# Copyright (C) 2010 Benny Malengier
|
||||
# Copyright (C) 2010 Nick Hall
|
||||
# Copyright (C) 2012 Doug Blank <doug.blank@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -321,7 +322,7 @@ class ConfigureDialog(ManagedWindow):
|
||||
table.attach(hbox, 2, 3, index, index+1, yoptions=0)
|
||||
|
||||
def add_entry(self, table, label, index, constant, callback=None,
|
||||
config=None):
|
||||
config=None, col_attach=0):
|
||||
if not config:
|
||||
config = self.__config
|
||||
if not callback:
|
||||
@ -330,9 +331,9 @@ class ConfigureDialog(ManagedWindow):
|
||||
entry = Gtk.Entry()
|
||||
entry.set_text(config.get(constant))
|
||||
entry.connect('changed', callback, constant)
|
||||
table.attach(lwidget, 0, 1, index, index+1, yoptions=0,
|
||||
table.attach(lwidget, col_attach, col_attach+1, index, index+1, yoptions=0,
|
||||
xoptions=Gtk.AttachOptions.FILL)
|
||||
table.attach(entry, 1, 2, index, index+1, yoptions=0)
|
||||
table.attach(entry, col_attach+1, col_attach+2, index, index+1, yoptions=0)
|
||||
|
||||
def add_pos_int_entry(self, table, label, index, constant, callback=None,
|
||||
config=None, col_attach=1):
|
||||
@ -1147,7 +1148,7 @@ class GrampsPreferences(ConfigureDialog):
|
||||
return _('Dates'), table
|
||||
|
||||
def add_behavior_panel(self, configdialog):
|
||||
table = Gtk.Table(3, 6)
|
||||
table = Gtk.Table(2, 8)
|
||||
table.set_border_width(12)
|
||||
table.set_col_spacings(6)
|
||||
table.set_row_spacings(6)
|
||||
@ -1205,16 +1206,18 @@ class GrampsPreferences(ConfigureDialog):
|
||||
table.attach(lwidget, 1, 2, 7, 8, yoptions=0)
|
||||
table.attach(self.whattype_box, 2, 3, 7, 8, yoptions=0)
|
||||
|
||||
self.add_entry(table, _('Where to check'), 8, 'behavior.addons-url', col_attach=1)
|
||||
|
||||
checkbutton = Gtk.CheckButton(
|
||||
_("Do not ask about previously notified addons"))
|
||||
checkbutton.set_active(config.get('behavior.do-not-show-previously-seen-updates'))
|
||||
checkbutton.connect("toggled", self.toggle_hide_previous_addons)
|
||||
|
||||
table.attach(checkbutton, 0, 3, 8, 9, yoptions=0)
|
||||
table.attach(checkbutton, 0, 3, 9, 10, yoptions=0)
|
||||
button = Gtk.Button(_("Check now"))
|
||||
button.connect("clicked", lambda obj: \
|
||||
self.uistate.viewmanager.check_for_updates(force=True))
|
||||
table.attach(button, 3, 4, 8, 9, yoptions=0)
|
||||
table.attach(button, 3, 4, 9, 10, yoptions=0)
|
||||
|
||||
return _('General'), table
|
||||
|
||||
|
@ -81,6 +81,7 @@ class EmbeddedList(ButtonTab):
|
||||
self.build_model = build_model
|
||||
|
||||
# handle the selection
|
||||
self.tree.set_hover_selection(True)
|
||||
self.selection = self.tree.get_selection()
|
||||
self.selection.connect('changed', self._selection_changed)
|
||||
self.track_ref_for_deletion("selection")
|
||||
@ -104,13 +105,24 @@ class EmbeddedList(ButtonTab):
|
||||
Handle button press, not double-click, that is done in init_interface
|
||||
"""
|
||||
if is_right_click(event):
|
||||
ref = self.get_selected()
|
||||
if ref:
|
||||
self.right_click(obj, event)
|
||||
#ref = self.get_selected()
|
||||
#if ref:
|
||||
self.right_click(obj, event)
|
||||
return True
|
||||
elif event.type == Gdk.EventType.BUTTON_PRESS and event.button == 2:
|
||||
fun = self.get_middle_click()
|
||||
if fun:
|
||||
fun()
|
||||
return True
|
||||
elif event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1:
|
||||
if self.tree.get_hover_selection():
|
||||
self.tree.set_hover_selection(False)
|
||||
return True
|
||||
else:
|
||||
self.tree.set_hover_selection(True)
|
||||
#let code for single click still select the current row:
|
||||
return False
|
||||
return False
|
||||
|
||||
def get_popup_menu_items(self):
|
||||
"""
|
||||
@ -146,20 +158,18 @@ class EmbeddedList(ButtonTab):
|
||||
On right click show a popup menu.
|
||||
This is populated with get_popup_menu_items
|
||||
"""
|
||||
menu = Gtk.Menu()
|
||||
self.__store_menu = Gtk.Menu() #need to keep reference or menu disappears
|
||||
menu = self.__store_menu
|
||||
for (needs_write_access, image, title, func) in self.get_popup_menu_items():
|
||||
if image:
|
||||
if isinstance(title, tuple):
|
||||
img_stock, txt = title
|
||||
item = Gtk.ImageMenuItem(txt)
|
||||
item = Gtk.ImageMenuItem.new_with_label(txt)
|
||||
img = Gtk.Image()
|
||||
img.set_from_stock(img_stock, Gtk.IconSize.MENU)
|
||||
item.set_image(img)
|
||||
else:
|
||||
item = Gtk.ImageMenuItem('')
|
||||
img = Gtk.Image()
|
||||
img.set_from_stock(title, Gtk.IconSize.MENU)
|
||||
item.set_image(img)
|
||||
item = Gtk.ImageMenuItem.new_from_stock(title, None)
|
||||
else:
|
||||
item = Gtk.MenuItem(label=title)
|
||||
item.connect('activate', func)
|
||||
|
@ -219,7 +219,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
self.iconlist.set_selection_mode(Gtk.SelectionMode.SINGLE)
|
||||
|
||||
# connect the signals
|
||||
self.iconlist.connect('selection-changed', self._selection_changed)
|
||||
self.__id_connect_sel = self.iconlist.connect('selection-changed', self._selection_changed)
|
||||
self.iconlist.connect('button_press_event', self.double_click)
|
||||
self.iconlist.connect('key_press_event', self.key_pressed)
|
||||
self._connect_icon_model()
|
||||
@ -563,3 +563,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
returns the index of the object within the associated data
|
||||
"""
|
||||
return self.get_data().index(obj)
|
||||
|
||||
def clean_up(self):
|
||||
self.iconlist.disconnect(self.__id_connect_sel)
|
||||
super(ButtonTab, self).clean_up()
|
||||
|
@ -113,10 +113,21 @@ class GroupEmbeddedList(EmbeddedList):
|
||||
if obj and obj[1]:
|
||||
self._tmpgroup = obj[0]
|
||||
self.right_click(obj[1], event)
|
||||
return True
|
||||
elif event.type == Gdk.EventType.BUTTON_PRESS and event.button == 2:
|
||||
fun = self.get_middle_click()
|
||||
if fun:
|
||||
fun()
|
||||
return True
|
||||
elif event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1:
|
||||
if self.tree.get_hover_selection():
|
||||
self.tree.set_hover_selection(False)
|
||||
return True
|
||||
else:
|
||||
self.tree.set_hover_selection(True)
|
||||
#let code for single click still select the current row:
|
||||
return False
|
||||
return False
|
||||
|
||||
def is_empty(self):
|
||||
"""
|
||||
|
@ -13,6 +13,7 @@
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
@ -22,11 +23,9 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -39,11 +38,9 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="apply">
|
||||
<property name="label" translatable="yes">Install Selected _Addons</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -88,8 +85,8 @@
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
@ -101,11 +98,9 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="select_all">
|
||||
<property name="label" translatable="yes">_Select All</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -117,11 +112,9 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="select_none">
|
||||
<property name="label" translatable="yes">Select _None</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -160,7 +153,7 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
|
@ -121,7 +121,7 @@ class UndoHistory(ManagedWindow):
|
||||
(model, node) = self.selection.get_selected()
|
||||
if not node or len(self.model) == 1:
|
||||
return
|
||||
path = self.model.get_path(node)
|
||||
path = self.model.get_path(node).get_indices()
|
||||
start = min(path[0], self.undodb.undo_count)
|
||||
end = max(path[0], self.undodb.undo_count)
|
||||
|
||||
@ -158,7 +158,7 @@ class UndoHistory(ManagedWindow):
|
||||
(model, node) = self.selection.get_selected()
|
||||
if not node:
|
||||
return
|
||||
path = self.model.get_path(node)
|
||||
path = self.model.get_path(node).get_indices()
|
||||
nsteps = path[0] - self.undodb.undo_count - 1
|
||||
self._move(nsteps or -1)
|
||||
|
||||
@ -167,7 +167,7 @@ class UndoHistory(ManagedWindow):
|
||||
(model, node) = self.selection.get_selected()
|
||||
if not node:
|
||||
return
|
||||
path = self.model.get_path(node)
|
||||
path = self.model.get_path(node).get_indices()
|
||||
nsteps = path[0] - self.undodb.undo_count
|
||||
self._move(nsteps or 1)
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
# Copyright (C) 2010 Nick Hall
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
# Copyright (C) 2012 Gary Burton
|
||||
# Copyright (C) 2012 Doug Blank <doug.blank@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -237,7 +238,6 @@ UIDEFAULT = '''<ui>
|
||||
WIKI_HELP_PAGE_FAQ = '%s_-_FAQ' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_PAGE_KEY = '%s_-_Keybindings' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_PAGE_MAN = '%s' % URL_MANUAL_PAGE
|
||||
ADDONS_URL = "http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/trunk"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -383,10 +383,10 @@ class ViewManager(CLIManager):
|
||||
# now we have a list of languages to try:
|
||||
fp = None
|
||||
for lang in langs:
|
||||
URL = "%s/listings/addons-%s.txt" % (ADDONS_URL, lang)
|
||||
URL = "%s/listings/addons-%s.txt" % (config.get("behavior.addons-url"), lang)
|
||||
LOG.debug(" trying: %s" % URL)
|
||||
try:
|
||||
fp = urlopen(URL)
|
||||
fp = urlopen(URL, timeout=10) # abort after 10 seconds
|
||||
except: # some error
|
||||
LOG.debug(" IOError!")
|
||||
fp = None
|
||||
@ -420,7 +420,7 @@ class ViewManager(CLIManager):
|
||||
plugin_dict["i"] not in config.get('behavior.previously-seen-updates')):
|
||||
addon_update_list.append((_("Updated"),
|
||||
"%s/download/%s" %
|
||||
(ADDONS_URL,
|
||||
(config.get("behavior.addons-url"),
|
||||
plugin_dict["z"]),
|
||||
plugin_dict))
|
||||
else:
|
||||
@ -432,14 +432,22 @@ class ViewManager(CLIManager):
|
||||
plugin_dict["i"] not in config.get('behavior.previously-seen-updates')):
|
||||
addon_update_list.append((_("New"),
|
||||
"%s/download/%s" %
|
||||
(ADDONS_URL,
|
||||
(config.get("behavior.addons-url"),
|
||||
plugin_dict["z"]),
|
||||
plugin_dict))
|
||||
config.set("behavior.last-check-for-updates",
|
||||
datetime.date.today().strftime("%Y/%m/%d"))
|
||||
count += 1
|
||||
if fp:
|
||||
fp.close()
|
||||
if fp:
|
||||
fp.close()
|
||||
else:
|
||||
from .dialog import OkDialog
|
||||
OkDialog(_("Checking Addons Failed"),
|
||||
_("The addon repository appears to be unavailable. Please try again later."),
|
||||
self.window)
|
||||
if fp:
|
||||
fp.close()
|
||||
return
|
||||
LOG.debug("Done checking!")
|
||||
# List of translated strings used here
|
||||
# Dead code for l10n
|
||||
|
@ -620,11 +620,16 @@ class ListView(NavigationView):
|
||||
filter_info = (False, value, value[0] in self.exact_search())
|
||||
|
||||
if same_col:
|
||||
##TODO GTK3 rows_reordered not exposed by gi, we need to reconnect
|
||||
## model to obtain desired effect, but this collapses nodes ...
|
||||
self.list.set_model(None)
|
||||
self.model.reverse_order()
|
||||
self.list.set_model(self.model)
|
||||
# activate when https://bugzilla.gnome.org/show_bug.cgi?id=684558
|
||||
# is resolved
|
||||
if False and (Gtk.get_major_version(), Gtk.get_minor_version()) >= (3,8):
|
||||
self.model.reverse_order()
|
||||
else:
|
||||
## GTK 3.6 rows_reordered not exposed by gi, we need to reconnect
|
||||
## model to obtain desired effect, but this collapses nodes ...
|
||||
self.list.set_model(None)
|
||||
self.model.reverse_order()
|
||||
self.list.set_model(self.model)
|
||||
else:
|
||||
self.model = self.make_model(self.dbstate.db, self.sort_col,
|
||||
self.sort_order,
|
||||
|
@ -699,10 +699,11 @@ class TreeBaseModel(GObject.Object, Gtk.TreeModel):
|
||||
|
||||
def reverse_order(self):
|
||||
"""
|
||||
Reverse the order of the map. This does not signal rows_reordered,
|
||||
so to propagate the change to the view, you need to reattach the
|
||||
model to the view.
|
||||
Reverse the order of the map. Only for Gtk 3.9+ does this signal
|
||||
rows_reordered, so to propagate the change to the view, you need to
|
||||
reattach the model to the view.
|
||||
"""
|
||||
self.GTK38PLUS = (Gtk.get_major_version(), Gtk.get_minor_version()) >= (3,8)
|
||||
self.__reverse = not self.__reverse
|
||||
top_node = self.tree[None]
|
||||
self._reverse_level(top_node)
|
||||
@ -722,8 +723,11 @@ class TreeBaseModel(GObject.Object, Gtk.TreeModel):
|
||||
else:
|
||||
iternode = self.get_iter(node)
|
||||
path = self.do_get_path(iternode)
|
||||
##TODO GTK3: rows_reordered is not exposed in gi
|
||||
#self.rows_reordered(path, iter, rows)
|
||||
# activate when https://bugzilla.gnome.org/show_bug.cgi?id=684558
|
||||
# is resolved
|
||||
if False and self.GTK38PLUS:
|
||||
##rows_reordered is only exposed in gi starting GTK 3.8
|
||||
self.rows_reordered(path, iter, rows)
|
||||
if self.nrgroups > 1:
|
||||
for child in node.children:
|
||||
self._reverse_level(self.nodemap.node(child[1]))
|
||||
|
@ -432,12 +432,12 @@ class _GtkProgressBar(Gtk.VBox):
|
||||
self._cancel.connect("clicked",
|
||||
lambda x: long_op_status.cancel())
|
||||
self._cancel.show()
|
||||
self._hbox.pack_end(self._cancel, expand=False, fill=True, padding=0)
|
||||
self._hbox.pack_end(self._cancel, False, True, 0)
|
||||
|
||||
self._hbox.pack_start(self._pbar, True, True, 0)
|
||||
|
||||
self.pack_start(self._lbl, expand=False, fill=False)
|
||||
self.pack_start(self._hbox, expand=False, fill=False)
|
||||
self.pack_start(self._lbl, False, False, 0)
|
||||
self.pack_start(self._hbox, False, False, 0)
|
||||
|
||||
|
||||
self._pbar_max = (long_op_status.get_total_steps()/
|
||||
@ -483,7 +483,18 @@ class GtkProgressDialog(Gtk.Dialog):
|
||||
""":param title: The title to display on the top of the window.
|
||||
:type title: string
|
||||
"""
|
||||
GObject.GObject.__init__(self, *window_params)
|
||||
#GObject.GObject.__init__(self, *window_params)
|
||||
GObject.GObject.__init__(self)
|
||||
if len(window_params) >= 2:
|
||||
self.set_transient_for(window_params[1])
|
||||
if len(window_params) >= 3:
|
||||
flags = window_params[2]
|
||||
if Gtk.DialogFlags.MODAL & flags:
|
||||
self.set_modal(True)
|
||||
if Gtk.DialogFlags.DESTROY_WITH_PARENT & flags:
|
||||
self.set_destroy_with_parent(True)
|
||||
if len(window_params) >= 4:
|
||||
self.add_buttons(window_params[3:])
|
||||
self.connect('delete_event', self._warn)
|
||||
self.set_title(title)
|
||||
#self.set_resize_mode(Gtk.RESIZE_IMMEDIATE)
|
||||
@ -502,7 +513,7 @@ class GtkProgressDialog(Gtk.Dialog):
|
||||
"""
|
||||
pbar = _GtkProgressBar(long_op_status)
|
||||
|
||||
self.vbox.pack_start(pbar, expand=False, fill=False)
|
||||
self.vbox.pack_start(pbar, False, False, 0)
|
||||
|
||||
pbar.show()
|
||||
# this seems to cause an infinite loop:
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2007-2008 Zsolt Foldvari
|
||||
# Copyright (C) 2012 Benny Malengier
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -135,8 +136,12 @@ class FadeOut(GObject.GObject):
|
||||
return
|
||||
|
||||
##_LOG.debug('_start_merging: Starting')
|
||||
func = self._merge_colors(self._start_color,
|
||||
Gdk.color_parse(self.ERROR_COLOR)).next
|
||||
generator = self._merge_colors(self._start_color,
|
||||
Gdk.color_parse(self.ERROR_COLOR))
|
||||
if sys.version_info[0] < 3:
|
||||
func = generator.next
|
||||
else:
|
||||
func = generator.__next__
|
||||
self._background_timeout_id = (
|
||||
GObject.timeout_add(FadeOut.MERGE_COLORS_DELAY, func))
|
||||
self._countdown_timeout_id = -1
|
||||
@ -173,444 +178,9 @@ class FadeOut(GObject.GObject):
|
||||
GObject.source_remove(self._countdown_timeout_id)
|
||||
self._countdown_timeout_id = -1
|
||||
|
||||
self._widget.update_background(self._start_color)
|
||||
self._widget.update_background(self._start_color, unset=True)
|
||||
self._done = False
|
||||
|
||||
class Tooltip(Gtk.Window):
|
||||
"""Tooltip for the Icon in the MaskedEntry"""
|
||||
|
||||
DEFAULT_DELAY = 500
|
||||
BORDER_WIDTH = 4
|
||||
|
||||
def __init__(self, widget):
|
||||
GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
|
||||
# from gtktooltips.c:gtk_tooltips_force_window
|
||||
self.set_app_paintable(True)
|
||||
self.set_resizable(False)
|
||||
self.set_name("gtk-tooltips")
|
||||
self.set_border_width(Tooltip.BORDER_WIDTH)
|
||||
#TODO GTK3: this signal no longer exists. Convert to draw
|
||||
self.connect('draw', self._on__draw_event)
|
||||
|
||||
self._label = Gtk.Label()
|
||||
self.add(self._label)
|
||||
self._show_timeout_id = -1
|
||||
|
||||
# from gtktooltips.c:gtk_tooltips_draw_tips
|
||||
def _calculate_pos(self, widget):
|
||||
screen = widget.get_screen()
|
||||
|
||||
greq = Gtk.Requisition()
|
||||
greq = self.size_request()
|
||||
w = greq.width
|
||||
h = greq.height
|
||||
|
||||
_, x, y = widget.get_window().get_origin()
|
||||
|
||||
# TODO GTK3 No longer WidgetFlags!
|
||||
#if widget.get_state_flags() & Gtk.WidgetFlags.NO_WINDOW:
|
||||
x += widget.get_allocation().width
|
||||
y += widget.get_allocation().height
|
||||
|
||||
x = screen.get_root_window().get_pointer()[1]
|
||||
#TODO GTK3, how: x = screen.get_window().get_device_position()[0]
|
||||
x -= (w / 2 + Tooltip.BORDER_WIDTH)
|
||||
|
||||
pointer_screen, px, py, _ = screen.get_display().get_pointer()
|
||||
if pointer_screen != screen:
|
||||
px = x
|
||||
py = y
|
||||
|
||||
monitor_num = screen.get_monitor_at_point(px, py)
|
||||
monitor = screen.get_monitor_geometry(monitor_num)
|
||||
|
||||
if (x + w) > monitor.x + monitor.width:
|
||||
x -= (x + w) - (monitor.x + monitor.width);
|
||||
elif x < monitor.x:
|
||||
x = monitor.x
|
||||
|
||||
if ((y + h + widget.get_allocation().height + Tooltip.BORDER_WIDTH) >
|
||||
monitor.y + monitor.height):
|
||||
y -= h + Tooltip.BORDER_WIDTH
|
||||
else:
|
||||
y += widget.get_allocation().height + Tooltip.BORDER_WIDTH
|
||||
|
||||
return x, y
|
||||
|
||||
# from gtktooltips.c:gtk_tooltips_paint_window
|
||||
def _on__draw_event(self, window, cairo_context):
|
||||
#GTK3 TODO, paint_flat_box deprecated !!
|
||||
greq = self.size_request()
|
||||
w = greq.width
|
||||
h = greq.height
|
||||
Gtk.render_frame(window.get_style_context(), cairo_context,
|
||||
0,0,w,h)
|
||||
#window.get_style().paint_flat_box(window.window,
|
||||
# Gtk.StateType.NORMAL, Gtk.ShadowType.OUT,
|
||||
# None, window, "tooltip",
|
||||
# 0, 0, w, h)
|
||||
return False
|
||||
|
||||
def _real_display(self, widget):
|
||||
x, y = self._calculate_pos(widget)
|
||||
|
||||
self.move(x, y)
|
||||
self.show_all()
|
||||
|
||||
# Public API
|
||||
|
||||
def set_text(self, text):
|
||||
self._label.set_text(text)
|
||||
|
||||
def hide(self):
|
||||
Gtk.Window.hide(self)
|
||||
GObject.source_remove(self._show_timeout_id)
|
||||
self._show_timeout_id = -1
|
||||
|
||||
def display(self, widget):
|
||||
if not self._label.get_text():
|
||||
return
|
||||
|
||||
if self._show_timeout_id != -1:
|
||||
return
|
||||
|
||||
self._show_timeout_id = GObject.timeout_add(Tooltip.DEFAULT_DELAY,
|
||||
self._real_display,
|
||||
widget)
|
||||
|
||||
# This is tricky and contains quite a few hacks:
|
||||
# An entry contains 2 GdkWindows, one for the background and one for
|
||||
# the text area. The normal one, on which the (normally white) background
|
||||
# is drawn can be accessed through entry.window (after realization)
|
||||
# The other window is the one where the cursor and the text is drawn upon,
|
||||
# it's refered to as "text area" inside the GtkEntry code and it is called
|
||||
# the same here. It can only be accessed through window.get_children()[0],
|
||||
# since it's considered private to the entry.
|
||||
#
|
||||
# +-------------------------------------+
|
||||
# | (1) | (1) parent widget (grey)
|
||||
# |+----------------(2)----------------+|
|
||||
# || |-- /-\ | || (2) entry.window (white)
|
||||
# || |- | | |(4) (3) ||
|
||||
# || | \-/ | || (3) text area (transparent)
|
||||
# |+-----------------------------------+|
|
||||
# |-------------------------------------| (4) cursor, black
|
||||
# | |
|
||||
# +-------------------------------------|
|
||||
#
|
||||
# So, now we want to put an icon in the edge:
|
||||
# An earlier approached by Lorzeno drew the icon directly on the text area,
|
||||
# which is not desired since if the text is using the whole width of the
|
||||
# entry the icon will be drawn on top of the text.
|
||||
# Now what we want to do is to resize the text area and create a
|
||||
# new window upon which we can draw the icon.
|
||||
#
|
||||
# +-------------------------------------+
|
||||
# | | (5) icon window
|
||||
# |+----------------------------++-----+|
|
||||
# || |-- /-\ | || ||
|
||||
# || |- | | | || (5) ||
|
||||
# || | \-/ | || ||
|
||||
# |+----------------------------++-----+|
|
||||
# |-------------------------------------|
|
||||
# | |
|
||||
# +-------------------------------------+
|
||||
#
|
||||
# When resizing the text area the cursor and text is not moved into the
|
||||
# correct position, it'll still be off by the width of the icon window
|
||||
# To fix this we need to call a private function, gtk_entry_recompute,
|
||||
# a workaround is to call set_visiblity() which calls recompute()
|
||||
# internally.
|
||||
#
|
||||
|
||||
class IconEntry(object):
|
||||
"""
|
||||
Helper object for rendering an icon in a GtkEntry
|
||||
"""
|
||||
|
||||
def __init__(self, entry):
|
||||
if not isinstance(entry, Gtk.Entry):
|
||||
raise TypeError("entry must be a Gtk.Entry")
|
||||
self._constructed = False
|
||||
self._pixbuf = None
|
||||
self._pixw = 1
|
||||
self._pixh = 1
|
||||
self._text_area = None
|
||||
self._text_area_pos = (0, 0)
|
||||
self._icon_win = None
|
||||
self._entry = entry
|
||||
self._tooltip = Tooltip(self)
|
||||
self._locked = False
|
||||
entry.connect('enter-notify-event',
|
||||
self._on_entry__enter_notify_event)
|
||||
entry.connect('leave-notify-event',
|
||||
self._on_entry__leave_notify_event)
|
||||
entry.connect('notify::xalign',
|
||||
self._on_entry__notify_xalign)
|
||||
self._update_position()
|
||||
|
||||
def _on_entry__notify_xalign(self, entry, pspec):
|
||||
self._update_position()
|
||||
|
||||
def _on_entry__enter_notify_event(self, entry, event):
|
||||
icon_win = self.get_icon_window()
|
||||
if event.window != icon_win:
|
||||
return
|
||||
|
||||
self._tooltip.display(entry)
|
||||
|
||||
def _on_entry__leave_notify_event(self, entry, event):
|
||||
if event.window != self.get_icon_window():
|
||||
return
|
||||
|
||||
self._tooltip.hide()
|
||||
|
||||
def set_tooltip(self, text):
|
||||
self._tooltip.set_text(text)
|
||||
|
||||
def get_icon_window(self):
|
||||
return self._icon_win
|
||||
|
||||
def set_pixbuf(self, pixbuf):
|
||||
"""
|
||||
@param pixbuf: a GdkPixbuf.Pixbuf or None
|
||||
"""
|
||||
entry = self._entry
|
||||
if not isinstance(entry.get_toplevel(), Gtk.Window):
|
||||
# For widgets in SlaveViews, wait until they're attached
|
||||
# to something visible, then set the pixbuf
|
||||
entry.connect_object('realize', self.set_pixbuf, pixbuf)
|
||||
return
|
||||
|
||||
if pixbuf:
|
||||
if not isinstance(pixbuf, GdkPixbuf.Pixbuf):
|
||||
raise TypeError("pixbuf must be a GdkPixbuf")
|
||||
else:
|
||||
# Turning off the icon should also restore the background
|
||||
entry.override_background_color(Gtk.StateType.NORMAL, None)
|
||||
if not self._pixbuf:
|
||||
return
|
||||
self._pixbuf = pixbuf
|
||||
|
||||
if pixbuf:
|
||||
self._pixw = pixbuf.get_width()
|
||||
self._pixh = pixbuf.get_height()
|
||||
else:
|
||||
self._pixw = self._pixh = 0
|
||||
|
||||
win = self._icon_win
|
||||
if not win:
|
||||
self.construct()
|
||||
win = self._icon_win
|
||||
|
||||
self.resize_windows()
|
||||
|
||||
# XXX: Why?
|
||||
if win:
|
||||
if not pixbuf:
|
||||
win.hide()
|
||||
else:
|
||||
win.show()
|
||||
|
||||
self._recompute()
|
||||
entry.queue_draw()
|
||||
|
||||
def construct(self):
|
||||
if self._constructed:
|
||||
return
|
||||
|
||||
entry = self._entry
|
||||
if not entry.get_realized():
|
||||
entry.realize()
|
||||
|
||||
# Hack: Save a reference to the text area, now when its created
|
||||
self._text_area = entry.get_window().get_children()[0]
|
||||
self._text_area_pos = self._text_area.get_position()
|
||||
|
||||
# PyGTK should allow default values for most of the values here.
|
||||
attr = Gdk.WindowAttr()
|
||||
attr.width = self._pixw
|
||||
attr.height = self._pixh
|
||||
attr.x = 0
|
||||
attr.y = 0
|
||||
attr.cursor = Gdk.Cursor.new_for_display(
|
||||
entry.get_display(), Gdk.CursorType.LEFT_PTR)
|
||||
#attr.wmclass_name=''
|
||||
#attr.wmclass_class=''
|
||||
attr.override_redirect=True
|
||||
attr.event_mask = (Gdk.EventMask.ENTER_NOTIFY_MASK |
|
||||
Gdk.EventMask.LEAVE_NOTIFY_MASK)
|
||||
# GTK3 We can we not set title?
|
||||
#attr.title = 'icon window'
|
||||
attr.wclass = Gdk.WindowWindowClass.INPUT_OUTPUT
|
||||
attr.window_type = Gdk.WindowType.CHILD
|
||||
attr.visual = entry.get_visual()
|
||||
attrmask = (
|
||||
#Gdk.WindowAttributesType.TITLE |
|
||||
Gdk.WindowAttributesType.X |
|
||||
Gdk.WindowAttributesType.Y |
|
||||
Gdk.WindowAttributesType.CURSOR |
|
||||
Gdk.WindowAttributesType.VISUAL |
|
||||
Gdk.WindowAttributesType.NOREDIR
|
||||
)
|
||||
#the window containing the icon image
|
||||
self._icon_win = Gdk.Window(entry.get_window(),
|
||||
attr,
|
||||
attrmask)
|
||||
## Gdk.WindowType.CHILD,
|
||||
## (Gdk.EventMask.ENTER_NOTIFY_MASK |
|
||||
## Gdk.EventMask.LEAVE_NOTIFY_MASK),
|
||||
## Gdk.WindowWindowClass.INPUT_OUTPUT,
|
||||
## title='icon window',
|
||||
## x=0, y=0,
|
||||
## visual=entry.get_visual(),
|
||||
## #TODO GTK3: is there alternative for:
|
||||
## #colormap=entry.get_colormap(),
|
||||
## cursor=Gdk.Cursor.new_for_display(
|
||||
## entry.get_display(), Gdk.CursorType.LEFT_PTR),
|
||||
## wmclass_name='',
|
||||
## wmclass_class='', override_redirect=True)
|
||||
self._icon_win.set_user_data(entry)
|
||||
#win.set_background(entry.get_style().base[entry.get_state()])
|
||||
self._constructed = True
|
||||
|
||||
def deconstruct(self):
|
||||
if self._icon_win:
|
||||
self._icon_win.set_user_data(None)
|
||||
# Destroy not needed, called by the GC.
|
||||
# TODO GTK3: we see error: Gdk-WARNING **: losing last reference to undestroyed window
|
||||
# TODO Investigate
|
||||
self._icon_win = None
|
||||
|
||||
def update_background(self, color):
|
||||
if self._locked:
|
||||
return
|
||||
if not self._icon_win:
|
||||
return
|
||||
|
||||
self.draw_pixbuf()
|
||||
|
||||
maxvalcol = 65535.
|
||||
if color:
|
||||
red = int(color.red/ maxvalcol*255)
|
||||
green = int(color.green/ maxvalcol*255)
|
||||
blue = int(color.blue/ maxvalcol*255)
|
||||
rgba = Gdk.RGBA()
|
||||
Gdk.RGBA.parse(rgba, 'rgb(%f,%f,%f)'%(red, green, blue))
|
||||
self._entry.override_background_color(Gtk.StateFlags.NORMAL, rgba)
|
||||
#GTK 3: workaround, background not changing in themes, use symbolic
|
||||
self._entry.override_symbolic_color('bg_color', rgba)
|
||||
self._entry.override_symbolic_color('theme_bg_color', rgba)
|
||||
else:
|
||||
self._entry.override_background_color(Gtk.StateFlags.NORMAL, None)
|
||||
self._entry.override_symbolic_color('bg_color', None)
|
||||
self._entry.override_symbolic_color('theme_bg_color', None)
|
||||
|
||||
|
||||
def get_background(self):
|
||||
""" Return default background color as a Gdk.Color """
|
||||
backcol = self._entry.get_style_context().get_background_color(Gtk.StateType.NORMAL)
|
||||
bcol= Gdk.Color.parse('#fff')[1]
|
||||
bcol.red = int(backcol.red * 65535)
|
||||
bcol.green = int(backcol.green * 65535)
|
||||
bcol.blue = int(backcol.blue * 65535)
|
||||
return bcol
|
||||
|
||||
def resize_windows(self):
|
||||
if not self._pixbuf:
|
||||
return
|
||||
|
||||
icony = iconx = 0
|
||||
|
||||
# Make space for the icon, both windows
|
||||
# GTK 3 gives for entry the sizes for the entire editor
|
||||
geom =self._text_area.get_geometry()
|
||||
origx = geom[0]
|
||||
origy = geom[1]
|
||||
origw = geom[2]
|
||||
origh = geom[3]
|
||||
textw = origw
|
||||
texth = origh
|
||||
textw = textw - self._pixw - (iconx + icony)
|
||||
|
||||
if self._pos == Gtk.PositionType.LEFT:
|
||||
textx, texty = self._text_area_pos
|
||||
textx += iconx + self._pixw
|
||||
|
||||
# FIXME: Why is this needed. Focus padding?
|
||||
# The text jumps without this
|
||||
textw -= 2
|
||||
self._text_area.move_resize(textx, texty, textw, texth)
|
||||
self._recompute()
|
||||
elif self._pos == Gtk.PositionType.RIGHT:
|
||||
self._text_area.resize(textw, texth)
|
||||
iconx += textw
|
||||
|
||||
icon_win = self._icon_win
|
||||
# XXX: Why?
|
||||
if not icon_win:
|
||||
return
|
||||
|
||||
# If the size of the window is large enough, resize and move it
|
||||
# Otherwise just move it to the right side of the entry
|
||||
if (icon_win.get_width(), icon_win.get_height()) != (self._pixw, self._pixh):
|
||||
icon_win.move_resize(origx + origw - self._pixw, icony + origy, 100, 100)
|
||||
icon_win.move_resize(origx + origw - self._pixw, icony + origy, self._pixw, self._pixh)
|
||||
else:
|
||||
icon_win.move(origx + origw - self._pixw, icony + origy)
|
||||
|
||||
def draw_pixbuf(self):
|
||||
if not self._pixbuf:
|
||||
return
|
||||
|
||||
win = self._icon_win
|
||||
# XXX: Why?
|
||||
if not win:
|
||||
return
|
||||
|
||||
# Draw background first - not needed with cairo!
|
||||
##color = self._entry.get_style_context().get_background_color(
|
||||
## self._entry.get_state())
|
||||
|
||||
# If sensitive draw the icon, regardless of the window emitting the
|
||||
# event since makes it a bit smoother on resize
|
||||
if self._entry.get_sensitive():
|
||||
#GTK 3: we use cairo to draw the pixbuf
|
||||
cairo_t = Gdk.cairo_create(win)
|
||||
Gdk.cairo_set_source_pixbuf(cairo_t, self._pixbuf, 0, 0)
|
||||
cairo_t.new_path()
|
||||
cairo_t.move_to (0, 0);
|
||||
cairo_t.rel_line_to (win.get_width(), 0);
|
||||
cairo_t.rel_line_to (0, win.get_height());
|
||||
cairo_t.rel_line_to (-win.get_width(), 0);
|
||||
cairo_t.close_path ();
|
||||
cairo_t.fill()
|
||||
|
||||
def _update_position(self):
|
||||
if self._entry.get_property('xalign') > 0.5:
|
||||
self._pos = Gtk.PositionType.LEFT
|
||||
else:
|
||||
self._pos = Gtk.PositionType.RIGHT
|
||||
|
||||
def _recompute(self):
|
||||
# Protect against re-entrancy when inserting text, happens in DateEntry
|
||||
if self._locked:
|
||||
return
|
||||
|
||||
self._locked = True
|
||||
|
||||
# Hack: This triggers a .recompute() which is private
|
||||
visibility = self._entry.get_visibility()
|
||||
self._entry.set_visibility(not visibility)
|
||||
self._entry.set_visibility(visibility)
|
||||
|
||||
# Another option would be to call insert_text, however it
|
||||
# emits the signal ::changed which is not desirable.
|
||||
#self._entry.insert_text('')
|
||||
|
||||
self._locked = False
|
||||
|
||||
|
||||
(DIRECTION_LEFT, DIRECTION_RIGHT) = (1, -1)
|
||||
|
||||
(INPUT_ASCII_LETTER,
|
||||
@ -683,7 +253,8 @@ class MaskedEntry(UndoableEntry):
|
||||
self._completion = None
|
||||
self._exact_completion = False
|
||||
self._block_changed = False
|
||||
self._icon = IconEntry(self)
|
||||
self.hasicon = False
|
||||
## self._icon = IconEntry(self)
|
||||
|
||||
# List of validators
|
||||
# str -> static characters
|
||||
@ -703,25 +274,25 @@ class MaskedEntry(UndoableEntry):
|
||||
self.in_do_draw = False
|
||||
|
||||
# Virtual methods, note do_size_alloc needs gtk 2.9 +
|
||||
def do_size_allocate(self, allocation):
|
||||
Gtk.Entry.do_size_allocate(self, allocation)
|
||||
## def do_size_allocate(self, allocation):
|
||||
## Gtk.Entry.do_size_allocate(self, allocation)
|
||||
##
|
||||
## if self.get_realized():
|
||||
## self._icon.resize_windows()
|
||||
|
||||
if self.get_realized():
|
||||
self._icon.resize_windows()
|
||||
## def do_draw(self, cairo_t):
|
||||
## Gtk.Entry.do_draw(self, cairo_t)
|
||||
##
|
||||
## if Gtk.cairo_should_draw_window(cairo_t, self.get_window()):
|
||||
## self._icon.draw_pixbuf()
|
||||
|
||||
def do_draw(self, cairo_t):
|
||||
Gtk.Entry.do_draw(self, cairo_t)
|
||||
## def do_realize(self):
|
||||
## Gtk.Entry.do_realize(self)
|
||||
## self._icon.construct()
|
||||
|
||||
if Gtk.cairo_should_draw_window(cairo_t, self.get_window()):
|
||||
self._icon.draw_pixbuf()
|
||||
|
||||
def do_realize(self):
|
||||
Gtk.Entry.do_realize(self)
|
||||
self._icon.construct()
|
||||
|
||||
def do_unrealize(self):
|
||||
self._icon.deconstruct()
|
||||
Gtk.Entry.do_unrealize(self)
|
||||
## def do_unrealize(self):
|
||||
## self._icon.deconstruct()
|
||||
## Gtk.Entry.do_unrealize(self)
|
||||
|
||||
# Mask & Fields
|
||||
|
||||
@ -1455,23 +1026,58 @@ class MaskedEntry(UndoableEntry):
|
||||
# IconEntry
|
||||
|
||||
def set_tooltip(self, text):
|
||||
self._icon.set_tooltip(text)
|
||||
self.set_icon_tooltip_text(Gtk.EntryIconPosition.SECONDARY, text)
|
||||
|
||||
def set_pixbuf(self, pixbuf):
|
||||
self._icon.set_pixbuf(pixbuf)
|
||||
self.set_icon_from_pixbuf(Gtk.EntryIconPosition.SECONDARY, pixbuf)
|
||||
|
||||
def set_stock(self, stock_name):
|
||||
pixbuf = self.render_icon(stock_name, Gtk.IconSize.MENU)
|
||||
self._icon.set_pixbuf(pixbuf)
|
||||
self.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, stock_name)
|
||||
|
||||
def update_background(self, color):
|
||||
self._icon.update_background(color)
|
||||
def update_background(self, color, unset=False):
|
||||
maxvalcol = 65535.
|
||||
if color:
|
||||
red = int(color.red/ maxvalcol*255)
|
||||
green = int(color.green/ maxvalcol*255)
|
||||
blue = int(color.blue/ maxvalcol*255)
|
||||
rgba = Gdk.RGBA()
|
||||
Gdk.RGBA.parse(rgba, 'rgb(%f,%f,%f)'%(red, green, blue))
|
||||
self.override_background_color(Gtk.StateFlags.NORMAL |
|
||||
Gtk.StateFlags.ACTIVE | Gtk.StateFlags.SELECTED |
|
||||
Gtk.StateFlags.FOCUSED, rgba)
|
||||
#GTK 3: workaround, background not changing in themes, use symbolic
|
||||
self.override_symbolic_color('bg_color', rgba)
|
||||
self.override_symbolic_color('base_color', rgba)
|
||||
self.override_symbolic_color('theme_bg_color', rgba)
|
||||
self.override_symbolic_color('theme_base_color', rgba)
|
||||
self.get_window().set_background_rgba(rgba)
|
||||
pango_context = self.get_layout().get_context()
|
||||
font_description = pango_context.get_font_description()
|
||||
if unset:
|
||||
font_description.set_weight(Pango.Weight.NORMAL)
|
||||
else:
|
||||
font_description.set_weight(Pango.Weight.BOLD)
|
||||
self.override_font(font_description)
|
||||
else:
|
||||
self.override_background_color(Gtk.StateFlags.NORMAL |
|
||||
Gtk.StateFlags.ACTIVE | Gtk.StateFlags.SELECTED |
|
||||
Gtk.StateFlags.FOCUSED, None)
|
||||
self.override_symbolic_color('bg_color', None)
|
||||
self.override_symbolic_color('base_color', None)
|
||||
self.override_symbolic_color('theme_bg_color', None)
|
||||
self.override_symbolic_color('theme_base_color', None)
|
||||
pango_context = self.get_layout().get_context()
|
||||
font_description = pango_context.get_font_description()
|
||||
font_description.set_weight(Pango.Weight.NORMAL)
|
||||
self.override_font(font_description)
|
||||
|
||||
def get_background(self):
|
||||
return self._icon.get_background()
|
||||
|
||||
def get_icon_window(self):
|
||||
return self._icon.get_icon_window()
|
||||
backcol = self.get_style_context().get_background_color(Gtk.StateType.NORMAL)
|
||||
bcol= Gdk.Color.parse('#fff')[1]
|
||||
bcol.red = int(backcol.red * 65535)
|
||||
bcol.green = int(backcol.green * 65535)
|
||||
bcol.blue = int(backcol.blue * 65535)
|
||||
return bcol
|
||||
|
||||
# Gtk.EntryCompletion convenience function
|
||||
|
||||
@ -1674,7 +1280,6 @@ class ValidatableMaskedEntry(MaskedEntry):
|
||||
"""Change the validation state to valid, which will remove icons and
|
||||
reset the background color
|
||||
"""
|
||||
|
||||
##_LOG.debug('Setting state for %s to VALID' % self.model_attribute)
|
||||
self._set_valid_state(True)
|
||||
|
||||
|
@ -255,10 +255,9 @@ class Calendar(Report):
|
||||
last_edge = 0
|
||||
font_height = pt2cm(1.5 * ptext1style.get_font().get_size())
|
||||
x = last_edge + (width - last_edge)/2
|
||||
y = height - font_height
|
||||
self.doc.center_text("CAL-Text1style", self.text1, x, y * 3)
|
||||
self.doc.center_text("CAL-Text2style", self.text2, x, y * 2)
|
||||
self.doc.center_text("CAL-Text3style", self.text3, x, y * 1)
|
||||
self.doc.center_text("CAL-Text1style", self.text1, x, height - font_height * 3)
|
||||
self.doc.center_text("CAL-Text2style", self.text2, x, height - font_height * 2)
|
||||
self.doc.center_text("CAL-Text3style", self.text3, x, height - font_height * 1)
|
||||
self.doc.end_page()
|
||||
|
||||
def collect_data(self):
|
||||
|
@ -39,10 +39,12 @@ class CalendarGramplet(Gramplet):
|
||||
self.set_tooltip(_("Double-click a day for details"))
|
||||
self.gui.calendar = Gtk.Calendar()
|
||||
self.gui.calendar.connect('day-selected-double-click', self.double_click)
|
||||
if self.uistate.screen_width() <= 1024:
|
||||
self.gui.calendar.set_display_options(Gtk.CALENDAR_SHOW_HEADING)
|
||||
self.gui.calendar.set_display_options(
|
||||
Gtk.CalendarDisplayOptions.SHOW_HEADING)
|
||||
self.gui.get_container_widget().remove(self.gui.textview)
|
||||
self.gui.get_container_widget().add_with_viewport(self.gui.calendar)
|
||||
vbox = Gtk.VBox(False, 0)
|
||||
vbox.pack_start(self.gui.calendar, False, False, 0)
|
||||
self.gui.get_container_widget().add_with_viewport(vbox)
|
||||
self.gui.calendar.show()
|
||||
|
||||
def post_init(self):
|
||||
|
@ -400,8 +400,15 @@ class RelGraphReport(Report):
|
||||
label += " (%s)" % p_id
|
||||
if self.includedates:
|
||||
birth, death = self.get_date_strings(person)
|
||||
label = label + '%s(%s - %s)' % (lineDelimiter, birth, death)
|
||||
|
||||
if birth or death:
|
||||
label += ' %s(' % lineDelimiter
|
||||
if birth:
|
||||
label += '%s' % birth
|
||||
label += ' - '
|
||||
if death:
|
||||
label += '%s' % death
|
||||
label += ')'
|
||||
|
||||
# see if we have a table that needs to be terminated
|
||||
if self.bUseHtmlOutput:
|
||||
label += '</TD></TR></TABLE>'
|
||||
|
@ -69,7 +69,7 @@ log = logging.getLogger(".libcairodoc")
|
||||
# GTK modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gi.repository import Pango, PangoCairo
|
||||
from gi.repository import Pango, PangoCairo, Gdk
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -629,18 +629,50 @@ class GtkDocParagraph(GtkDocBaseElement):
|
||||
#now recalculate the attrilist:
|
||||
newattrlist = layout.get_attributes().copy()
|
||||
newattrlist.filter(self.filterattr, index)
|
||||
oldattrlist = newattrlist.get_iterator()
|
||||
while next(oldattrlist) :
|
||||
vals = oldattrlist.get_attrs()
|
||||
#print vals
|
||||
for attr in vals:
|
||||
newattr = attr.copy()
|
||||
newattr.start_index -= index if newattr.start_index > index \
|
||||
else 0
|
||||
newattr.end_index -= index
|
||||
newattrlist.insert(newattr)
|
||||
new_paragraph.__set_attrlist(newattrlist)
|
||||
|
||||
## GTK3 PROBLEM: get_iterator no longer available!!
|
||||
## REFERENCES:
|
||||
## http://www.gramps-project.org/bugs/view.php?id=6208
|
||||
## https://bugzilla.gnome.org/show_bug.cgi?id=646788
|
||||
## workaround: https://github.com/matasbbb/pitivit/commit/da815339e5ce3631b122a72158ba9ffcc9ee4372
|
||||
## OLD EASY CODE:
|
||||
## oldattrlist = newattrlist.get_iterator()
|
||||
## while oldattrlist.next() :
|
||||
## vals = oldattrlist.get_attrs()
|
||||
## #print (vals)
|
||||
## for attr in vals:
|
||||
## newattr = attr.copy()
|
||||
## newattr.start_index -= index if newattr.start_index > index \
|
||||
## else 0
|
||||
## newattr.end_index -= index
|
||||
## newattrlist.insert(newattr)
|
||||
## ## START OF WORKAROUND
|
||||
oldtext = self._text
|
||||
pos = 0
|
||||
realpos = 0
|
||||
markstarts = []
|
||||
while pos < index:
|
||||
char = oldtext[realpos]
|
||||
if char == '<' and oldtext[realpos+1] != '/':
|
||||
# a markup starts
|
||||
end = realpos + oldtext[realpos:].find('>') + 1
|
||||
markstarts += [oldtext[realpos:end]]
|
||||
realpos = end
|
||||
elif char == '<':
|
||||
#this is the closing tag, we did not stop yet, so remove tag!
|
||||
realpos = realpos + oldtext[realpos:].find('>') + 1
|
||||
markstarts.pop()
|
||||
else:
|
||||
pos +=1
|
||||
realpos += 1
|
||||
#now construct the marked up text to use
|
||||
newtext = ''.join(markstarts)
|
||||
newtext += oldtext[realpos:]
|
||||
#have it parsed
|
||||
parse_ok, newattrlist, _plaintext, accel_char= \
|
||||
Pango.parse_markup(newtext, -1, '\000')
|
||||
## ##END OF WORKAROUND
|
||||
new_paragraph.__set_attrlist(newattrlist)
|
||||
# then update the first one
|
||||
self.__set_plaintext(self._plaintext.encode('utf-8')[:index])
|
||||
self._style.set_bottom_margin(0)
|
||||
@ -1031,8 +1063,7 @@ class GtkDocPicture(GtkDocBaseElement):
|
||||
cr.save()
|
||||
cr.translate(l_margin, 0)
|
||||
cr.scale(scale, scale)
|
||||
gcr = Gdk.CairoContext(cr)
|
||||
gcr.set_source_pixbuf(pixbuf,
|
||||
Gdk.cairo_set_source_pixbuf(cr, pixbuf,
|
||||
(img_width / scale - pixbuf_width) / 2,
|
||||
(img_height / scale - pixbuf_height) / 2)
|
||||
cr.rectangle(0 , 0, img_width / scale, img_height / scale)
|
||||
|
@ -79,7 +79,7 @@ class Rebuild(tool.Tool, UpdateCallback):
|
||||
uistate.push_message(dbstate, _("Rebuilding secondary indexes..."))
|
||||
|
||||
UpdateCallback.__init__(self, self.callback)
|
||||
self.set_total(11)
|
||||
self.set_total(12)
|
||||
self.db.rebuild_secondary(self.update)
|
||||
self.reset()
|
||||
|
||||
|
@ -302,7 +302,7 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
|
||||
def selection_toggled(self, cell, path_string):
|
||||
sort_path = tuple(map(int, path_string.split(':')))
|
||||
real_path = self.sort_model.convert_path_to_child_path(sort_path)
|
||||
real_path = self.sort_model.convert_path_to_child_path(Gtk.TreePath(sort_path))
|
||||
row = self.real_model[real_path]
|
||||
row[RemoveUnused.MARK_COL] = not row[RemoveUnused.MARK_COL]
|
||||
self.real_model.row_changed(real_path, row.iter)
|
||||
|
@ -28,13 +28,12 @@ A plugin to verify the data against user-adjusted tests.
|
||||
This is the research tool, not the low-level data ingerity check.
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, print_function
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# standard python modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
@ -127,7 +126,7 @@ def clear_cache():
|
||||
# helper functions
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_date_from_event_handle(db,event_handle,estimate=False):
|
||||
def get_date_from_event_handle(db, event_handle, estimate=False):
|
||||
if not event_handle:
|
||||
return 0
|
||||
event = find_event(db,event_handle)
|
||||
@ -140,7 +139,7 @@ def get_date_from_event_handle(db,event_handle,estimate=False):
|
||||
else:
|
||||
return 0
|
||||
|
||||
def get_date_from_event_type(db,person,event_type,estimate=False):
|
||||
def get_date_from_event_type(db, person, event_type, estimate=False):
|
||||
if not person:
|
||||
return 0
|
||||
for event_ref in person.get_event_ref_list():
|
||||
@ -157,11 +156,11 @@ def get_date_from_event_type(db,person,event_type,estimate=False):
|
||||
return date_obj.get_sort_value()
|
||||
return 0
|
||||
|
||||
def get_bapt_date(db,person,estimate=False):
|
||||
def get_bapt_date(db, person, estimate=False):
|
||||
return get_date_from_event_type(db, person,
|
||||
EventType.BAPTISM, estimate)
|
||||
|
||||
def get_bury_date(db,person,estimate=False):
|
||||
def get_bury_date(db, person, estimate=False):
|
||||
# check role on burial event
|
||||
for event_ref in person.get_event_ref_list():
|
||||
event = find_event(db, event_ref.ref)
|
||||
@ -170,7 +169,7 @@ def get_bury_date(db,person,estimate=False):
|
||||
return get_date_from_event_type(db, person,
|
||||
EventType.BURIAL, estimate)
|
||||
|
||||
def get_birth_date(db,person,estimate=False):
|
||||
def get_birth_date(db, person, estimate=False):
|
||||
if not person:
|
||||
return 0
|
||||
birth_ref = person.get_birth_ref()
|
||||
@ -182,7 +181,7 @@ def get_birth_date(db,person,estimate=False):
|
||||
ret = get_bapt_date(db,person,estimate)
|
||||
return ret
|
||||
|
||||
def get_death_date(db,person,estimate=False):
|
||||
def get_death_date(db, person, estimate=False):
|
||||
if not person:
|
||||
return 0
|
||||
death_ref = person.get_death_ref()
|
||||
@ -194,14 +193,14 @@ def get_death_date(db,person,estimate=False):
|
||||
ret = get_bury_date(db,person,estimate)
|
||||
return ret
|
||||
|
||||
def get_age_at_death(db,person,estimate):
|
||||
def get_age_at_death(db, person, estimate):
|
||||
birth_date = get_birth_date(db,person,estimate)
|
||||
death_date = get_death_date(db,person,estimate)
|
||||
if (birth_date > 0) and (death_date > 0):
|
||||
return death_date - birth_date
|
||||
return 0
|
||||
|
||||
def get_father(db,family):
|
||||
def get_father(db, family):
|
||||
if not family:
|
||||
return None
|
||||
father_handle = family.get_father_handle()
|
||||
@ -209,24 +208,24 @@ def get_father(db,family):
|
||||
return find_person(db,father_handle)
|
||||
return None
|
||||
|
||||
def get_mother(db,family):
|
||||
def get_mother(db, family):
|
||||
if not family:
|
||||
return None
|
||||
mother_handle = family.get_mother_handle()
|
||||
if mother_handle:
|
||||
return find_person(db,mother_handle)
|
||||
return find_person(db, mother_handle)
|
||||
return None
|
||||
|
||||
def get_child_birth_dates(db,family,estimate):
|
||||
def get_child_birth_dates(db, family, estimate):
|
||||
dates = []
|
||||
for child_ref in family.get_child_ref_list():
|
||||
child = find_person(db,child_ref.ref)
|
||||
child_birth_date = get_birth_date(db,child,estimate)
|
||||
child_birth_date = get_birth_date(db, child, estimate)
|
||||
if child_birth_date > 0:
|
||||
dates.append(child_birth_date)
|
||||
return dates
|
||||
|
||||
def get_n_children(db,person):
|
||||
def get_n_children(db, person):
|
||||
n = 0
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = find_family(db,family_handle)
|
||||
@ -234,7 +233,7 @@ def get_n_children(db,person):
|
||||
n += len(family.get_child_ref_list())
|
||||
return n
|
||||
|
||||
def get_marriage_date(db,family):
|
||||
def get_marriage_date(db, family):
|
||||
if not family:
|
||||
return 0
|
||||
for event_ref in family.get_event_ref_list():
|
||||
@ -496,10 +495,10 @@ class VerifyResults(ManagedWindow):
|
||||
self.renderer = Gtk.CellRendererText()
|
||||
self.img_renderer = Gtk.CellRendererPixbuf()
|
||||
self.bool_renderer = Gtk.CellRendererToggle()
|
||||
self.bool_renderer.connect('toggled',self.selection_toggled)
|
||||
self.bool_renderer.connect('toggled', self.selection_toggled)
|
||||
|
||||
# Add ignore column
|
||||
ignore_column = Gtk.TreeViewColumn(_('Mark'),self.bool_renderer,
|
||||
ignore_column = Gtk.TreeViewColumn(_('Mark'), self.bool_renderer,
|
||||
active=VerifyResults.IGNORE_COL)
|
||||
ignore_column.set_sort_column_id(VerifyResults.IGNORE_COL)
|
||||
self.warn_tree.append_column(ignore_column)
|
||||
@ -588,13 +587,13 @@ class VerifyResults(ManagedWindow):
|
||||
new_ignores[handle].add(rule_id)
|
||||
return new_ignores
|
||||
|
||||
def close(self,*obj):
|
||||
def close(self, *obj):
|
||||
new_ignores = self.get_new_marking()
|
||||
self.save_ignored(new_ignores)
|
||||
|
||||
ManagedWindow.close(self,*obj)
|
||||
|
||||
def hide_toggled(self,button):
|
||||
def hide_toggled(self, button):
|
||||
if button.get_active():
|
||||
button.set_label(_("_Show all"))
|
||||
self.filt_model = self.real_model.filter_new()
|
||||
@ -608,16 +607,16 @@ class VerifyResults(ManagedWindow):
|
||||
self.warn_tree.set_model(self.sort_model)
|
||||
button.set_label(_("_Hide marked"))
|
||||
|
||||
def selection_toggled(self,cell,path_string):
|
||||
def selection_toggled(self, cell, path_string):
|
||||
sort_path = tuple(map(int, path_string.split(':')))
|
||||
filt_path = self.sort_model.convert_path_to_child_path(sort_path)
|
||||
filt_path = self.sort_model.convert_path_to_child_path(Gtk.TreePath(sort_path))
|
||||
real_path = self.filt_model.convert_path_to_child_path(filt_path)
|
||||
row = self.real_model[real_path]
|
||||
row[VerifyResults.IGNORE_COL] = not row[VerifyResults.IGNORE_COL]
|
||||
row[VerifyResults.SHOW_COL] = not row[VerifyResults.IGNORE_COL]
|
||||
self.real_model.row_changed(real_path,row.iter)
|
||||
|
||||
def mark_clicked(self,mark_button):
|
||||
def mark_clicked(self, mark_button):
|
||||
for row_num in range(len(self.real_model)):
|
||||
path = (row_num,)
|
||||
row = self.real_model[path]
|
||||
@ -625,7 +624,7 @@ class VerifyResults(ManagedWindow):
|
||||
row[VerifyResults.SHOW_COL] = False
|
||||
self.filt_model.refilter()
|
||||
|
||||
def unmark_clicked(self,unmark_button):
|
||||
def unmark_clicked(self, unmark_button):
|
||||
for row_num in range(len(self.real_model)):
|
||||
path = (row_num,)
|
||||
row = self.real_model[path]
|
||||
@ -633,7 +632,7 @@ class VerifyResults(ManagedWindow):
|
||||
row[VerifyResults.SHOW_COL] = True
|
||||
self.filt_model.refilter()
|
||||
|
||||
def invert_clicked(self,invert_button):
|
||||
def invert_clicked(self, invert_button):
|
||||
for row_num in range(len(self.real_model)):
|
||||
path = (row_num,)
|
||||
row = self.real_model[path]
|
||||
@ -641,7 +640,7 @@ class VerifyResults(ManagedWindow):
|
||||
row[VerifyResults.SHOW_COL] = not row[VerifyResults.SHOW_COL]
|
||||
self.filt_model.refilter()
|
||||
|
||||
def double_click(self, obj,event):
|
||||
def double_click(self, obj, event):
|
||||
if event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1:
|
||||
(model, node) = self.selection.get_selected()
|
||||
if not node:
|
||||
|
@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Gramps</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Trunk, (C) 1997-2012 The Gramps Team http://www.gramps-project.org</string>
|
||||
<string>4.0.0-alpha1, (C) 1997-2012 The Gramps Team http://www.gramps-project.org</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>gramps.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@ -15,13 +15,13 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<string>4.0.0-alpha1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>Trunk</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>Trunk</string>
|
||||
<string>4.0.0-alpha1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 1997 - 2012 The Gramps Team, GNU General Public License.</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
@ -6,6 +6,9 @@
|
||||
<destination overwrite="yes">${env:HOME}/Desktop</destination>
|
||||
<run-install-name-tool/>
|
||||
<launcher-script>${project}/gramps.launcher</launcher-script >
|
||||
<!-- Indicate the active gtk version to use. This is needed only
|
||||
for gtk+-3.0 projects. -->
|
||||
<gtk>gtk+-3.0</gtk>
|
||||
</meta>
|
||||
|
||||
<plist>${project}/Info.plist</plist>
|
||||
@ -27,23 +30,18 @@
|
||||
<binary>
|
||||
${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/
|
||||
</binary>
|
||||
<!-- Copy in the theme engines. -->
|
||||
<!-- Copy in the input methods. Dunno if they actually work with OSX. -->
|
||||
<binary>
|
||||
${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/engines/*.so
|
||||
${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so
|
||||
</binary>
|
||||
|
||||
<!-- And the print backends -->
|
||||
<binary>
|
||||
${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/printbackends/*.so
|
||||
${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
|
||||
</binary>
|
||||
|
||||
<binary>
|
||||
${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/pango-basic-fc.so
|
||||
</binary>
|
||||
|
||||
<!-- Copy in libpyglib, which will pull in other dependencies we need -->
|
||||
<binary>
|
||||
${prefix}/lib/libpyglib-2.0-python.0.dylib
|
||||
${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
|
||||
</binary>
|
||||
|
||||
<binary recurse="True">
|
||||
@ -59,15 +57,7 @@
|
||||
</binary-->
|
||||
|
||||
<binary>
|
||||
${prefix}/lib/libgoocanvas.3.dylib
|
||||
</binary>
|
||||
|
||||
<binary>
|
||||
${prefix}/lib/libgtkmacintegration.0.dylib
|
||||
</binary>
|
||||
|
||||
<binary>
|
||||
${prefix}/lib/libart_lgpl_2.2.dylib
|
||||
${prefix}/lib/libgtkmacintegration.2.dylib
|
||||
</binary>
|
||||
|
||||
<binary>
|
||||
@ -87,7 +77,7 @@
|
||||
</binary>
|
||||
|
||||
<binary>
|
||||
${prefix}/lib/libosmgpsmap.2.dylib
|
||||
${prefix}/lib/libosmgpsmap.3.dylib
|
||||
</binary>
|
||||
|
||||
<binary>
|
||||
@ -110,7 +100,27 @@
|
||||
want to copy in to the bundle. The "dest" attribute is
|
||||
optional, as usual. Bundler will find all translations of that
|
||||
library/program under the indicated directory and copy them.-->
|
||||
<translations name="gtk20">
|
||||
<translations name="gtk30">
|
||||
${prefix}/share/locale
|
||||
</translations>
|
||||
|
||||
<translations name="gtk30-properties">
|
||||
${prefix}/share/locale
|
||||
</translations>
|
||||
|
||||
<translations name="glib20">
|
||||
${prefix}/share/locale
|
||||
</translations>
|
||||
|
||||
<translations name="gdk-pixbuf">
|
||||
${prefix}/share/locale
|
||||
</translations>
|
||||
|
||||
<translations name="atk10">
|
||||
${prefix}/share/locale
|
||||
</translations>
|
||||
|
||||
<translations name="gtkspell3">
|
||||
${prefix}/share/locale
|
||||
</translations>
|
||||
|
||||
@ -121,6 +131,10 @@
|
||||
|
||||
<!-- We have to pull in the python modules, which are mixed python
|
||||
and loadable modules. -->
|
||||
<data>
|
||||
${prefix}/share/glib-2.0/schemas
|
||||
</data>
|
||||
|
||||
<data recurse="True">
|
||||
${prefix}/lib/python2.7/*.py
|
||||
</data>
|
||||
@ -133,10 +147,6 @@
|
||||
${prefix}/include/python2.7/pyconfig.h
|
||||
</data>
|
||||
|
||||
<data>
|
||||
${prefix}/share/gramps/
|
||||
</data>
|
||||
|
||||
<!--data>
|
||||
${prefix}/share/webkit-1.0/
|
||||
</data-->
|
||||
@ -149,6 +159,18 @@
|
||||
${prefix}/share/mime/
|
||||
</data>
|
||||
|
||||
<data recurse="True">
|
||||
${prefix}/lib/python2.7/site-packages/gramps/*.glade
|
||||
</data>
|
||||
|
||||
<data>
|
||||
${prefix}/lib/python2.7/site-packages/gramps/data/
|
||||
</data>
|
||||
|
||||
<data recurse="True">
|
||||
${prefix}/lib/python2.7/site-packages/gramps/images/*.png
|
||||
</data>
|
||||
|
||||
<data>
|
||||
${prefix}/share/mime-info/
|
||||
</data>
|
||||
@ -171,15 +193,7 @@
|
||||
${project}/gramps.icns
|
||||
</data>
|
||||
|
||||
<!-- This is where theme commands go. You can copy them in from your
|
||||
theme of choice if they provide and example, or you can just
|
||||
change the source path. -->
|
||||
|
||||
<data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc">
|
||||
${project}/gtkrc
|
||||
</data>
|
||||
|
||||
<data dest="${bundle}/Contents/Resources/share/gramps/data/gramps.accel">
|
||||
<data dest="${bundle}/Contents/Resources/lib/python2.7/site-packages/gramps/data/gramps.accel">
|
||||
${project}/gramps.accel
|
||||
</data>
|
||||
|
||||
|
@ -21,9 +21,8 @@ export GTK_EXE_PREFIX="$bundle_res"
|
||||
export GTK_PATH="$bundle_res"
|
||||
|
||||
export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
|
||||
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
|
||||
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
|
||||
export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
|
||||
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders"
|
||||
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
|
||||
export GVBINDIR="$bundle_lib/graphviz"
|
||||
|
||||
|
||||
@ -31,10 +30,8 @@ export GVBINDIR="$bundle_lib/graphviz"
|
||||
PYVER=2.7
|
||||
export PYTHON="$bundle_contents/MacOS/python"
|
||||
export PYTHONHOME="$bundle_res"
|
||||
PYTHONPATH="$bundle_lib/python$PYVER/site-packages/pyenchant-1.6.1-py$PYVER.egg:$PYTHONPATH"
|
||||
export PYTHONPATH="$bundle_lib/python$PYVER/site-packages/gtk-2.0:$PYTHONPATH"
|
||||
|
||||
export GRAMPSDIR="$bundle_data"/gramps
|
||||
export GRAMPSDIR="$bundle_lib/python$PYVER/site-packages/gramps"
|
||||
export GRAMPSI18N="$bundle_data"/locale
|
||||
export GRAMPSHOME="$HOME/Library/Application Support"
|
||||
|
||||
@ -42,5 +39,5 @@ export GRAMPSHOME="$HOME/Library/Application Support"
|
||||
if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
|
||||
shift 1
|
||||
fi
|
||||
exec "$PYTHON" -O "$GRAMPSDIR/gramps.py" "$@"
|
||||
exec "$PYTHON" -O "$bundle_contents/MacOS/Gramps-bin" "$@"
|
||||
|
||||
|
@ -60,7 +60,7 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle
|
||||
|
||||
|
||||
<include href="http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"/>
|
||||
<!--include href="/Users/john/Development/GTK-OSX/gtk-osx-build/modulesets-stable/gtk-osx.modules"/-->
|
||||
<!--include href="/Users/john/GTK-OSX/gtk-osx-build/modulesets-stable/gtk-osx.modules"/-->
|
||||
|
||||
|
||||
|
||||
@ -81,6 +81,24 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle
|
||||
</after>
|
||||
</distutils>
|
||||
|
||||
<distutils id="gramps-40">
|
||||
<branch module="gramps/gramps-4.0.0-alpha1.tar.gz" version="4.0.0-alpha1"
|
||||
repo="sourceforge"/>
|
||||
<dependencies>
|
||||
<dep package="meta-gtk-osx-python-gtk3"/>
|
||||
<dep package="librsvg"/>
|
||||
<dep package="shared-mime-info"/>
|
||||
<dep package="hunspell"/>
|
||||
<dep package="gtkspell3"/>
|
||||
<dep package="osmgpsmap"/>
|
||||
<dep package="graphviz"/>
|
||||
<dep package="pil"/>
|
||||
</dependencies>
|
||||
<after>
|
||||
<dep package="pyexiv2"/>
|
||||
</after>
|
||||
</distutils>
|
||||
|
||||
<distutils id="gramps-addons-svn">
|
||||
<branch module="gramps-addons/trunk/contrib"
|
||||
repo="gramps-addons"/>
|
||||
@ -127,17 +145,19 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle
|
||||
version="0.7.3"/>
|
||||
<dependencies>
|
||||
<dep package="osmgpsmap"/>
|
||||
<dep package="pygtk"/>
|
||||
<dep package="pycairo-python2.6"/>
|
||||
<dep package="pygobject"/>
|
||||
</dependencies>
|
||||
<after>
|
||||
<dep package="pygtk"/>
|
||||
<dep package="pygobject"/>
|
||||
<dep package="pygobject3"/>
|
||||
<dep package="pycairo-python2.6"/>
|
||||
<dep package="pycairo-python3"/>
|
||||
</after>
|
||||
</distutils>
|
||||
|
||||
<autotools id="graphviz" autogenargs="--disable-sharp --disable-guile --disable-java --disable-lua --disable-ocaml --disable-perl --disable-php --disable-r --disable-ruby --disable-tcl --with-pangocairo=yes --with-freetype2=no --with-fontconfig=no --with-included-ltdl=yes">
|
||||
<autotools id="graphviz" autogenargs="--disable-sharp --disable-guile --disable-java --disable-lua --disable-ocaml --disable-perl --disable-php --disable-r --disable-ruby --disable-tcl --with-pangocairo=no --with-freetype2=no --with-fontconfig=no --with-included-ltdl=yes">
|
||||
<branch module="graphviz-2.28.0.tar.gz" version="2.28.0" repo="graphviz"/>
|
||||
<dependencies>
|
||||
<dep package="meta-gtk-osx-freetype"/>
|
||||
<dep package="pango"/>
|
||||
<dep package="zlib"/>
|
||||
</dependencies>
|
||||
</autotools>
|
||||
|
@ -532,6 +532,7 @@ def analyze_msgs( args, fname, msgs, nr_templates = None, nth = 0 ):
|
||||
|
||||
if msg.is_fuzzy:
|
||||
nr_fuzzy += 1
|
||||
continue
|
||||
|
||||
for c in checks:
|
||||
c.process( msg )
|
||||
@ -548,7 +549,6 @@ def analyze_msgs( args, fname, msgs, nr_templates = None, nth = 0 ):
|
||||
|
||||
for c in checks:
|
||||
c.summary()
|
||||
c.diag()
|
||||
|
||||
po_coverage = (1.0 - (float(nr_untranslated) / float(nr_msgs))) * 100
|
||||
print "%-20s%5.2f%%" % ( "PO Coverage:", po_coverage )
|
||||
@ -560,11 +560,14 @@ def analyze_msgs( args, fname, msgs, nr_templates = None, nth = 0 ):
|
||||
translation = (1.0 - (float(not_displayed) / float(nr_templates))) * 100
|
||||
text = "%-20s%5.2f%%" % ( "Localized at:", translation)
|
||||
|
||||
if template_coverage == po_coverage:
|
||||
if int(template_coverage*1000) == int(po_coverage*1000):
|
||||
print text
|
||||
else:
|
||||
print text + ' (previous gramps.pot)'
|
||||
|
||||
for c in checks:
|
||||
c.diag()
|
||||
|
||||
def main():
|
||||
|
||||
parser = ArgumentParser( description='This program validates a PO file for GRAMPS.')
|
||||
|
5191
po/gramps.pot
5191
po/gramps.pot
File diff suppressed because it is too large
Load Diff
2
po/nb.po
2
po/nb.po
@ -396,7 +396,7 @@ msgid "Could not rename family tree"
|
||||
msgstr "Kunne ikke omdøpe fila"
|
||||
|
||||
#: ../gramps/cli/clidbman.py:406
|
||||
#, python-format
|
||||
#, fuzzy, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"ERROR: Wrong database path in Edit Menu->Preferences.\n"
|
||||
|
7
po/sv.po
7
po/sv.po
@ -12493,7 +12493,7 @@ msgid "Color"
|
||||
msgstr "Färg"
|
||||
|
||||
#: ../gramps/gui/plug/_guioptions.py:1513
|
||||
#, python-format
|
||||
#, fuzzy, python-format
|
||||
msgid "Select color for %s"
|
||||
msgstr "Välj färg på teckensnitt"
|
||||
|
||||
@ -12703,7 +12703,7 @@ msgstr ""
|
||||
"att återse alternativ."
|
||||
|
||||
#: ../gramps/gui/plug/export/_exportassistant.py:452
|
||||
#, python-format
|
||||
#, fuzzy, python-format
|
||||
msgid ""
|
||||
"The data will be saved as follows:\n"
|
||||
"\n"
|
||||
@ -19567,6 +19567,7 @@ msgstr "GEDCOM importrappport: %s fel hittades"
|
||||
msgid "Tag recognized but not supported"
|
||||
msgstr "Flagga upptäck, men stöds ej"
|
||||
|
||||
#, fuzzy
|
||||
#: ../gramps/plugins/lib/libgedcom.py:2840
|
||||
msgid "Line ignored as not understood"
|
||||
msgstr "Rad %d gick inte att förstå, så den ignorerades."
|
||||
@ -27089,7 +27090,7 @@ msgid "Number of merges done"
|
||||
msgstr "Antal utförda sammanslagningar"
|
||||
|
||||
#: ../gramps/plugins/tool/mergecitations.py:226
|
||||
#, python-format
|
||||
#, fuzzy, python-format
|
||||
msgid "%(num)d citation merged"
|
||||
msgid_plural "%(num)d citations merged"
|
||||
msgstr[0] "%d citering sammanslagen"
|
||||
|
33
setup.py
33
setup.py
@ -47,7 +47,7 @@ if sys.version_info[0] < 3:
|
||||
import commands
|
||||
from stat import ST_MODE
|
||||
|
||||
VERSION = '4.0.0'
|
||||
VERSION = '4.0.0-alpha2'
|
||||
ALL_LINGUAS = ('bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es', 'fi', 'fr', 'he',
|
||||
'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR',
|
||||
'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sv', 'uk', 'vi', 'zh_CN')
|
||||
@ -87,8 +87,10 @@ def build_trans(build_cmd):
|
||||
data_files = build_cmd.distribution.data_files
|
||||
for lang in ALL_LINGUAS:
|
||||
po_file = os.path.join('po', lang + '.po')
|
||||
mo_file = os.path.join(build_cmd.build_base, 'mo', lang, 'gramps.mo')
|
||||
mo_file_unix = build_cmd.build_base + '/mo/' + lang + '/gramps.mo'
|
||||
mo_file = os.path.join(build_cmd.build_base, 'mo', lang, 'LC_MESSAGES',
|
||||
'gramps.mo')
|
||||
mo_file_unix = (build_cmd.build_base + '/mo/' + lang +
|
||||
'/LC_MESSAGES/gramps.mo')
|
||||
mo_dir = os.path.dirname(mo_file)
|
||||
if not(os.path.isdir(mo_dir) or os.path.islink(mo_dir)):
|
||||
os.makedirs(mo_dir)
|
||||
@ -96,8 +98,15 @@ def build_trans(build_cmd):
|
||||
if newer(po_file, mo_file):
|
||||
cmd = 'msgfmt %s -o %s' % (po_file, mo_file)
|
||||
if os.system(cmd) != 0:
|
||||
os.remove(mo_file)
|
||||
msg = 'ERROR: Building language translation files failed.'
|
||||
raise SystemExit(msg)
|
||||
ask = msg + '\n Continue building y/n [n] '
|
||||
if sys.version_info[0] < 3:
|
||||
reply = raw_input(ask)
|
||||
else:
|
||||
reply = input(ask)
|
||||
if reply in ['n', 'N']:
|
||||
raise SystemExit(msg)
|
||||
|
||||
#linux specific piece:
|
||||
target = 'share/locale/' + lang + '/LC_MESSAGES'
|
||||
@ -224,24 +233,24 @@ def write_gramps_script(install_cmd, build_scripts):
|
||||
log.info('changing mode of %s to %o', filename, mode)
|
||||
os.chmod(filename, mode)
|
||||
|
||||
def write_const_py(install_cmd):
|
||||
def write_const_py(command):
|
||||
'''
|
||||
Write the const.py file.
|
||||
'''
|
||||
const_py_in = os.path.join('gramps', 'gen', 'const.py.in')
|
||||
const_py = os.path.join('gramps', 'gen', 'const.py')
|
||||
if hasattr(install_cmd, 'install_data'):
|
||||
if hasattr(command, 'install_data'):
|
||||
#during install
|
||||
prefix = "'%s'" % install_cmd.install_data
|
||||
sysconfdir = "'%s'" % os.path.join(install_cmd.install_data, 'etc') # Is this correct?
|
||||
locale_dir = os.path.join(command.install_data, 'share', 'locale')
|
||||
else:
|
||||
#in build
|
||||
prefix = 'os.path.join(os.path.dirname(__file__), os.pardir)'
|
||||
sysconfdir = prefix + ' + "' + os.sep + 'etc"' # Is this correct?
|
||||
if os.access(const_py, os.F_OK):
|
||||
# Prevent overwriting version created during install
|
||||
return
|
||||
locale_dir = os.path.join(command.build_base, 'mo')
|
||||
|
||||
subst_vars = (('@VERSIONSTRING@', VERSION),
|
||||
('"@prefix@"', prefix),
|
||||
('"@sysconfdir@"', sysconfdir))
|
||||
('@LOCALE_DIR@', locale_dir))
|
||||
|
||||
substitute_variables(const_py_in, const_py, subst_vars)
|
||||
|
||||
|
Reference in New Issue
Block a user