From a7311c9794f35c7271c417f9898950558620975d Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Mon, 7 Nov 2005 09:46:40 +0000 Subject: [PATCH] Reformatted command line options --- src/gm-app.c | 60 ++++++++++++---------------------------------------- 1 file changed, 13 insertions(+), 47 deletions(-) diff --git a/src/gm-app.c b/src/gm-app.c index 80e92cf..5fcf223 100644 --- a/src/gm-app.c +++ b/src/gm-app.c @@ -11,7 +11,6 @@ #include "gm-world.h" #include "gm-color-table.h" -//#include "mcp/mcp.h" #include "gm-app.h" //#include "editor.h" #include "gm-debug.h" @@ -19,7 +18,7 @@ #include "gm-support.h" #include "gm-scripts.h" -static int debug_level = 0; +static gchar *debug_level = NULL; static gboolean show_version = FALSE; static gboolean recover = FALSE; static gchar *load_worlds = NULL; @@ -33,50 +32,17 @@ void on_gm_app_view_size_allocate(GmAppView *view, GtkAllocation *allocation, GmApp *app); struct poptOption poptions[] = { - { - "debug", - 'd', - POPT_ARG_INT, - &debug_level, - 0, - N_ - ("Enable debugging. Debugging can be done in different depth levels, each " - "level inherits all messages from the levels below: " - "0 = None, 1 = Default and 2 = MCP"), - N_("DBGGLEVEL") - }, - { - "version", - 'v', - POPT_ARG_NONE, - &show_version, - 0, - N_("Show application version"), - NULL}, - { - "load", - 'l', - POPT_ARG_STRING, - &load_worlds, - 0, - N_("Load specified worlds, seperated by a `,'"), - N_("WORLDS")}, - { - "recover", - 'r', - POPT_ARG_NONE, - &recover, - 0, - N_("Recover from previous session (used with gnome session)"), - NULL}, - { - NULL, - '\0', - 0, - NULL, - 0, - NULL, - NULL} + {"debug", 'd', POPT_ARG_STRING, &debug_level, 0, N_("Enable debugging. " + "Specify multiple debug levels with a comma seperated list. " + "Available levels: default, mcp, all"), N_("DBGGLEVEL")}, + {"version", 'v', POPT_ARG_NONE, &show_version, 0, N_("Show application " + "version"), NULL}, + {"load", 'l', POPT_ARG_STRING, &load_worlds, 0, N_("Load specified worlds. " + "Specify multiple worlds with a comma separated list"), + N_("WORLDS")}, + {"recover", 'r', POPT_ARG_NONE, &recover, 0, N_("Recover from previous " + "session (used with gnome session)"), NULL}, + {NULL, '\0', 0, NULL, 0, NULL, NULL} }; #define GM_APP_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \ @@ -323,7 +289,7 @@ void gm_app_initialize(GmApp *app) { gchar *colors_path; - debug_set_level(debug_level); + gm_debug_set_level(debug_level); app->priv->worlds_path = g_strconcat(app->priv->path, G_DIR_SEPARATOR_S, "worlds", NULL);