From 076da21f05dfb31987eb24ed5cab5a1488456e2f Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 4 Feb 2011 23:00:40 +0000 Subject: [PATCH] Code cleanup --- po/fr.po | 26 +++++++++++++------------- src/run.c | 8 +------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/po/fr.po b/po/fr.po index b26764d..878422c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Panel 0.0.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-12-31 22:07+0100\n" +"POT-Creation-Date: 2011-01-01 01:12+0100\n" "PO-Revision-Date: 2010-04-22 12:45+0200\n" "Last-Translator: Pierre Pronchery \n" "Language-Team: French\n" @@ -20,7 +20,7 @@ msgstr "" msgid "Unknown" msgstr "Inconnu" -#: ../src/applets/battery.c:186 ../src/panel.c:361 ../src/panel.c:365 +#: ../src/applets/battery.c:186 ../src/panel.c:360 ../src/panel.c:364 #: ../src/run.c:196 ../src/run.c:200 msgid "Error" msgstr "Erreur" @@ -83,8 +83,8 @@ msgstr "Verrouiller l'écran" msgid "Logging out is disabled" msgstr "" -#: ../src/applets/logout.c:70 ../src/panel.c:634 ../src/panel.c:641 -#: ../src/panel.c:649 +#: ../src/applets/logout.c:70 ../src/panel.c:633 ../src/panel.c:640 +#: ../src/panel.c:648 msgid "Logout" msgstr "Déconnexion" @@ -172,23 +172,23 @@ msgstr "très petite" msgid "Invalid panel size" msgstr "Taille invalide pour le panel" -#: ../src/panel.c:448 +#: ../src/panel.c:447 msgid "Panel preferences" msgstr "Préférences du Panel" -#: ../src/panel.c:463 +#: ../src/panel.c:462 msgid "Top size:" msgstr "Taille du haut :" -#: ../src/panel.c:474 +#: ../src/panel.c:473 msgid "Bottom size:" msgstr "Taille du bas :" -#: ../src/panel.c:485 +#: ../src/panel.c:484 msgid "General" msgstr "Générales" -#: ../src/panel.c:624 +#: ../src/panel.c:623 msgid "" "This will log you out of the current session, therefore closing any " "application currently opened and losing any unsaved data.\n" @@ -199,7 +199,7 @@ msgstr "" "sauvegardées.\n" "Voulez-vous continuer?" -#: ../src/panel.c:697 +#: ../src/panel.c:696 msgid "" "This will shutdown your device, therefore closing any application currently " "opened and losing any unsaved data.\n" @@ -210,7 +210,7 @@ msgstr "" "sauvegardées.\n" "Voulez-vous continuer?" -#: ../src/panel.c:702 +#: ../src/panel.c:701 msgid "" "This will shutdown your computer, therefore closing any application " "currently opened and losing any unsaved data.\n" @@ -221,11 +221,11 @@ msgstr "" "sauvegardées.\n" "Voulez-vous continuer?" -#: ../src/panel.c:719 ../src/panel.c:724 ../src/panel.c:731 +#: ../src/panel.c:718 ../src/panel.c:723 ../src/panel.c:730 msgid "Shutdown" msgstr "Arrêter" -#: ../src/panel.c:723 +#: ../src/panel.c:722 msgid "Restart" msgstr "Redémarrer" diff --git a/src/run.c b/src/run.c index 92ae2e3..dd9a565 100644 --- a/src/run.c +++ b/src/run.c @@ -214,16 +214,10 @@ static int _run_error(Run * run, char const * message, int ret) static char * _run_get_config_filename(void) { char const * homedir; - size_t len; - char * filename; if((homedir = getenv("HOME")) == NULL) homedir = g_get_home_dir(); - len = strlen(homedir) + 1 + sizeof(RUN_CONFIG_FILE); - if((filename = malloc(len)) == NULL) - return NULL; - snprintf(filename, len, "%s/%s", homedir, RUN_CONFIG_FILE); - return filename; + return string_new_append(homedir, "/", RUN_CONFIG_FILE, NULL); }