[brasero] brasero-misc: expose a GOption for enabling brasero utils debugging



commit 9fd51c182366b296bac5572952fe9ab080c49f55
Author: Joshua Lock <joshua lock intel com>
Date:   Wed Aug 21 15:49:57 2013 +0100

    brasero-misc: expose a GOption for enabling brasero utils debugging

 libbrasero-utils/brasero-misc.c |   21 +++++++++++++++++++++
 libbrasero-utils/brasero-misc.h |    3 +++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-utils/brasero-misc.c b/libbrasero-utils/brasero-misc.c
index ae7afec..594d5a8 100644
--- a/libbrasero-utils/brasero-misc.c
+++ b/libbrasero-utils/brasero-misc.c
@@ -69,12 +69,33 @@ brasero_utils_error_quark (void)
 
 static gboolean use_debug = FALSE;
 
+static const GOptionEntry options [] = {
+       { "brasero-utils-debug", 'g', 0, G_OPTION_ARG_NONE, &use_debug,
+         N_("Display debug statements on stdout for Brasero utilities library"),
+         NULL },
+       { NULL }
+};
+
 void
 brasero_utils_set_use_debug (gboolean active)
 {
        use_debug = active;
 }
 
+GOptionGroup *
+brasero_utils_get_option_group (void)
+{
+       GOptionGroup *group;
+
+       group = g_option_group_new ("brasero-utils",
+                                   N_("Brasero utilities library"),
+                                   N_("Display options for Brasero-utils library"),
+                                   NULL,
+                                   NULL);
+       g_option_group_add_entries (group, options);
+       return group;
+}
+
 void
 brasero_utils_debug_message (const gchar *location,
                             const gchar *format,
diff --git a/libbrasero-utils/brasero-misc.h b/libbrasero-utils/brasero-misc.h
index 6960cd2..26ccf95 100644
--- a/libbrasero-utils/brasero-misc.h
+++ b/libbrasero-utils/brasero-misc.h
@@ -74,6 +74,9 @@ brasero_utils_debug_message (const gchar *location,
 void
 brasero_utils_init (void);
 
+GOptionGroup *
+brasero_utils_get_option_group (void);
+
 gchar *
 brasero_utils_get_uri_name (const gchar *uri);
 gchar*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]