Merge branch '3107-use-portal' into 'main'

gio: Rename GTK_USE_PORTAL to GIO_USE_PORTALS

Closes #3107

See merge request GNOME/glib!3602
This commit is contained in:
Emmanuele Bassi 2023-10-02 17:27:36 +00:00
commit 1cd0dfa55b
5 changed files with 14 additions and 4 deletions

View File

@ -428,6 +428,16 @@ Gvfs is also heavily distributed and relies on a session bus to be present.
</para>
</formalpara>
<formalpara>
<title><envar>GIO_USE_PORTALS</envar></title>
<para>
This variable can be set to override detection of portals and force them
to be used to provide various bits of GIO functionality, for testing and
debugging. This variable is not intended to be used in production.
</para>
</formalpara>
<formalpara>
<title><envar>GIO_MODULE_DIR</envar></title>

View File

@ -125,7 +125,7 @@ sandbox_info_read (void)
{
const char *var;
var = g_getenv ("GTK_USE_PORTAL");
var = g_getenv ("GIO_USE_PORTALS");
if (var && var[0] == '1')
use_portal = TRUE;
network_available = TRUE;

View File

@ -73,7 +73,7 @@ try:
raise
# subprocess.Popen(['gdbus', 'monitor', '--session', '--dest', 'org.freedesktop.portal.Desktop'])
os.environ['GTK_USE_PORTAL'] = "1"
os.environ['GIO_USE_PORTALS'] = "1"
self.memory_monitor = Gio.MemoryMonitor.dup_default()
assert("GMemoryMonitorPortal" in str(self.memory_monitor))
self.memory_monitor.connect("low-memory-warning", self.portal_memory_warning_cb)

View File

@ -37,7 +37,7 @@ main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
g_setenv ("GTK_USE_PORTAL", "1", TRUE);
g_setenv ("GIO_USE_PORTALS", "1", TRUE);
g_test_add_func ("/portal-support/env-var", test_portal_support_env_var);

View File

@ -79,7 +79,7 @@ try:
raise
# subprocess.Popen(['gdbus', 'monitor', '--session', '--dest', 'org.freedesktop.portal.Desktop'])
os.environ['GTK_USE_PORTAL'] = "1"
os.environ['GIO_USE_PORTALS'] = "1"
self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default()
assert("GPowerProfileMonitorPortal" in str(self.power_profile_monitor))
self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb)