[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_1_1_1-80-g42c7b76
Pierre Biava
nobody at users.sourceforge.net
Sun Jan 20 12:18:14 CET 2013
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 42c7b76b5f362fd6399c036160dd3e38ea95e2fd (commit)
via f466c9fa83c1b0bca3a6945a4a9602d2eb935e1f (commit)
from 894d8280dafa78594c8ab483683b7506296ef48f (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 42c7b76b5f362fd6399c036160dd3e38ea95e2fd
Author: pbiava <pierre.biava at nerim.net>
Date: Sun Jan 20 07:55:39 2013 +0100
Added test-driver file to gitignore
commit f466c9fa83c1b0bca3a6945a4a9602d2eb935e1f
Author: pbiava <pierre.biava at nerim.net>
Date: Sun Jan 20 07:43:21 2013 +0100
fixes the indenting and minor changes
-----------------------------------------------------------------------
Changes:
diff --git a/.gitignore b/.gitignore
index c206e8c..e71ba3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,4 @@ doxygen/
*.md5
*.swp
tags
+test-driver
diff --git a/src/gsb_dirs.c b/src/gsb_dirs.c
index 6261300..1866db5 100644
--- a/src/gsb_dirs.c
+++ b/src/gsb_dirs.c
@@ -46,60 +46,64 @@ static gchar *grisbi_dir;
void gsb_dirs_init ( char* gsb_bin_path )
{
- gchar* local_ui_dir;
+ gchar *local_ui_dir;
+ GDir *local_ui_handle;
/* Get the grisbi executable directory as it may be useful when running dev instances */
- grisbi_dir = g_path_get_dirname( gsb_bin_path );
- local_ui_dir = g_strconcat( grisbi_dir, "/ui", NULL );
+ grisbi_dir = g_path_get_dirname ( gsb_bin_path );
+ local_ui_dir = g_strconcat ( grisbi_dir, "/ui", NULL );
#ifdef G_OS_WIN32
- {
- gchar *dir;
+{
+ gchar *dir;
- dir = g_win32_get_package_installation_directory_of_module ( NULL );
+ dir = g_win32_get_package_installation_directory_of_module ( NULL );
- categories_dir = g_build_filename ( dir, "share/grisbi/categories", NULL );
- locale_dir = g_strconcat ( dir, "/share/locale", NULL );
- pixmaps_dir = g_strconcat ( dir, "/share/pixmaps/grisbi", NULL );
- ui_dir = g_strconcat ( dir, "/share/grisbi/ui", NULL );
+ categories_dir = g_build_filename ( dir, "share/grisbi/categories", NULL );
+ locale_dir = g_strconcat ( dir, "/share/locale", NULL );
+ pixmaps_dir = g_strconcat ( dir, "/share/pixmaps/grisbi", NULL );
+ ui_dir = g_strconcat ( dir, "/share/grisbi/ui", NULL );
- g_free ( dir );
+ g_free ( dir );
- user_config_dir = g_build_filename ( g_get_user_config_dir (), "grisbi", NULL);
- user_data_dir = g_build_filename ( g_get_user_data_dir (), "grisbi", NULL);
- user_default_dir = g_strdup ( win32_get_my_documents_folder_path () );
- }
+ user_config_dir = g_build_filename ( g_get_user_config_dir (), "grisbi", NULL);
+ user_data_dir = g_build_filename ( g_get_user_data_dir (), "grisbi", NULL);
+ user_default_dir = g_strdup ( win32_get_my_documents_folder_path () );
+}
#else
-#ifdef OS_OSX
-
+{
+ #ifdef OS_OSX
+ {
user_config_dir = g_build_filename ( g_get_home_dir (),
"Library/Application Support/Grisbi/config", NULL );
user_data_dir = g_build_filename ( g_get_home_dir (),
"Library/Application Support/Grisbi/data", NULL );
user_default_dir = g_strdup ( g_get_home_dir() );
-#ifdef GTKOSXAPPLICATION
-
- if ( gtkosx_application_get_bundle_id ( ) )
- {
- gchar *res_path = gtkosx_application_get_resource_path ();
-
- categories_dir = g_build_filename ( res_path, "share/grisbi/categories", NULL );
- locale_dir = g_strconcat (res_path, "/share/locale", NULL );
- pixmaps_dir = g_strconcat (res_path, "/share/pixmaps/grisbi", NULL );
- ui_dir = g_strconcat (res_path, "/share/grisbi/ui", NULL );
-
- g_free ( res_path );
- }
- else {
- categories_dir = g_build_filename ( DATA_PATH, "categories", NULL );
- locale_dir = g_strdup ( LOCALEDIR );
- pixmaps_dir = g_strdup ( PIXMAPS_DIR );
- ui_dir = g_strdup ( UI_DIR );
+ #ifdef GTKOSXAPPLICATION
+ {
+ if ( gtkosx_application_get_bundle_id ( ) )
+ {
+ gchar *res_path = gtkosx_application_get_resource_path ();
+
+ categories_dir = g_build_filename ( res_path, "share/grisbi/categories", NULL );
+ locale_dir = g_build_filename (res_path, "/share/locale", NULL );
+ pixmaps_dir = g_build_filename (res_path, "/share/pixmaps/grisbi", NULL );
+ ui_dir = g_build_filename (res_path, "/share/grisbi/ui", NULL );
+
+ g_free ( res_path );
+ }
+ else
+ {
+ categories_dir = g_build_filename ( DATA_PATH, "categories", NULL );
+ locale_dir = g_strdup ( LOCALEDIR );
+ pixmaps_dir = g_strdup ( PIXMAPS_DIR );
+ ui_dir = g_strdup ( UI_DIR );
+ }
+ }
+ #endif /* GTKOSXAPPLICATION */
}
-
-#endif /* GTKOSXAPPLICATION */
-#else
+ #else
{
categories_dir = g_build_filename ( DATA_PATH, "categories", NULL );
locale_dir = g_strdup ( LOCALEDIR );
@@ -110,14 +114,14 @@ void gsb_dirs_init ( char* gsb_bin_path )
user_data_dir = g_build_filename ( g_get_user_data_dir (), "grisbi", NULL);
user_default_dir = g_strdup ( g_get_home_dir() );
}
-#endif /* OS_OSX */
+ #endif /* OS_OSX */
+}
#endif
-
- GDir* local_ui_handle = g_dir_open( local_ui_dir, 0, NULL );
+ local_ui_handle = g_dir_open ( local_ui_dir, 0, NULL );
if ( NULL != local_ui_handle )
{
- g_free( ui_dir );
+ g_free ( ui_dir );
ui_dir = local_ui_dir;
}
accelerator_filename = g_build_filename ( user_config_dir, "grisbi-accels", NULL );
hooks/post-receive
--
grisbi
More information about the cvs
mailing list