Reformatted command line options
This commit is contained in:
parent
755958ce14
commit
a7311c9794
1 changed files with 13 additions and 47 deletions
60
src/gm-app.c
60
src/gm-app.c
|
@ -11,7 +11,6 @@
|
||||||
#include "gm-world.h"
|
#include "gm-world.h"
|
||||||
#include "gm-color-table.h"
|
#include "gm-color-table.h"
|
||||||
|
|
||||||
//#include "mcp/mcp.h"
|
|
||||||
#include "gm-app.h"
|
#include "gm-app.h"
|
||||||
//#include "editor.h"
|
//#include "editor.h"
|
||||||
#include "gm-debug.h"
|
#include "gm-debug.h"
|
||||||
|
@ -19,7 +18,7 @@
|
||||||
#include "gm-support.h"
|
#include "gm-support.h"
|
||||||
#include "gm-scripts.h"
|
#include "gm-scripts.h"
|
||||||
|
|
||||||
static int debug_level = 0;
|
static gchar *debug_level = NULL;
|
||||||
static gboolean show_version = FALSE;
|
static gboolean show_version = FALSE;
|
||||||
static gboolean recover = FALSE;
|
static gboolean recover = FALSE;
|
||||||
static gchar *load_worlds = NULL;
|
static gchar *load_worlds = NULL;
|
||||||
|
@ -33,50 +32,17 @@ void on_gm_app_view_size_allocate(GmAppView *view, GtkAllocation *allocation,
|
||||||
GmApp *app);
|
GmApp *app);
|
||||||
|
|
||||||
struct poptOption poptions[] = {
|
struct poptOption poptions[] = {
|
||||||
{
|
{"debug", 'd', POPT_ARG_STRING, &debug_level, 0, N_("Enable debugging. "
|
||||||
"debug",
|
"Specify multiple debug levels with a comma seperated list. "
|
||||||
'd',
|
"Available levels: default, mcp, all"), N_("DBGGLEVEL")},
|
||||||
POPT_ARG_INT,
|
{"version", 'v', POPT_ARG_NONE, &show_version, 0, N_("Show application "
|
||||||
&debug_level,
|
"version"), NULL},
|
||||||
0,
|
{"load", 'l', POPT_ARG_STRING, &load_worlds, 0, N_("Load specified worlds. "
|
||||||
N_
|
"Specify multiple worlds with a comma separated list"),
|
||||||
("Enable debugging. Debugging can be done in different depth levels, each "
|
N_("WORLDS")},
|
||||||
"level inherits all messages from the levels below: "
|
{"recover", 'r', POPT_ARG_NONE, &recover, 0, N_("Recover from previous "
|
||||||
"0 = None, 1 = Default and 2 = MCP"),
|
"session (used with gnome session)"), NULL},
|
||||||
N_("DBGGLEVEL")
|
{NULL, '\0', 0, NULL, 0, NULL, NULL}
|
||||||
},
|
|
||||||
{
|
|
||||||
"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}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GM_APP_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
|
#define GM_APP_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
|
||||||
|
@ -323,7 +289,7 @@ void
|
||||||
gm_app_initialize(GmApp *app) {
|
gm_app_initialize(GmApp *app) {
|
||||||
gchar *colors_path;
|
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,
|
app->priv->worlds_path = g_strconcat(app->priv->path, G_DIR_SEPARATOR_S,
|
||||||
"worlds", NULL);
|
"worlds", NULL);
|
||||||
|
|
Reference in a new issue