mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
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:
commit
1cd0dfa55b
@ -428,6 +428,16 @@ Gvfs is also heavily distributed and relies on a session bus to be present.
|
|||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</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>
|
<formalpara>
|
||||||
<title><envar>GIO_MODULE_DIR</envar></title>
|
<title><envar>GIO_MODULE_DIR</envar></title>
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ sandbox_info_read (void)
|
|||||||
{
|
{
|
||||||
const char *var;
|
const char *var;
|
||||||
|
|
||||||
var = g_getenv ("GTK_USE_PORTAL");
|
var = g_getenv ("GIO_USE_PORTALS");
|
||||||
if (var && var[0] == '1')
|
if (var && var[0] == '1')
|
||||||
use_portal = TRUE;
|
use_portal = TRUE;
|
||||||
network_available = TRUE;
|
network_available = TRUE;
|
||||||
|
@ -73,7 +73,7 @@ try:
|
|||||||
raise
|
raise
|
||||||
# subprocess.Popen(['gdbus', 'monitor', '--session', '--dest', 'org.freedesktop.portal.Desktop'])
|
# 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()
|
self.memory_monitor = Gio.MemoryMonitor.dup_default()
|
||||||
assert("GMemoryMonitorPortal" in str(self.memory_monitor))
|
assert("GMemoryMonitorPortal" in str(self.memory_monitor))
|
||||||
self.memory_monitor.connect("low-memory-warning", self.portal_memory_warning_cb)
|
self.memory_monitor.connect("low-memory-warning", self.portal_memory_warning_cb)
|
||||||
|
@ -37,7 +37,7 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
g_test_init (&argc, &argv, NULL);
|
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);
|
g_test_add_func ("/portal-support/env-var", test_portal_support_env_var);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ try:
|
|||||||
raise
|
raise
|
||||||
# subprocess.Popen(['gdbus', 'monitor', '--session', '--dest', 'org.freedesktop.portal.Desktop'])
|
# 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()
|
self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default()
|
||||||
assert("GPowerProfileMonitorPortal" in str(self.power_profile_monitor))
|
assert("GPowerProfileMonitorPortal" in str(self.power_profile_monitor))
|
||||||
self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb)
|
self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb)
|
||||||
|
Loading…
Reference in New Issue
Block a user