gui/application: Change --debug to --verbose
And support multiple calls to it. Each call increase the verbose level, up to level 4. Level 4 increases all tracing. You can run Calendar as: $ gnome-calendar -vvvv now and that'll enable tracing. Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1234 Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
This commit is contained in:
committed by
Marge Bot
parent
a3598c0c11
commit
509165286e
@@ -51,6 +51,16 @@ G_DEFINE_TYPE (GcalApplication, gcal_application, ADW_TYPE_APPLICATION);
|
||||
|
||||
static gboolean show_version = FALSE;
|
||||
|
||||
static gboolean
|
||||
verbose_cb (int *argc,
|
||||
char *argv[],
|
||||
gboolean *standalone,
|
||||
gboolean *version)
|
||||
{
|
||||
gcal_log_increase_verbosity ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GOptionEntry gcal_application_goptions[] = {
|
||||
{
|
||||
"quit", 'q', 0,
|
||||
@@ -63,9 +73,9 @@ static GOptionEntry gcal_application_goptions[] = {
|
||||
N_("Display version number"), NULL
|
||||
},
|
||||
{
|
||||
"debug", 0, 0,
|
||||
G_OPTION_ARG_NONE, NULL,
|
||||
N_("Enable debug messages"), NULL
|
||||
"verbose", 'v', G_OPTION_FLAG_NO_ARG,
|
||||
G_OPTION_ARG_CALLBACK, verbose_cb,
|
||||
N_("Increase verbosity level. Can be used multiple times."),
|
||||
},
|
||||
{
|
||||
"date", 'd', 0,
|
||||
|
||||
Reference in New Issue
Block a user