[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-96-g7ce46d1
Rémi Cardona
nobody at users.sourceforge.net
Mon Mar 21 22:18:02 CET 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".
The branch, master has been updated
via 7ce46d145b34181e3b8938af750ec42a7ea9c4b3 (commit)
via 9db947cfa46c4ac09513276727eb9256341f4a45 (commit)
via 642f40318c7cc0be5b29bd0bb01f5ce0bdaace86 (commit)
via 5b842c962e255bb699ad2af22e1c19d69ec1f039 (commit)
via 3882c8376f25d7866e1494f244a5fe8f799ba787 (commit)
via 874527c135969a450bab8c9564ace622d7860d2a (commit)
via 00880037c8078bcc1751d523d62c21dd60d0271d (commit)
from 4b4ce1dcab015dda802fda2bc6c077410dff63de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7ce46d145b34181e3b8938af750ec42a7ea9c4b3
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 09:06:25 2011 +0100
Use g_build_filename() instead of g_strconcat() in menu.c
commit 9db947cfa46c4ac09513276727eb9256341f4a45
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 09:06:09 2011 +0100
Use G_DIR_SEPARATOR_S instead of "/" literal string in gsb_file_config.c
commit 642f40318c7cc0be5b29bd0bb01f5ce0bdaace86
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 09:05:28 2011 +0100
Use g_build_filename() instead of g_strconcat() in gsb_file_config.c
commit 5b842c962e255bb699ad2af22e1c19d69ec1f039
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 09:04:54 2011 +0100
Use g_build_filename() instead of g_strconcat() in gsb_category.c
commit 3882c8376f25d7866e1494f244a5fe8f799ba787
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 09:04:43 2011 +0100
Use g_build_filename() instead of g_strconcat() in erreur.c
commit 874527c135969a450bab8c9564ace622d7860d2a
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 08:25:31 2011 +0100
Use g_build_filename() instead of g_strconcat() in gsb_category.c
commit 00880037c8078bcc1751d523d62c21dd60d0271d
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Mar 21 08:24:42 2011 +0100
Fix memory leaks in gsb_category_assistant_scan_directory()
-----------------------------------------------------------------------
Changes:
diff --git a/src/erreur.c b/src/erreur.c
index 689a658..dbfc3f5 100644
--- a/src/erreur.c
+++ b/src/erreur.c
@@ -461,7 +461,7 @@ gboolean gsb_debug_start_log ( void )
complete_filename = g_strconcat ( base_filename, "-log.txt", NULL);
basename = g_path_get_basename ( complete_filename );
- debug_filename = g_strconcat ( my_get_gsb_file_default_dir (), "/", basename, NULL);
+ debug_filename = g_build_filename ( my_get_gsb_file_default_dir (), basename, NULL);
g_free ( basename);
g_free ( complete_filename );
@@ -469,7 +469,7 @@ gboolean gsb_debug_start_log ( void )
}
else
{
- debug_filename = g_strconcat ( my_get_gsb_file_default_dir (), "/", "No_name-log.txt", NULL);
+ debug_filename = g_build_filename ( my_get_gsb_file_default_dir (), "No_name-log.txt", NULL);
}
diff --git a/src/gsb_category.c b/src/gsb_category.c
index 1a61c96..7d0d17c 100644
--- a/src/gsb_category.c
+++ b/src/gsb_category.c
@@ -306,20 +306,22 @@ GSList * gsb_category_assistant_scan_directory ( gchar * basename, GtkTreeModel
GDir * dir;
GSList * list = NULL;
- dirname = g_strconcat ( DATA_PATH, G_DIR_SEPARATOR_S, "categories", G_DIR_SEPARATOR_S, basename, NULL );
+ dirname = g_build_filename ( DATA_PATH, "categories", basename, NULL );
if ( ! g_file_test ( dirname, G_FILE_TEST_IS_DIR ) )
{
gchar * pos = strchr ( basename, '.' );
if ( pos )
*pos = '\0';
- dirname = g_strconcat ( DATA_PATH, G_DIR_SEPARATOR_S, "categories", G_DIR_SEPARATOR_S, basename, NULL );
+ g_free ( dirname );
+ dirname = g_build_filename ( DATA_PATH, "categories", basename, NULL );
}
if ( ! g_file_test ( dirname, G_FILE_TEST_IS_DIR ) )
{
gchar * pos = strchr ( basename, '_' );
if ( pos )
*pos = '\0';
- dirname = g_strconcat ( DATA_PATH, G_DIR_SEPARATOR_S, "categories", G_DIR_SEPARATOR_S, basename, NULL );
+ g_free ( dirname );
+ dirname = g_build_filename ( DATA_PATH, "categories", basename, NULL );
}
dir = g_dir_open ( dirname, 0, NULL );
@@ -328,7 +330,7 @@ GSList * gsb_category_assistant_scan_directory ( gchar * basename, GtkTreeModel
gchar * filename;
while ( ( filename = (gchar *) g_dir_read_name ( dir ) ) )
{
- filename = g_strconcat ( dirname, "/", filename, NULL );
+ filename = g_build_filename ( dirname, filename, NULL );
if ( g_file_test ( filename, G_FILE_TEST_IS_REGULAR ) &&
g_str_has_suffix ( filename, ".cgsb" ) )
{
@@ -337,6 +339,8 @@ GSList * gsb_category_assistant_scan_directory ( gchar * basename, GtkTreeModel
}
}
+ g_free ( dirname );
+
return g_slist_sort ( list, (GCompareFunc) strcmp );
}
diff --git a/src/gsb_file_config.c b/src/gsb_file_config.c
index 572aa77..aeb0dd9 100644
--- a/src/gsb_file_config.c
+++ b/src/gsb_file_config.c
@@ -112,8 +112,7 @@ gboolean gsb_file_config_load_config ( void )
devel_debug (NULL);
gsb_file_config_clean_config ();
- filename = g_strconcat ( my_get_XDG_grisbirc_dir(), G_DIR_SEPARATOR_S,
- C_GRISBIRC ( ), NULL );
+ filename = g_build_filename ( my_get_XDG_grisbirc_dir(), C_GRISBIRC ( ), NULL );
#if IS_DEVELOPMENT_VERSION == 1
if ( !g_file_test (filename, G_FILE_TEST_EXISTS) )
{
@@ -143,8 +142,7 @@ devel_debug (NULL);
if ( ! filename || strlen ( filename ) == 0 )
return FALSE;
#else
- filename = g_strconcat ( my_get_grisbirc_dir(), G_DIR_SEPARATOR_S,
- C_OLD_GRISBIRC ( ), NULL );
+ filename = g_build_filename ( my_get_grisbirc_dir(), C_OLD_GRISBIRC ( ), NULL );
#endif
config = g_key_file_new ();
@@ -176,7 +174,8 @@ devel_debug (NULL);
{
used_model = TRUE;
g_free ( filename );
- filename = g_strconcat ( my_get_XDG_grisbirc_dir(), "/", PACKAGE, ".conf", NULL );
+ filename = g_strconcat ( my_get_XDG_grisbirc_dir(), G_DIR_SEPARATOR_S,
+ PACKAGE, ".conf", NULL );
if ( !g_file_test (filename, G_FILE_TEST_EXISTS) )
return FALSE;
@@ -521,8 +520,7 @@ gboolean gsb_file_config_save_config ( void )
devel_debug (NULL);
- filename = g_strconcat ( my_get_XDG_grisbirc_dir(), G_DIR_SEPARATOR_S,
- C_GRISBIRC ( ), NULL );
+ filename = g_build_filename ( my_get_XDG_grisbirc_dir(), C_GRISBIRC ( ), NULL );
config = g_key_file_new ();
#if IS_DEVELOPMENT_VERSION == 1
diff --git a/src/menu.c b/src/menu.c
index dc2b2c7..6ad1be3 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -441,7 +441,7 @@ gboolean help_manual ( void )
gchar *lang = _("en");
gchar *string;
- string = g_strconcat ( HELP_PATH, "/", lang, "/manual.html", NULL );
+ string = g_build_filename ( HELP_PATH, lang, "manual.html", NULL );
if (g_file_test ( string,
G_FILE_TEST_EXISTS ))
@@ -452,7 +452,7 @@ gboolean help_manual ( void )
else
{
g_free (string);
- string = g_strconcat ( HELP_PATH, "/", lang, "/grisbi-manuel.html", NULL );
+ string = g_build_filename ( HELP_PATH, lang, "grisbi-manuel.html", NULL );
lance_navigateur_web (string);
g_free (string);
}
@@ -472,8 +472,7 @@ gboolean help_quick_start ( void )
{
gchar *lang = _("en");
- gchar* tmpstr = g_strconcat ( HELP_PATH, "/", lang, "/quickstart.html",
- NULL );
+ gchar* tmpstr = g_build_filename ( HELP_PATH, lang, "quickstart.html", NULL );
lance_navigateur_web ( tmpstr );
g_free ( tmpstr );
@@ -492,8 +491,7 @@ gboolean help_translation ( void )
{
gchar *lang = _("en");
- gchar* tmpstr = g_strconcat ( HELP_PATH, "/", lang, "/translation.html",
- NULL );
+ gchar* tmpstr = g_build_filename ( HELP_PATH, lang, "translation.html", NULL );
lance_navigateur_web ( tmpstr );
g_free ( tmpstr );
hooks/post-receive
--
grisbi
More information about the cvs
mailing list