[Xfce4-commits] xfburn:master l10n: Updated Portuguese (pt) translation to 100%

2010-02-08 Thread Transifex
Updating branch refs/heads/master
 to 343262d2d63fc273d8b2d14b830923be76ad53b4 (commit)
   from dd5c8a5bb547207f35985e883b721cc2dfb9d8f4 (commit)

commit 343262d2d63fc273d8b2d14b830923be76ad53b4
Author: Sergio Marques smarque...@gmail.com
Date:   Mon Feb 8 15:53:25 2010 +0100

l10n: Updated Portuguese (pt) translation to 100%

New status: 283 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pt.po |  398 +++---
 1 files changed, 199 insertions(+), 199 deletions(-)

diff --git a/po/pt.po b/po/pt.po
index c51f580..0e615d1 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -5,16 +5,18 @@
 #
 msgid 
 msgstr 
-Project-Id-Version: xfburn 0.4.0svn\n
+Project-Id-Version: xfburn 0.4.2\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2010-01-29 12:07+\n
-PO-Revision-Date: 2009-10-20 22:46+0100\n
-Last-Translator: \n
+POT-Creation-Date: 2010-02-05 12:02+0100\n
+PO-Revision-Date: 2010-02-08 14:15-\n
+Last-Translator: Sérgio Marques smarque...@gmail.com\n
 Language-Team: \n
 MIME-Version: 1.0\n
 Content-Type: text/plain; charset=UTF-8\n
 Content-Transfer-Encoding: 8bit\n
 Plural-Forms: nplurals=2; plural=(n  1);\n
+X-Poedit-Language: Portuguese\n
+X-Poedit-Country: PORTUGAL\n
 
 #: ../xfburn/xfburn-adding-progress.c:111
 msgid Adding files to the composition
@@ -50,7 +52,7 @@ msgstr Ejectar o disco
 
 #: ../xfburn/xfburn-blank-dialog.c:150
 msgid Default value for eject checkbox
-msgstr Valor por omissão para a caixa de verificação da ejecção
+msgstr Valor omisso para a caixa de ejecção
 
 #: ../xfburn/xfburn-blank-dialog.c:197
 msgid Blank Disc
@@ -65,7 +67,8 @@ msgstr Disco Vazio
 msgid Burning device
 msgstr Dispositivo de gravação
 
-#: ../xfburn/xfburn-blank-dialog.c:222 ../xfburn/xfburn-device-box.c:190
+#: ../xfburn/xfburn-blank-dialog.c:222
+#: ../xfburn/xfburn-device-box.c:190
 msgid Blank mode
 msgstr Modo de limpeza
 
@@ -89,7 +92,7 @@ msgstr E_jectar disco
 
 #: ../xfburn/xfburn-blank-dialog.c:244
 msgid _Blank
-msgstr _Limpar
+msgstr _Apagar
 
 #. blanking can only be performed on blank discs, format and deformat are 
allowed to be blank ones
 #: ../xfburn/xfburn-blank-dialog.c:355
@@ -111,7 +114,7 @@ msgstr Disco não pode ser apagado.
 
 #: ../xfburn/xfburn-blank-dialog.c:413
 msgid Blanking disc...
-msgstr A limpar disco...
+msgstr Apagando disco...
 
 #: ../xfburn/xfburn-blank-dialog.c:440
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:512
@@ -120,7 +123,8 @@ msgstr A limpar disco...
 msgid Done
 msgstr Pronto
 
-#: ../xfburn/xfburn-blank-dialog.c:443 ../xfburn/xfburn-perform-burn.c:372
+#: ../xfburn/xfburn-blank-dialog.c:443
+#: ../xfburn/xfburn-perform-burn.c:372
 #: ../xfburn/xfburn-progress-dialog.c:603
 msgid Failure
 msgstr Falha
@@ -148,7 +152,7 @@ msgstr Mostrar uma entrada de texto para o nome do volume
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:183
 #: ../xfburn/xfburn-burn-audio-cd-composition-dialog.c:148
 msgid Burn Composition
-msgstr Composição a Gravar
+msgstr Gravar Composição
 
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:206
 msgid Composition name
@@ -170,7 +174,7 @@ msgstr _Simular escrita
 #: ../xfburn/xfburn-burn-image-dialog.c:212
 #: ../xfburn/xfburn-burn-audio-cd-composition-dialog.c:206
 msgid Burn_Free
-msgstr Queima _Livre
+msgstr Gravação _Livre
 
 #. create ISO ?
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:246
@@ -182,12 +186,12 @@ msgstr Apenas criar _ISO
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:283
 #: ../xfburn/xfburn-burn-audio-cd-composition-dialog.c:221
 msgid _Burn Composition
-msgstr _Composição a Gravar
+msgstr _Gravar Composição
 
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:470
 #, c-format
 msgid Could not create destination ISO file: %s
-msgstr Incapaz de criar o ficheiro ISO de destino: %s
+msgstr Não foi possível criar o ficheiro ISO: %s
 
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:477
 msgid Writing ISO...
@@ -196,12 +200,12 @@ msgstr Escrevendo ISO...
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:494
 #, c-format
 msgid An error occured while writing ISO: %s
-msgstr Ocorreu um erro enquanto escrevia a ISO: %s
+msgstr Ocorreu um erro ao escrever a ISO: %s
 
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:548
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:554
 msgid An error occurred in the burn backend.
-msgstr Ocorreu um erro no suporte de gravação.
+msgstr Ocorreu um erro no na estrutura de gravação.
 
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:571
 #: ../xfburn/xfburn-burn-audio-cd-composition-dialog.c:327
@@ -211,17 +215,17 @@ msgstr O modo de escrita não é suportado actualmente.
 #. could not create source
 #: ../xfburn/xfburn-burn-data-composition-base-dialog.c:653
 msgid Could not create ISO source structure.
-msgstr Incapaz de criar estrutura ISO.
+msgstr Não foi possível 

[Xfce4-commits] xfce4-power-manager:master l10n: Updated French (fr) translation to 83%

2010-02-08 Thread Transifex
Updating branch refs/heads/master
 to b78dd7875a25bde070f4226d141e1510f4565c15 (commit)
   from a3f326538633d9399950bf027fcd08a93c2e2882 (commit)

commit b78dd7875a25bde070f4226d141e1510f4565c15
Author: douart patrick patric...@laposte.net
Date:   Mon Feb 8 18:25:14 2010 +0100

l10n: Updated French (fr) translation to 83%

New status: 168 messages complete with 30 fuzzies and 4 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/fr.po |  362 +++--
 1 files changed, 208 insertions(+), 154 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index ace75b9..7c446e1 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -10,11 +10,11 @@ msgstr 
 Project-Id-Version: xfce4-power-manager\n
 Report-Msgid-Bugs-To: \n
 POT-Creation-Date: 2010-02-08 12:01+0100\n
-PO-Revision-Date: 2009-10-10 11:20+0100\n
-Last-Translator: Steve Dodier sidnio...@gmail.com\n
+PO-Revision-Date: 2010-02-08 18:17+0100\n
+Last-Translator: Douart Patrick patric...@laposte.net\n
 Language-Team: French xfce-i...@xfce.org\n
 MIME-Version: 1.0\n
-Content-Type: text/plain; charset=UTF-8\n
+Content-Type: text/plain; charset=utf-8\n
 Content-Transfer-Encoding: 8bit\n
 Plural-Forms: nplurals=2; plural=(n != 1);\n
 X-Poedit-Language: French\n
@@ -49,10 +49,14 @@ msgid Consider the computer on low power at:
 msgstr Niveau du seuil critique de la puissance :
 
 #. Hibernate menu option
-#: ../data/interfaces/xfpm-settings.ui.h:8 ../settings/xfpm-settings.c:789
-#: ../settings/xfpm-settings.c:857 ../settings/xfpm-settings.c:995
-#: ../settings/xfpm-settings.c:1160 ../settings/xfpm-settings.c:1215
-#: ../settings/xfpm-settings.c:1265 ../src/xfpm-power.c:524
+#: ../data/interfaces/xfpm-settings.ui.h:8
+#: ../settings/xfpm-settings.c:789
+#: ../settings/xfpm-settings.c:857
+#: ../settings/xfpm-settings.c:995
+#: ../settings/xfpm-settings.c:1160
+#: ../settings/xfpm-settings.c:1215
+#: ../settings/xfpm-settings.c:1265
+#: ../src/xfpm-power.c:524
 #: ../src/xfpm-power.c:785
 msgid Hibernate
 msgstr Mettre en veille prolongée
@@ -61,7 +65,8 @@ msgstr Mettre en veille prolongée
 msgid Lock screen when going for suspend/hibernate
 msgstr Activer l'écran de veille lors de la mise en veille/veille prolongée
 
-#: ../data/interfaces/xfpm-settings.ui.h:10 ../src/xfpm-power-common.c:132
+#: ../data/interfaces/xfpm-settings.ui.h:10
+#: ../src/xfpm-power-common.c:132
 msgid Monitor
 msgstr Écran
 
@@ -69,9 +74,12 @@ msgstr Écran
 msgid Monitor power management control
 msgstr Contrôler l'alimentation de l'écran
 
-#: ../data/interfaces/xfpm-settings.ui.h:12 ../settings/xfpm-settings.c:778
-#: ../settings/xfpm-settings.c:846 ../settings/xfpm-settings.c:984
-#: ../settings/xfpm-settings.c:1149 ../settings/xfpm-settings.c:1204
+#: ../data/interfaces/xfpm-settings.ui.h:12
+#: ../settings/xfpm-settings.c:778
+#: ../settings/xfpm-settings.c:846
+#: ../settings/xfpm-settings.c:984
+#: ../settings/xfpm-settings.c:1149
+#: ../settings/xfpm-settings.c:1204
 #: ../settings/xfpm-settings.c:1254
 msgid Nothing
 msgstr Rien
@@ -110,17 +118,21 @@ msgstr Afficher des notifications pour vous informer de 
l'état de la batterie
 
 #: ../data/interfaces/xfpm-settings.ui.h:21
 msgid Spin down hard disks
-msgstr 
+msgstr Test des disques durs
 
 #: ../data/interfaces/xfpm-settings.ui.h:22
 msgid Standby
 msgstr Arrêt
 
 #. Suspend menu option
-#: ../data/interfaces/xfpm-settings.ui.h:23 ../settings/xfpm-settings.c:783
-#: ../settings/xfpm-settings.c:851 ../settings/xfpm-settings.c:989
-#: ../settings/xfpm-settings.c:1154 ../settings/xfpm-settings.c:1209
-#: ../settings/xfpm-settings.c:1259 ../src/xfpm-power.c:539
+#: ../data/interfaces/xfpm-settings.ui.h:23
+#: ../settings/xfpm-settings.c:783
+#: ../settings/xfpm-settings.c:851
+#: ../settings/xfpm-settings.c:989
+#: ../settings/xfpm-settings.c:1154
+#: ../settings/xfpm-settings.c:1209
+#: ../settings/xfpm-settings.c:1259
+#: ../src/xfpm-power.c:539
 #: ../src/xfpm-power.c:798
 msgid Suspend
 msgstr Mettre en veille
@@ -154,13 +166,16 @@ msgid When sleep button is pressed:
 msgstr Appui sur le bouton de mise en veille :
 
 #: ../data/interfaces/xfpm-settings.ui.h:31
-#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-power.c:601
-#: ../src/xfpm-power.c:772 ../src/xfpm-main.c:415
+#: ../settings/xfpm-settings-main.c:121
+#: ../src/xfpm-power.c:601
+#: ../src/xfpm-power.c:772
+#: ../src/xfpm-main.c:415
 #: ../src/xfce4-power-manager.desktop.in.h:2
 msgid Xfce Power Manager
 msgstr Gestionnaire d'alimentation
 
-#: ../settings/xfpm-settings.c:539 ../settings/xfpm-settings.c:554
+#: ../settings/xfpm-settings.c:539
+#: ../settings/xfpm-settings.c:554
 #: ../settings/xfpm-settings.c:581
 msgid Never
 msgstr Jamais
@@ -169,24 +184,30 @@ msgstr Jamais
 msgid One minute
 msgstr Une minute
 
-#: ../settings/xfpm-settings.c:544 ../settings/xfpm-settings.c:556
+#: ../settings/xfpm-settings.c:544
+#: ../settings/xfpm-settings.c:556
 msgid Minutes
 msgstr Minutes
 

[Xfce4-commits] xfce4-screenshooter:master l10n: Updated French (fr) translation to 63%

2010-02-08 Thread Transifex
Updating branch refs/heads/master
 to 116b83f663a9428b95e02c5858abd00b572ba9d3 (commit)
   from c163949f5b89003e421aa9e97f0236f1b789647d (commit)

commit 116b83f663a9428b95e02c5858abd00b572ba9d3
Author: douart patrick patric...@laposte.net
Date:   Mon Feb 8 18:35:16 2010 +0100

l10n: Updated French (fr) translation to 63%

New status: 51 messages complete with 29 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po-doc/fr.po |  390 --
 1 files changed, 80 insertions(+), 310 deletions(-)

diff --git a/po-doc/fr.po b/po-doc/fr.po
index abb4c31..d5c94ab 100644
--- a/po-doc/fr.po
+++ b/po-doc/fr.po
@@ -9,8 +9,8 @@ msgid 
 msgstr 
 Project-Id-Version: xfce4-screenshooter\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2009-11-29 10:31+0100\n
-PO-Revision-Date: 2009-10-26 18:33+0100\n
+POT-Creation-Date: 2009-11-15 00:21+0100\n
+PO-Revision-Date: 2010-02-08 18:33+0100\n
 Last-Translator: Douart Patrick patric...@laposte.net\n
 Language-Team: French xfce-i...@xfce.org\n
 MIME-Version: 1.0\n
@@ -21,45 +21,29 @@ msgstr 
 #. It doesn't matter what you translate it to: it's not used at all.
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:97(None)
 #, fuzzy
-msgid 
-@@image: 'images/xfce4-screenshooter-dialog1.png'; 
-md5=ceb772964fa6ca07e5a09b9b9962ed18
-msgstr 
-@@image: 'images/xfce4-screenshooter-dialog.png'; 
-md5=eac0b7b57e11329de808246e69e6e7d6
+msgid @@image: 'images/xfce4-screenshooter-dialog1.png'; 
md5=ceb772964fa6ca07e5a09b9b9962ed18
+msgstr @@image: 'images/xfce4-screenshooter-dialog.png'; 
md5=eac0b7b57e11329de808246e69e6e7d6
 
 #. When image changes, this message will be marked fuzzy or untranslated for 
you.
 #. It doesn't matter what you translate it to: it's not used at all.
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:169(None)
 #, fuzzy
-msgid 
-@@image: 'images/xfce4-screenshooter-dialog2.png'; 
-md5=fa48885f54ca6ab5dfc980fb216025e0
-msgstr 
-@@image: 'images/xfce4-screenshooter-dialog.png'; 
-md5=eac0b7b57e11329de808246e69e6e7d6
+msgid @@image: 'images/xfce4-screenshooter-dialog2.png'; 
md5=fa48885f54ca6ab5dfc980fb216025e0
+msgstr @@image: 'images/xfce4-screenshooter-dialog.png'; 
md5=eac0b7b57e11329de808246e69e6e7d6
 
 #. When image changes, this message will be marked fuzzy or untranslated for 
you.
 #. It doesn't matter what you translate it to: it's not used at all.
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:260(None)
 #, fuzzy
-msgid 
-@@image: 'images/xfce4-screenshooter-zimagez-login-dialog.png'; 
-md5=c8102c88e978eb7ef63994f2648f5ae6
-msgstr 
-@@image: 'images/xfce4-screenshooter-dialog.png'; 
-md5=eac0b7b57e11329de808246e69e6e7d6
+msgid @@image: 'images/xfce4-screenshooter-zimagez-login-dialog.png'; 
md5=c8102c88e978eb7ef63994f2648f5ae6
+msgstr @@image: 'images/xfce4-screenshooter-dialog.png'; 
md5=eac0b7b57e11329de808246e69e6e7d6
 
 #. When image changes, this message will be marked fuzzy or untranslated for 
you.
 #. It doesn't matter what you translate it to: it's not used at all.
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:289(None)
 #, fuzzy
-msgid 
-@@image: 'images/xfce4-screenshooter-zimagez-result-dialog.png'; 
-md5=468def960a376d5a856f2fcb3b35daf1
-msgstr 
-@@image: 'images/xfce4-screenshooter-dialog.png'; 
-md5=eac0b7b57e11329de808246e69e6e7d6
+msgid @@image: 'images/xfce4-screenshooter-zimagez-result-dialog.png'; 
md5=468def960a376d5a856f2fcb3b35daf1
+msgstr @@image: 'images/xfce4-screenshooter-dialog.png'; 
md5=eac0b7b57e11329de808246e69e6e7d6
 
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:12(title)
 msgid Xfce4 Screenshooter
@@ -79,24 +63,13 @@ msgid Jérôme Guelfucci
 msgstr Jérôme Guelfucci
 
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:24(holder)
+#, fuzzy
 msgid Sam Swift
-msgstr 
+msgstr Sam Swift
 
 #: ../docs/manual/C/xfce4-screenshooter.xml.in:28(para)
-msgid 
-Permission is granted to copy, distribute and/or modify this document under 
-the terms of the GNU Free Documentation License, Version 1.1 or any later 
-version published by the Free Software Foundation; with no Invariant 
-Sections, with no Front-Cover Texts, and with no Back-Cover Texts. The 
-complete license text is available from the ulink type=\http\ url=
-\http://www.gnu.org/\;Free Software Foundation/ulink.
-msgstr 
-Vous pouvez copier, distribuer et/ou modifier ce document sous les termes de 
-la licences GNU Free Documentation, dans sa version 1.1 ou tout autre 
-version postérieure publiée par la Free Software Foundation; sans 'Invariant 
-Sections', sans 'Front-Cover Texts' et sans 'Back-Cover Texts'. The texte 
-complet de la license est fourni par la ulink type=\http\ url=\http://;
-www.gnu.org/\Free Software Foundation/ulink.
+msgid Permission is granted to copy, distribute and/or modify this document 
under the terms of the GNU Free Documentation License, Version 1.1 or any later 
version published by the Free Software Foundation; with no Invariant 

[Xfce4-commits] midori:master l10n: Updated French (fr) translation to 98%

2010-02-08 Thread Transifex
Updating branch refs/heads/master
 to 05b69733cbfb58e3b28d63e34f4067e85d7ff6f3 (commit)
   from cbed49960340d7f9bfbb0fab4f5ef1cf9697afc5 (commit)

commit 05b69733cbfb58e3b28d63e34f4067e85d7ff6f3
Author: douart patrick patric...@laposte.net
Date:   Mon Feb 8 18:55:40 2010 +0100

l10n: Updated French (fr) translation to 98%

New status: 574 messages complete with 7 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/fr.po |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 37463d5..6c342d0 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,6 +7,7 @@
 # Pascal Gervais pggerv...@yahoo.ca 2009
 # Jérôme Geulfucci jero...@xfce.org 2009
 # Stéphane Marguet smarg...@gmail.com 2009-2010
+# Patrick Douart patric...@laposte.net 2010
 #
 msgid 
 msgstr 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Plug small memory leak in xml parser.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to 128fad2d48fbaf23254249a4ec43587bf5958735 (commit)
   from 713d83f59f052fee228c4ba0e206a55da7152c55 (commit)

commit 128fad2d48fbaf23254249a4ec43587bf5958735
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Plug small memory leak in xml parser.

 xfconfd/xfconf-backend-perchannel-xml.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xfconfd/xfconf-backend-perchannel-xml.c 
b/xfconfd/xfconf-backend-perchannel-xml.c
index 3c326e9..5ac5dae 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -1496,6 +1496,7 @@ 
xfconf_backend_perchannel_xml_end_elem(GMarkupParseContext *context,
 
 case ELEM_PROPERTY:
 /* FIXME: use stacks here */
+g_free(state-list_property);
 state-list_property = NULL;
 state-list_value = NULL;
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Use glibs implementation for loading mapped files.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to 713d83f59f052fee228c4ba0e206a55da7152c55 (commit)
   from 5d81a47f2f0335ea26851543a57930da59e9406f (commit)

commit 713d83f59f052fee228c4ba0e206a55da7152c55
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Use glibs implementation for loading mapped files.

Valgrind reported a lot of memory corruption in this part of
the code, so rewrote it a bit to use the glib functions that
are provided for this task (with fallback to normal file loading
if glib has no mmap support).

The old mmap code was also never enabled because of missing includes
and checks in configure.ac.in.

 xfconfd/xfconf-backend-perchannel-xml.c |   91 +--
 1 files changed, 39 insertions(+), 52 deletions(-)

diff --git a/xfconfd/xfconf-backend-perchannel-xml.c 
b/xfconfd/xfconf-backend-perchannel-xml.c
index 9bd091d..3c326e9 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -1581,78 +1581,65 @@ 
xfconf_backend_perchannel_xml_merge_file(XfconfBackendPerchannelXml *xbpx,
  GError **error)
 {
 gboolean ret = FALSE;
-gchar *file_contents = NULL;
-GMarkupParseContext *context = NULL;
+GMappedFile *mmap_file;
+gchar *file_contents;
+gsize length;
+GMarkupParseContext *context;
+XmlParserState *state;
+GError *error2 = NULL;
 GMarkupParser parser = {
 xfconf_backend_perchannel_xml_start_elem,
 xfconf_backend_perchannel_xml_end_elem,
 /* xfconf_backend_perchannel_xml_text_elem, */
 NULL,
 };
-XmlParserState state;
-int fd = -1;
-struct stat st;
-#ifdef HAVE_MMAP
-void *addr = NULL;
-#endif
 
 TRACE(entering (%s), filename);
 
-memset(state, 0, sizeof(XmlParserState));
-state.channel = channel;
-state.xbpx = xbpx;
-state.cur_elem = ELEM_NONE;
-state.is_system_file = is_system_file;
-
-fd = open(filename, O_RDONLY, 0);
-if(fd  0)
-goto out;
-
-if(fstat(fd, st))
-goto out;
-
-#ifdef HAVE_MMAP
-addr = mmap(NULL, st.st_size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
-if(addr != MAP_FAILED)
-file_contents = addr;
-#endif
-
-if(!file_contents) {
-file_contents = g_malloc(st.st_size);
-if(read(fd, file_contents, st.st_size) != st.st_size)
-goto out;
+/* we first try to load a mapped file, if this fails (no mmap
+ * implementation is a possible cause) we fall back to normal file
+ * loading */
+mmap_file = g_mapped_file_new(filename, FALSE, NULL);
+if(G_LIKELY(mmap_file != NULL)) {
+file_contents = g_mapped_file_get_contents(mmap_file);
+length = g_mapped_file_get_length(mmap_file);
+DBG(successfully loaded mapped file);
+} else if(!g_file_get_contents(filename, file_contents, length, error)) {
+return FALSE;
 }
 
-DBG(got file(size=%lu): %s, st.st_size, file_contents);
+state = g_slice_new0(XmlParserState);
+state-channel = channel;
+state-xbpx = xbpx;
+state-cur_elem = ELEM_NONE;
+state-is_system_file = is_system_file;
 
-context = g_markup_parse_context_new(parser, 0, state, NULL);
-if(!g_markup_parse_context_parse(context, file_contents, st.st_size, error)
-   || !g_markup_parse_context_end_parse(context, error))
-{
+DBG(got file(size=%lu): %s, length, file_contents);
+
+context = g_markup_parse_context_new(parser, 0, state, NULL);
+if(g_markup_parse_context_parse(context, file_contents, length, error2)
+g_markup_parse_context_end_parse(context, error2)) {
+ret = TRUE;
+} else {
 g_warning(Error parsing xfconf config file \%s\: %s, filename,
-  error  *error ? (*error)-message : (?));
-goto out;
+  error2 ? error2-message : (?));
+if(error)
+  *error = error2;
+else
+  g_error_free(error2);
 }
 
-ret = TRUE;
-
-out:
 TRACE(exiting);
 
+g_slice_free(XmlParserState, state);
+
 if(context)
 g_markup_parse_context_free(context);
 
-#ifdef HAVE_MMAP
-if(addr) {
-munmap(addr, st.st_size);
-file_contents = NULL;
-}
-#endif
-
-g_free(file_contents);
-
-if(fd = 0)
-close(fd);
+if(mmap_file)
+g_mapped_file_free(mmap_file);
+else
+g_free(file_contents);
 
 return ret;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Use g_clear_error where possible.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to 3451406146461eda8548c6561432dad35b8c6214 (commit)
   from 128fad2d48fbaf23254249a4ec43587bf5958735 (commit)

commit 3451406146461eda8548c6561432dad35b8c6214
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Use g_clear_error where possible.

 xfconfd/xfconf-backend-perchannel-xml.c |   10 ++
 xfconfd/xfconf-daemon.c |   29 ++---
 2 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/xfconfd/xfconf-backend-perchannel-xml.c 
b/xfconfd/xfconf-backend-perchannel-xml.c
index 5ac5dae..324938f 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -309,10 +309,7 @@ xfconf_backend_perchannel_xml_set(XfconfBackend *backend,
 #endif
 if(!channel) {
 #ifdef XFCONF_ENABLE_CHECKS
-if(error  *error) {
-g_error_free(*error);
-*error = NULL;
-}
+g_clear_error(error);
 #endif
 channel = xfconf_backend_perchannel_xml_create_channel(xbpx,

channel_name);
@@ -511,10 +508,7 @@ xfconf_backend_perchannel_xml_exists(XfconfBackend 
*backend,
 #endif
 if(!channel) {
 #ifdef XFCONF_ENABLE_CHECKS
-if(error  *error) {
-g_error_free(*error);
-*error = NULL;
-}
+g_clear_error(error);
 #endif
 
 *exists = FALSE;
diff --git a/xfconfd/xfconf-daemon.c b/xfconfd/xfconf-daemon.c
index ba5ea96..c023f86 100644
--- a/xfconfd/xfconf-daemon.c
+++ b/xfconfd/xfconf-daemon.c
@@ -270,10 +270,8 @@ xfconf_get_property(XfconfDaemon *xfconfd,
 for(l = xfconfd-backends; l; l = l-next) {
 if(xfconf_backend_get(l-data, channel, property, value, error))
 return TRUE;
-else if(l-next  error  *error) {
-g_error_free(*error);
-*error = NULL;
-}
+else if(l-next)
+g_clear_error(error);
 }
 
 return FALSE;
@@ -301,10 +299,8 @@ xfconf_get_all_properties(XfconfDaemon *xfconfd,
   *properties, error))
 {
 ret = TRUE;
-} else if(l-next  error  *error) {
-g_error_free(*error);
-*error = NULL;
-}
+} else if(l-next)
+g_clear_error(error);
 }
 
 if(!ret) {
@@ -336,10 +332,8 @@ xfconf_property_exists(XfconfDaemon *xfconfd,
 *exists = exists_tmp;
 if(*exists)
 return TRUE;
-} else if(l-next  error  *error) {
-g_error_free(*error);
-*error = NULL;
-}
+} else if(l-next)
+g_clear_error(error);
 }
 
 return ret;
@@ -362,10 +356,8 @@ xfconf_reset_property(XfconfDaemon *xfconfd,
 for(l = xfconfd-backends; l; l = l-next) {
 if(xfconf_backend_reset(l-data, channel, property, recursive, error))
 ret = TRUE;
-else if(l-next  error  *error) {
-g_error_free(*error);
-*error = NULL;
-}
+else if(l-next)
+g_clear_error(error);
 }
 
 return ret;
@@ -385,7 +377,7 @@ xfconf_list_channels(XfconfDaemon *xfconfd,
 chans_tmp = NULL;
 if(xfconf_backend_list_channels(l-data, chans_tmp, error))
 lchannels = g_slist_concat(lchannels, chans_tmp);
-else if(error)
+else
 g_clear_error(error);
 }
 
@@ -480,8 +472,7 @@ xfconf_daemon_load_config(XfconfDaemon *xfconfd,
 if(!backend) {
 g_warning(Unable to start backend \%s\: %s, backend_ids[i],
   error1-message);
-g_error_free(error1);
-error1 = NULL;
+g_clear_error(error1);
 } else {
 xfconfd-backends = g_list_prepend(xfconfd-backends, backend);
 xfconf_backend_register_property_changed_func(backend,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Destroy hash table after prefetching the cache.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to 9009610f6fa185815f6ebd5c00da7cb64f17b41e (commit)
   from e27eacb054af4e208f85d76298a5f6bb2677f707 (commit)

commit 9009610f6fa185815f6ebd5c00da7cb64f17b41e
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Destroy hash table after prefetching the cache.

 xfconf/xfconf-cache.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xfconf/xfconf-cache.c b/xfconf/xfconf-cache.c
index b9613e9..5af66a2 100644
--- a/xfconf/xfconf-cache.c
+++ b/xfconf/xfconf-cache.c
@@ -658,6 +658,7 @@ xfconf_cache_prefetch(XfconfCache *cache,
 /* FIXME: perhaps change item API to allow 'stealing' a GValue rather
  * than copying all the time */
 g_hash_table_foreach(props, xfconf_cache_prefetch_ht, cache);
+g_hash_table_destroy(props);
 /* TODO: honor max entries */
 ret = TRUE;
 } else
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Plug a memory leak.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to 9cc2c20ef01132123f3e321234f233d18359bbf8 (commit)
   from f75d7046b5e3af8ea7aa6b7ab4b38f3857b8f026 (commit)

commit 9cc2c20ef01132123f3e321234f233d18359bbf8
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Plug a memory leak.

 xfconfd/xfconf-backend-perchannel-xml.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xfconfd/xfconf-backend-perchannel-xml.c 
b/xfconfd/xfconf-backend-perchannel-xml.c
index 324938f..5531878 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -723,6 +723,7 @@ xfconf_backend_perchannel_xml_list_channels(XfconfBackend 
*backend,
 
 g_dir_close(dir);
 }
+g_strfreev(dirs);
 
 return TRUE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Free backends hash table on exit.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to dd39de1f20e168ebc4b101b5010ec2f944d86d3e (commit)
   from 9009610f6fa185815f6ebd5c00da7cb64f17b41e (commit)

commit dd39de1f20e168ebc4b101b5010ec2f944d86d3e
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Free backends hash table on exit.

 xfconfd/main.c   |3 +++
 xfconfd/xfconf-backend-factory.c |   10 ++
 xfconfd/xfconf-backend-factory.h |2 ++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/xfconfd/main.c b/xfconfd/main.c
index cbdc269..2d8a80f 100644
--- a/xfconfd/main.c
+++ b/xfconfd/main.c
@@ -50,6 +50,7 @@
 #include libxfce4util/libxfce4util.h
 
 #include xfconf-daemon.h
+#include xfconf-backend-factory.h
 
 #define DEFAULT_BACKEND  xfce-perchannel-xml
 
@@ -231,6 +232,8 @@ main(int argc,
 g_main_loop_run(mloop);
 
 g_object_unref(G_OBJECT(xfconfd));
+
+xfconf_backend_factory_cleanup();
 
 if(signal_watch) {
 g_source_remove(signal_watch);
diff --git a/xfconfd/xfconf-backend-factory.c b/xfconfd/xfconf-backend-factory.c
index c893b3f..307d7c7 100644
--- a/xfconfd/xfconf-backend-factory.c
+++ b/xfconfd/xfconf-backend-factory.c
@@ -87,3 +87,13 @@ xfconf_backend_factory_get_backend(const gchar *type,
 
 return backend;
 }
+
+
+void
+xfconf_backend_factory_cleanup (void)
+{
+  if(backends) {
+  g_hash_table_destroy(backends);
+  backends = NULL;
+  }
+}
diff --git a/xfconfd/xfconf-backend-factory.h b/xfconfd/xfconf-backend-factory.h
index 0dde2c9..6b162f1 100644
--- a/xfconfd/xfconf-backend-factory.h
+++ b/xfconfd/xfconf-backend-factory.h
@@ -29,6 +29,8 @@ G_BEGIN_DECLS
 XfconfBackend *xfconf_backend_factory_get_backend(const gchar *type,
   GError **error);
 
+void xfconf_backend_factory_cleanup (void);
+
 G_END_DECLS
 
 #endif  /* __XFCONF_BACKEND_FACTORY_H__ */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfconf:master Use async DBus messages in xfconfd.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to f75d7046b5e3af8ea7aa6b7ab4b38f3857b8f026 (commit)
   from 3451406146461eda8548c6561432dad35b8c6214 (commit)

commit f75d7046b5e3af8ea7aa6b7ab4b38f3857b8f026
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Use async DBus messages in xfconfd.

We don't actually use this for threads, but to cleanup
our data after sending it to dbus. Previously a lot of
this leaked (all the errors).

 common/xfconf-dbus.xml  |7 +
 xfconfd/xfconf-daemon.c |  340 +-
 2 files changed, 192 insertions(+), 155 deletions(-)

diff --git a/common/xfconf-dbus.xml b/common/xfconf-dbus.xml
index 3f2138c..7034767 100644
--- a/common/xfconf-dbus.xml
+++ b/common/xfconf-dbus.xml
@@ -20,6 +20,7 @@
  Sets a property value.
 --
 method name=SetProperty
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=in name=channel type=s/
 arg direction=in name=property type=s/
 arg direction=in name=value type=v/
@@ -35,6 +36,7 @@
  Gets a property value, returned as a variant type.
 --
 method name=GetProperty
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=in name=channel type=s/
 arg direction=in name=property type=s/
 arg direction=out name=value type=v/
@@ -57,6 +59,7 @@
   variants.
 --
 method name=GetAllProperties
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=in name=channel type=s/
 arg direction=in name=property_base type=s/
 arg direction=out name=properties type=a{sv}/
@@ -74,6 +77,7 @@
  Returns: %TRUE if @property exists, %FALSE if not.
 --
 method name=PropertyExists
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=in name=channel type=s/
 arg direction=in name=property type=s/
 arg direction=out name=exists type=b/
@@ -104,6 +108,7 @@
  by system policy, then it's just a reset.
 --
 method name=ResetProperty
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=in name=channel type=s/
 arg direction=in name=property type=s/
 arg direction=in name=recursive type=b/
@@ -116,6 +121,7 @@
  strings.
 --
 method name=ListChannels
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=out name=channels type=as/
 /method
 
@@ -133,6 +139,7 @@
  environment is set up.
 --
 method name=IsPropertyLocked
+annotation name=org.freedesktop.DBus.GLib.Async value=true/
 arg direction=in name=channel type=s/
 arg direction=in name=property type=s/
 arg direction=out name=locked type=b/
diff --git a/xfconfd/xfconf-daemon.c b/xfconfd/xfconf-daemon.c
index c023f86..17bbd3a 100644
--- a/xfconfd/xfconf-daemon.c
+++ b/xfconfd/xfconf-daemon.c
@@ -34,48 +34,43 @@
 #include xfconf/xfconf-errors.h
 #include xfconf-common-private.h
 
-static gboolean xfconf_set_property(XfconfDaemon *xfconfd,
-const gchar *channel,
-const gchar *property,
-const GValue *value,
-GError **error);
-static gboolean xfconf_get_property(XfconfDaemon *xfconfd,
-const gchar *channel,
-const gchar *property,
-GValue *value,
-GError **error);
-static gboolean xfconf_get_all_properties(XfconfDaemon *xfconfd,
-  const gchar *channel,
-  const gchar *property_base,
-  GHashTable **properties,
-  GError **error);
-static gboolean xfconf_property_exists(XfconfDaemon *xfconfd,
-   const gchar *channel,
-   const gchar *property,
-   gboolean *exists,
-   GError **error);
-static gboolean xfconf_reset_property(XfconfDaemon *xfconfd,
+static void xfconf_set_property(XfconfDaemon *xfconfd,
+const gchar *channel,
+const gchar *property,
+const GValue *value,
+DBusGMethodInvocation *context);
+static void xfconf_get_property(XfconfDaemon *xfconfd,
+const 

[Xfce4-commits] xfconf:master Fix handling of dirty channels and use hash table.

2010-02-08 Thread Nick Schermer
Updating branch refs/heads/master
 to e27eacb054af4e208f85d76298a5f6bb2677f707 (commit)
   from 9cc2c20ef01132123f3e321234f233d18359bbf8 (commit)

commit e27eacb054af4e208f85d76298a5f6bb2677f707
Author: Nick Schermer n...@xfce.org
Date:   Mon Feb 8 18:44:58 2010 +0100

Fix handling of dirty channels and use hash table.

Use a hash table for looking up the channels by name.

Also store the dirty bit inside the channel structure
to simplefy the code. The GSList used in the old code
was not properly maintained resulting in memory corruption
when resetting a channel and a lot of channel flushing.

 xfconfd/xfconf-backend-perchannel-xml.c |   96 ++
 1 files changed, 45 insertions(+), 51 deletions(-)

diff --git a/xfconfd/xfconf-backend-perchannel-xml.c 
b/xfconfd/xfconf-backend-perchannel-xml.c
index 5531878..8e348aa 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -78,10 +78,9 @@ struct _XfconfBackendPerchannelXml
 
 gchar *config_save_path;
 
-GTree *channels;
+GHashTable *channels;
 
 guint save_id;
-GSList *dirty_channels;
 
 XfconfPropertyChangedFunc prop_changed_func;
 gpointer prop_changed_data;
@@ -96,6 +95,7 @@ typedef struct
 {
 GNode *properties;
 gboolean locked;
+gboolean dirty;
 } XfconfChannel;
 
 typedef struct
@@ -176,7 +176,7 @@ static void 
xfconf_backend_perchannel_xml_register_property_changed_func(XfconfB
  
gpointer user_data);
 
 static void 
xfconf_backend_perchannel_xml_schedule_save(XfconfBackendPerchannelXml *xbpx,
-const gchar 
*channel_name);
+XfconfChannel 
*channel);
 
 static XfconfChannel 
*xfconf_backend_perchannel_xml_create_channel(XfconfBackendPerchannelXml *xbpx,
const gchar 
*channel_name);
@@ -223,10 +223,9 @@ 
xfconf_backend_perchannel_xml_class_init(XfconfBackendPerchannelXmlClass *klass)
 static void
 xfconf_backend_perchannel_xml_init(XfconfBackendPerchannelXml *instance)
 {
-instance-channels = g_tree_new_full((GCompareDataFunc)g_ascii_strcasecmp,
- NULL,
- (GDestroyNotify)g_free,
- 
(GDestroyNotify)xfconf_channel_destroy);
+instance-channels = g_hash_table_new_full(g_str_hash, g_str_equal,
+   (GDestroyNotify)g_free,
+
(GDestroyNotify)xfconf_channel_destroy);
 }
 
 static void
@@ -237,12 +236,10 @@ xfconf_backend_perchannel_xml_finalize(GObject *obj)
 if(xbpx-save_id) {
 g_source_remove(xbpx-save_id);
 xbpx-save_id = 0;
-}
-
-if(xbpx-dirty_channels)
 xfconf_backend_perchannel_xml_flush(XFCONF_BACKEND(xbpx), NULL);
+}
 
-g_tree_destroy(xbpx-channels);
+g_hash_table_destroy(xbpx-channels);
 
 g_free(xbpx-config_save_path);
 
@@ -297,7 +294,7 @@ xfconf_backend_perchannel_xml_set(XfconfBackend *backend,
   GError **error)
 {
 XfconfBackendPerchannelXml *xbpx = XFCONF_BACKEND_PERCHANNEL_XML(backend);
-XfconfChannel *channel = g_tree_lookup(xbpx-channels, channel_name);
+XfconfChannel *channel = g_hash_table_lookup(xbpx-channels, channel_name);
 XfconfProperty *cur_prop;
 
 if(!channel) {
@@ -349,7 +346,7 @@ xfconf_backend_perchannel_xml_set(XfconfBackend *backend,
 xbpx-prop_changed_func(backend, channel_name, property, 
xbpx-prop_changed_data);
 }
 
-xfconf_backend_perchannel_xml_schedule_save(xbpx, channel_name);
+xfconf_backend_perchannel_xml_schedule_save(xbpx, channel);
 
 return TRUE;
 }
@@ -362,7 +359,7 @@ xfconf_backend_perchannel_xml_get(XfconfBackend *backend,
   GError **error)
 {
 XfconfBackendPerchannelXml *xbpx = XFCONF_BACKEND_PERCHANNEL_XML(backend);
-XfconfChannel *channel = g_tree_lookup(xbpx-channels, channel_name);
+XfconfChannel *channel = g_hash_table_lookup(xbpx-channels, channel_name);
 XfconfProperty *cur_prop;
 GValue *value_to_get = NULL;
 
@@ -451,7 +448,7 @@ xfconf_backend_perchannel_xml_get_all(XfconfBackend 
*backend,
   GError **error)
 {
 XfconfBackendPerchannelXml *xbpx = XFCONF_BACKEND_PERCHANNEL_XML(backend);
-XfconfChannel *channel = g_tree_lookup(xbpx-channels, channel_name);
+XfconfChannel *channel = g_hash_table_lookup(xbpx-channels, channel_name);
 GNode *props_tree;
 gchar cur_path[MAX_PROP_PATH], *p;
 
@@ -496,7 +493,7 @@ xfconf_backend_perchannel_xml_exists(XfconfBackend *backend,
  GError **error)
 {
 

[Xfce4-commits] xfce4-session:master Use accessor instead of struct member.

2010-02-08 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 41022b3180784b4169107ba3f45a54b5466b612b (commit)
   from 99c292b66e62dd8c1234e327704b4b88b523 (commit)

commit 41022b3180784b4169107ba3f45a54b5466b612b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon Feb 8 22:59:03 2010 +0100

Use accessor instead of struct member.

 xfce4-tips/main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xfce4-tips/main.c b/xfce4-tips/main.c
index e7e2fd5..a2e6292 100644
--- a/xfce4-tips/main.c
+++ b/xfce4-tips/main.c
@@ -281,7 +281,7 @@ main (int argc, char **argv)
 
   vbox2 = gtk_vbox_new (FALSE, 6);
   gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)-vbox), vbox2, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG 
(dlg))), vbox2, TRUE, TRUE, 0);
   gtk_widget_show (vbox2);
 
   sw = gtk_scrolled_window_new (NULL, NULL);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:master Remember if the user wants to see tips or fortunes (Bug #2020).

2010-02-08 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 5406303d90447aa3acc78b260d175ba482f33d2a (commit)
   from 41022b3180784b4169107ba3f45a54b5466b612b (commit)

commit 5406303d90447aa3acc78b260d175ba482f33d2a
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon Feb 8 23:15:55 2010 +0100

Remember if the user wants to see tips or fortunes (Bug #2020).

 xfce4-tips/Makefile.am |6 --
 xfce4-tips/main.c  |   25 ++---
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/xfce4-tips/Makefile.am b/xfce4-tips/Makefile.am
index 074b930..bc22c19 100644
--- a/xfce4-tips/Makefile.am
+++ b/xfce4-tips/Makefile.am
@@ -16,10 +16,12 @@ xfce4_tips_SOURCES =
\
main.c
 
 xfce4_tips_CFLAGS =\
-   @LIBXFCE4UI_CFLAGS@
+   @LIBXFCE4UI_CFLAGS@ \
+   @XFCONF_CFLAGS@
 
 xfce4_tips_LDADD = \
-   @LIBXFCE4UI_LIBS@
+   @LIBXFCE4UI_LIBS@   \
+   @XFCONF_LIBS@
 
 desktopdir = $(sysconfdir)/xdg/autostart
 desktop_in_files = xfce4-tips-autostart.desktop.in
diff --git a/xfce4-tips/main.c b/xfce4-tips/main.c
index a2e6292..355d6bd 100644
--- a/xfce4-tips/main.c
+++ b/xfce4-tips/main.c
@@ -35,6 +35,7 @@
 #endif
 
 #include libxfce4ui/libxfce4ui.h
+#include xfconf/xfconf.h
 
 
 
@@ -149,12 +150,15 @@ autostart_toggled (GtkToggleButton *button)
 
 
 static void
-item_cb (GtkComboBox *combobox, gpointer data)
+item_cb (GtkComboBox *combobox, XfconfChannel *channel)
 {
   gint active_item = gtk_combo_box_get_active (combobox);
 
   if (active_item =0)
-option = active_item;
+{
+  option = active_item;
+  xfconf_channel_set_bool (channel, /fortunes, option == 1);
+}
 
   gtk_window_set_title (GTK_WINDOW (dlg), _(titles[option]));
 }
@@ -247,6 +251,7 @@ next_cb(GtkWidget *widget, GtkTextBuffer *textbuf)
 int
 main (int argc, char **argv)
 {
+  GError*error = NULL;
   GtkWidget *sw;
   GtkWidget *view;
   GtkWidget *vbox2;
@@ -255,11 +260,19 @@ main (int argc, char **argv)
   GtkWidget *next;
   GtkWidget *close_btn;
   GtkWidget *action_area;
+  XfconfChannel *channel;
 
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
 
   gtk_init (argc, argv);
 
+  if (G_UNLIKELY (!xfconf_init (error))) {
+xfce_dialog_show_error (NULL, error, _(Unable to contact settings 
server));
+g_error_free (error);
+  }
+
+  channel = xfconf_channel_get (xfce4-tips);
+
   /* test for fortune */
   fortune_cmd = g_find_program_in_path (fortune);
 
@@ -306,15 +319,19 @@ main (int argc, char **argv)
 
   if (fortune_cmd != NULL)
 {
+  gboolean fortunes = xfconf_channel_get_bool (channel, /fortunes, 
FALSE);
+
   combobox = gtk_combo_box_new_text ();
   gtk_widget_show (combobox);
 
   gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), 
titles[OPTION_TIPS]);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), 
titles[OPTION_FORTUNES]);
 
-  g_signal_connect (combobox, changed, G_CALLBACK (item_cb), NULL);
+  g_signal_connect (combobox, changed, G_CALLBACK (item_cb), channel);
   g_signal_connect (combobox, changed, G_CALLBACK (next_cb), 
gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
 
+  gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), fortunes ? 1 : 0);
+
   gtk_box_pack_start (GTK_BOX (action_area), combobox, FALSE, FALSE, 0);
 }
 
@@ -345,5 +362,7 @@ main (int argc, char **argv)
   g_ptr_array_free (tips, TRUE);
 }
 
+  xfconf_shutdown ();
+
   return EXIT_SUCCESS;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-session:master Replace some deprecated gtk code in xfce4-tips.

2010-02-08 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 99c292b66e62dd8c1234e327704b4b88b523 (commit)
   from 26c420c35be3362e00cbe04c8ef7cd27ec837887 (commit)

commit 99c292b66e62dd8c1234e327704b4b88b523
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon Feb 8 22:56:08 2010 +0100

Replace some deprecated gtk code in xfce4-tips.

 xfce4-tips/main.c |   51 ++-
 1 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/xfce4-tips/main.c b/xfce4-tips/main.c
index a288b1b..e7e2fd5 100644
--- a/xfce4-tips/main.c
+++ b/xfce4-tips/main.c
@@ -149,10 +149,13 @@ autostart_toggled (GtkToggleButton *button)
 
 
 static void
-item_cb (GtkWidget *btn,
- gpointer   data)
+item_cb (GtkComboBox *combobox, gpointer data)
 {
-  option = GPOINTER_TO_UINT (data);
+  gint active_item = gtk_combo_box_get_active (combobox);
+
+  if (active_item =0)
+option = active_item;
+
   gtk_window_set_title (GTK_WINDOW (dlg), _(titles[option]));
 }
 
@@ -203,7 +206,7 @@ run_fortune (void)
 
 
 static void
-next_cb(GtkWidget *btn, GtkTextBuffer *textbuf)
+next_cb(GtkWidget *widget, GtkTextBuffer *textbuf)
 {
   gchar *buffer = NULL;
   GtkTextIter start;
@@ -248,14 +251,13 @@ main (int argc, char **argv)
   GtkWidget *view;
   GtkWidget *vbox2;
   GtkWidget *check;
-  GtkWidget *item;
-  GtkWidget *menu;
-  GtkWidget *opt;
+  GtkWidget *combobox;
   GtkWidget *next;
   GtkWidget *close_btn;
+  GtkWidget *action_area;
 
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
-  
+
   gtk_init (argc, argv);
 
   /* test for fortune */
@@ -274,7 +276,8 @@ main (int argc, char **argv)
   gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_CENTER);
   gtk_window_stick (GTK_WINDOW (dlg));
 
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (GTK_DIALOG (dlg)-action_area), 
GTK_BUTTONBOX_EDGE);
+  action_area = gtk_dialog_get_action_area (GTK_DIALOG (dlg));
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_EDGE);
 
   vbox2 = gtk_vbox_new (FALSE, 6);
   gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6);
@@ -303,25 +306,16 @@ main (int argc, char **argv)
 
   if (fortune_cmd != NULL)
 {
-  menu = gtk_menu_new ();
-  gtk_widget_show (menu);
-
-  item = gtk_menu_item_new_with_label (_(titles[OPTION_TIPS]));
-  g_signal_connect (item, activate, G_CALLBACK (item_cb), 
GUINT_TO_POINTER (OPTION_TIPS));
-  g_signal_connect (item, activate, G_CALLBACK (next_cb), 
gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-  gtk_widget_show (item);
-
-  item = gtk_menu_item_new_with_label (_(titles[OPTION_FORTUNES]));
-  g_signal_connect (item, activate, G_CALLBACK (item_cb), 
GUINT_TO_POINTER (OPTION_FORTUNES));
-  g_signal_connect (item, activate, G_CALLBACK (next_cb), 
gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-  gtk_widget_show (item);
-
-  opt = gtk_option_menu_new();
-  gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu);
-  gtk_dialog_add_action_widget (GTK_DIALOG (dlg), opt, GTK_RESPONSE_NONE);
-  gtk_widget_show(opt);
+  combobox = gtk_combo_box_new_text ();
+  gtk_widget_show (combobox);
+
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), 
titles[OPTION_TIPS]);
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), 
titles[OPTION_FORTUNES]);
+
+  g_signal_connect (combobox, changed, G_CALLBACK (item_cb), NULL);
+  g_signal_connect (combobox, changed, G_CALLBACK (next_cb), 
gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
+
+  gtk_box_pack_start (GTK_BOX (action_area), combobox, FALSE, FALSE, 0);
 }
 
   next = gtk_button_new_with_label (_(Next));
@@ -343,7 +337,6 @@ main (int argc, char **argv)
 
   gtk_main ();
 
-
   /* cleanup */
   g_free (fortune_cmd);
   if (tips != NULL)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Updated Czech (cs) translation to 100%

2010-02-08 Thread Transifex
Updating branch refs/heads/master
 to bc1a6b15da0d8b37dc296318e9bd40e3f2408939 (commit)
   from 24e4d167254ea5bd0900f76e3232261c1bfa5b37 (commit)

commit bc1a6b15da0d8b37dc296318e9bd40e3f2408939
Author: David Štancl dsta...@dstancl.cz
Date:   Tue Feb 9 08:03:11 2010 +0100

l10n: Updated Czech (cs) translation to 100%

New status: 581 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/cs.po |  117 +-
 1 files changed, 62 insertions(+), 55 deletions(-)

diff --git a/po/cs.po b/po/cs.po
index 1a6e5d7..43537d7 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -7,8 +7,8 @@ msgid 
 msgstr 
 Project-Id-Version: midori 0.2.0\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2010-02-05 08:54+0100\n
-PO-Revision-Date: 2010-02-05 08:55+0100\n
+POT-Creation-Date: 2010-02-09 06:06+0100\n
+PO-Revision-Date: 2010-02-09 08:02+0100\n
 Last-Translator: David Štancl dsta...@dstancl.cz\n
 Language-Team: Czech  \n
 MIME-Version: 1.0\n
@@ -22,8 +22,8 @@ msgstr 
 msgid Lightweight web browser
 msgstr Odlehčený prohlížeč
 
-#: ../data/midori.desktop.in.h:2 ../midori/main.c:1261 ../midori/main.c:1462
-#: ../midori/main.c:1470 ../midori/main.c:1481
+#: ../data/midori.desktop.in.h:2 ../midori/main.c:1277 ../midori/main.c:1485
+#: ../midori/main.c:1493 ../midori/main.c:1509
 #: ../midori/midori-websettings.c:299
 msgid Midori
 msgstr Midori
@@ -37,54 +37,54 @@ msgstr Internetový prohlížeč
 msgid The configuration couldn't be loaded: %s\n
 msgstr Konfigurace nemůže být načtena: %s\n
 
-#: ../midori/main.c:151
+#: ../midori/main.c:145
 #, c-format
 msgid Value '%s' is invalid for %s
 msgstr Hodnota '%s' je pro %s špatná
 
-#: ../midori/main.c:158 ../midori/main.c:244
+#: ../midori/main.c:152 ../midori/main.c:238
 #, c-format
 msgid Invalid configuration value '%s'
 msgstr Nesprávná hodnota '%s' v konfiguraci
 
-#: ../midori/main.c:370 ../extensions/formhistory.c:442
+#: ../midori/main.c:364 ../extensions/formhistory.c:442
 #, c-format
 msgid Failed to open database: %s\n
 msgstr Nepodařilo se otevřít databázi: %s\n
 
 #. i18n: Couldn't remove items that are older than n days
-#: ../midori/main.c:419
+#: ../midori/main.c:413
 #, c-format
 msgid Failed to remove old history items: %s\n
 msgstr Nepodařilo se odstranit staré položky historie: %s\n
 
-#: ../midori/main.c:447
+#: ../midori/main.c:441
 #, c-format
 msgid The configuration couldn't be saved. %s
 msgstr Konfigurace nemůže být uložena. %s
 
-#: ../midori/main.c:485
+#: ../midori/main.c:479
 #, c-format
 msgid The search engines couldn't be saved. %s
 msgstr Vyhledávací nástroj nemůže být uložen. %s
 
-#: ../midori/main.c:504 ../midori/main.c:554 ../midori/main.c:574
+#: ../midori/main.c:498 ../midori/main.c:548 ../midori/main.c:568
 #, c-format
 msgid The bookmarks couldn't be saved. %s
 msgstr Záložky nemohou být uloženy. %s
 
 #. i18n: Trash, or wastebin, containing closed tabs
-#: ../midori/main.c:604 ../midori/main.c:627
+#: ../midori/main.c:598 ../midori/main.c:621
 #, c-format
 msgid The trash couldn't be saved. %s
 msgstr Seznam zavřených karet nemůže být uložen. %s
 
-#: ../midori/main.c:691 ../midori/main.c:894
+#: ../midori/main.c:685 ../midori/main.c:888
 #, c-format
 msgid The session couldn't be saved. %s
 msgstr Sezení nemůže být uloženo. %s
 
-#: ../midori/main.c:928
+#: ../midori/main.c:922
 msgid 
 Midori seems to have crashed the last time it was opened. If this happened 
 repeatedly, try one of the following options to solve the problem.
@@ -92,121 +92,121 @@ msgstr 
 Zdá se, že Midori nebylo naposledy řádně ukončeno. Jestliže se to stává 
 opakovaně, pro odstranění problému zkuste následující možnosti.
 
-#: ../midori/main.c:943
+#: ../midori/main.c:937
 msgid Modify _preferences
 msgstr Změnit _nastavení
 
-#: ../midori/main.c:947
+#: ../midori/main.c:941
 msgid Reset the last _session
 msgstr Vymazat poslední _sezení
 
-#: ../midori/main.c:952
+#: ../midori/main.c:946
 msgid Disable all _extensions
 msgstr Zakázat všechna _rozšíření
 
-#: ../midori/main.c:1161 ../midori/main.c:1708
+#: ../midori/main.c:1166 ../midori/main.c:1748
 #, c-format
 msgid The session couldn't be loaded: %s\n
 msgstr Sezení nemůže být načteno: %s\n
 
-#: ../midori/main.c:1261
+#: ../midori/main.c:1277
 msgid No filename specified
 msgstr Nebyl zadán název souboru
 
-#: ../midori/main.c:1280
+#: ../midori/main.c:1296
 msgid An unknown error occured.
 msgstr Nastala neznámá chyba.
 
-#: ../midori/main.c:1311
+#: ../midori/main.c:1327
 #, c-format
 msgid Snapshot saved to: %s\n
 msgstr Snímek uložen do %s\n
 
-#: ../midori/main.c:1371
+#: ../midori/main.c:1387
 msgid Run ADDRESS as a web application
 msgstr Spustit ADDRESS jako webovou aplikaci
 
-#: ../midori/main.c:1371
+#: ../midori/main.c:1387
 msgid ADDRESS
 msgstr ADDRESS
 
-#: ../midori/main.c:1374
+#: ../midori/main.c:1390
 msgid Use FOLDER as configuration folder
 msgstr Použít FOLDER