[gcompris] core, minor changes in the display of messages when starting GCompris.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] core, minor changes in the display of messages when starting GCompris.
- Date: Tue, 4 Sep 2012 22:54:17 +0000 (UTC)
commit 4fe9c67591c43fd02dae2aadff043989a0c972ad
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sat Sep 1 13:36:10 2012 +0200
core, minor changes in the display of messages when starting GCompris.
Having some debug messages when gcompris is run with -h or -v is not
cute and breaks the help2man utility.
src/gcompris/gcompris.c | 35 +++++++++++++++++++----------------
1 files changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index b4c4b01..7c0f21b 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -1303,9 +1303,7 @@ static void load_properties ()
/* Initialize the binary relocation API
* http://autopackage.org/docs/binreloc/
*/
- if(gbr_init (&error))
- g_message("Binary relocation enabled");
- else
+ if( ! gbr_init (&error))
{
if (error->code == GBR_INIT_ERROR_DISABLED)
g_message("Binary relocation disabled");
@@ -1314,9 +1312,6 @@ static void load_properties ()
g_error_free (error);
}
- exec_prefix = gbr_find_exe_dir(NULL);
- g_warning("exec_prefix %s\n", (exec_prefix==NULL ? "NONE" : exec_prefix));
-
{
gchar *pkg_data_dir = gbr_find_data_dir(PACKAGE_DATA_DIR);
gchar *pkg_clib_dir = gbr_find_lib_dir(PACKAGE_CLIB_DIR);
@@ -1332,8 +1327,14 @@ static void load_properties ()
g_free(pkg_data_dir);
g_free(pkg_clib_dir);
}
+}
+
+/* Display the directory value we have */
+static void display_property_dirs()
+{
+ exec_prefix = gbr_find_exe_dir(NULL);
+ printf("exec_prefix = %s\n", (exec_prefix==NULL ? "NONE" : exec_prefix));
- /* Display the directory value we have */
printf("package_data_dir = %s\n", properties->package_data_dir);
printf("package_skin_dir = %s\n", properties->package_skin_dir);
printf("package_menu_dir = %s\n", properties->menu_dir);
@@ -1626,12 +1627,22 @@ main (int argc, char *argv[])
sugar_setup(&argc, &argv);
/* Argument parsing */
- context = g_option_context_new("GCompris");
+ context = g_option_context_new(" - An educational software for chilren 2 to 10");
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free(context);
+ if (popt_version)
+ {
+ printf (_("GCompris\nVersion: %s\nLicence: GPL\n"
+ "More info at http://gcompris.net\n"),
+ VERSION);
+ exit (0);
+ }
+
+ display_property_dirs();
+
/* Set the default message handler, it avoids message with option -D */
g_log_set_handler (NULL, G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_DEBUG | G_LOG_FLAG_FATAL
| G_LOG_FLAG_RECURSION, gc_log_handler, NULL);
@@ -1689,14 +1700,6 @@ main (int argc, char *argv[])
gc_locale_set(properties->locale);
#endif
- if (popt_version)
- {
- printf (_("GCompris\nVersion: %s\nLicence: GPL\n"
- "More info at http://gcompris.net\n"),
- VERSION);
- exit (0);
- }
-
if (popt_fullscreen)
{
properties->fullscreen = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]