Suppress Log By Default
This commit is contained in:
parent
633e00f277
commit
d673e9aab8
11
src/main.c
11
src/main.c
@ -32,15 +32,26 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static GLogWriterOutput
|
||||||
|
zenity_suppress_log (GLogLevelFlags log_level, const GLogField *fields,
|
||||||
|
gsize n_fields, gpointer user_data) {
|
||||||
|
return G_LOG_WRITER_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
main (gint argc, gchar **argv) {
|
main (gint argc, gchar **argv) {
|
||||||
ZenityParsingOptions *results;
|
ZenityParsingOptions *results;
|
||||||
gint retval;
|
gint retval;
|
||||||
|
const char *is_debug;
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
is_debug = getenv ("ZENITY_DEBUG");
|
||||||
|
if (is_debug == NULL || strlen (is_debug) < 1)
|
||||||
|
g_log_set_writer_func (zenity_suppress_log, NULL, NULL);
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
gtk_init (&argc, &argv);
|
||||||
|
|
||||||
results = zenity_option_parse (argc, argv);
|
results = zenity_option_parse (argc, argv);
|
||||||
|
Reference in New Issue
Block a user