summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/monitor.c b/examples/monitor.c
index 3e99053..0c7155f 100644
--- a/examples/monitor.c
+++ b/examples/monitor.c
@@ -364,11 +364,13 @@ int main (int argc, char *argv[])
{
MateMixerState state;
GOptionContext *ctx;
+ gboolean debug = FALSE;
gchar *backend = NULL;
gchar *server = NULL;
GError *error = NULL;
GOptionEntry entries[] = {
{ "backend", 'b', 0, G_OPTION_ARG_STRING, &backend, "Sound system to use (pulseaudio, alsa, oss, null)", NULL },
+ { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug, "Enable debug", NULL },
{ "server", 's', 0, G_OPTION_ARG_STRING, &server, "Sound server address", NULL },
{ NULL }
};
@@ -386,6 +388,9 @@ int main (int argc, char *argv[])
g_option_context_free (ctx);
+ if (debug == TRUE)
+ g_setenv ("G_MESSAGES_DEBUG", "all", FALSE);
+
/* Initialize the library.
* If the function returns FALSE, the library is not usable. */
if (mate_mixer_init () == FALSE)