"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gio/gpowerprofilemonitorportal.c" between
glib-2.69.2.tar.xz and glib-2.69.3.tar.xz

About: GLib is a low-level core C library used by GTK+ and GNOME. Development version.

gpowerprofilemonitorportal.c  (glib-2.69.2.tar.xz):gpowerprofilemonitorportal.c  (glib-2.69.3.tar.xz)
skipping to change at line 111 skipping to change at line 111
} }
static gboolean static gboolean
g_power_profile_monitor_portal_initable_init (GInitable *initable, g_power_profile_monitor_portal_initable_init (GInitable *initable,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
GPowerProfileMonitorPortal *ppm = G_POWER_PROFILE_MONITOR_PORTAL (initable); GPowerProfileMonitorPortal *ppm = G_POWER_PROFILE_MONITOR_PORTAL (initable);
GDBusProxy *proxy; GDBusProxy *proxy;
gchar *name_owner; gchar *name_owner;
GVariant *power_saver_enabled_v = NULL;
if (!glib_should_use_portal ()) if (!glib_should_use_portal ())
{ {
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Not using portals"); g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Not using portals");
return FALSE; return FALSE;
} }
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
skipping to change at line 146 skipping to change at line 147
"Desktop portal not found"); "Desktop portal not found");
return FALSE; return FALSE;
} }
g_free (name_owner); g_free (name_owner);
ppm->signal_id = g_signal_connect (proxy, "g-properties-changed", ppm->signal_id = g_signal_connect (proxy, "g-properties-changed",
G_CALLBACK (proxy_properties_changed), ppm) ; G_CALLBACK (proxy_properties_changed), ppm) ;
power_saver_enabled_v = g_dbus_proxy_get_cached_property (proxy, "power-saver-
if (power_saver_enabled_v != NULL &&
g_variant_is_of_type (power_saver_enabled_v, G_VARIANT_TYPE_BOOLEAN))
ppm->power_saver_enabled = g_variant_get_boolean (power_saver_enabled_v);
g_clear_pointer (&power_saver_enabled_v, g_variant_unref);
ppm->proxy = g_steal_pointer (&proxy); ppm->proxy = g_steal_pointer (&proxy);
return TRUE; return TRUE;
} }
static void static void
g_power_profile_monitor_portal_finalize (GObject *object) g_power_profile_monitor_portal_finalize (GObject *object)
{ {
GPowerProfileMonitorPortal *ppm = G_POWER_PROFILE_MONITOR_PORTAL (object); GPowerProfileMonitorPortal *ppm = G_POWER_PROFILE_MONITOR_PORTAL (object);
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)