From 68322e7efbeee89f2e0a3b73ed3e692d4edb8424 Mon Sep 17 00:00:00 2001 From: Jared Wahlstrand Date: Sat, 3 Aug 2024 16:55:55 -0400 Subject: [PATCH] set "application_name" and "prgname" to prevent warnings when using file dialogs --- Project.toml | 2 +- src/GLib/loop.jl | 2 +- src/Gtk4.jl | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 1ead89b9..591ef00b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Gtk4" uuid = "9db2cae5-386f-4011-9d63-a5602296539b" -version = "0.6.7" +version = "0.6.8" [deps] BitFlags = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" diff --git a/src/GLib/loop.jl b/src/GLib/loop.jl index 3996674f..950161b3 100644 --- a/src/GLib/loop.jl +++ b/src/GLib/loop.jl @@ -210,7 +210,7 @@ GApplication(id = nothing) = G_.Application_new(id,ApplicationFlags_FLAGS_NONE) """ run(app::GApplication) -Calls `g_application_run`, starting the main loop. If the loop is already running, it will stop it before +Calls `g_application_run`, starting the main loop. If the loop is already running, this function will stop it and emit a warning before starting the application loop. """ function run(app::GApplication) diff --git a/src/Gtk4.jl b/src/Gtk4.jl index 6d361e7e..0788471c 100644 --- a/src/Gtk4.jl +++ b/src/Gtk4.jl @@ -172,6 +172,10 @@ function __init__() G_.set_default_icon_name("julia") end + # prevents warnings from being thrown when using file dialogs + GLib.G_.set_application_name("julia") + GLib.G_.set_prgname("julia") + isinteractive() && GLib.start_main_loop() #@debug("Gtk4 initialized.")