summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2023-01-25 11:24:10 -0500
committerLogan Rathbone <poprocks@gmail.com>2023-01-25 11:24:10 -0500
commit68222026a11d1d679c346da54124b8ca85c1bb18 (patch)
tree220d2107aeba35abeea0a7b40fc6ff9842d369a2 /src
parent50937a124573d40291049ee3984a14e95231f2ae (diff)
downloadzenity-68222026a11d1d679c346da54124b8ca85c1bb18.tar.gz
main: suppress "this is discouraged" message from libadwaita
Bit of a hack, but I can just see us getting bug report after bug report about this message if it's left in.
Diffstat (limited to 'src')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index b224bf1..ec01b41 100644
--- a/src/main.c
+++ b/src/main.c
@@ -128,6 +128,8 @@ command_line_cb (GApplication *app,
g_free (args);
}
+static void dummy_log_func (void) { }
+
int
main (int argc, char *argv[])
{
@@ -143,6 +145,11 @@ main (int argc, char *argv[])
textdomain (GETTEXT_PACKAGE);
/* </i18n> */
+ /* Turn off g_message's from libadwaita - this is to suppress the 'this is
+ * discouraged' message re: mapping dialogs without a transient parent.
+ */
+ g_log_set_handler ("Adwaita", G_LOG_LEVEL_MESSAGE, (GLogFunc)dummy_log_func, NULL);
+
args = g_new0 (ZenityArgs, 1);
args->argc = argc;
args->argv = argv;