Khurshid Alam has proposed merging lp:~khurshid-alam/unity-settings-daemon/fix-airplane-switch into lp:unity-settings-daemon.
Commit message: Fix airplane mode switch not appearing on network panel. Requested reviews: Sebastien Bacher (seb128) For more details, see: https://code.launchpad.net/~khurshid-alam/unity-settings-daemon/fix-airplane-switch/+merge/368880 -- Your team Unity Settings Daemon Development Team is subscribed to branch lp:unity-settings-daemon.
=== modified file 'gnome-settings-daemon/gnome-settings-bus.c' --- gnome-settings-daemon/gnome-settings-bus.c 2016-05-20 17:01:02 +0000 +++ gnome-settings-daemon/gnome-settings-bus.c 2019-06-16 12:37:03 +0000 @@ -87,3 +87,49 @@ return screen_saver_proxy; } + +char * +gnome_settings_get_chassis_type (void) +{ + char *ret = NULL; + GError *error = NULL; + GVariant *inner; + GVariant *variant = NULL; + GDBusConnection *connection; + + connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, + NULL, + &error); + if (connection == NULL) { + g_warning ("system bus not available: %s", error->message); + g_error_free (error); + goto out; + } + + variant = g_dbus_connection_call_sync (connection, + "org.freedesktop.hostname1", + "/org/freedesktop/hostname1", + "org.freedesktop.DBus.Properties", + "Get", + g_variant_new ("(ss)", + "org.freedesktop.hostname1", + "Chassis"), + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + if (variant == NULL) { + g_debug ("Failed to get property '%s': %s", "Chassis", error->message); + g_error_free (error); + goto out; + } + + g_variant_get (variant, "(v)", &inner); + ret = g_variant_dup_string (inner, NULL); + g_variant_unref (inner); +out: + g_clear_object (&connection); + g_clear_pointer (&variant, g_variant_unref); + return ret; +} === modified file 'gnome-settings-daemon/gnome-settings-bus.h' --- gnome-settings-daemon/gnome-settings-bus.h 2016-05-20 17:01:02 +0000 +++ gnome-settings-daemon/gnome-settings-bus.h 2019-06-16 12:37:03 +0000 @@ -30,6 +30,7 @@ GsdSessionManager *gnome_settings_bus_get_session_proxy (void); GsdScreenSaver *gnome_settings_bus_get_screen_saver_proxy (void); +char * gnome_settings_get_chassis_type (void); G_END_DECLS
-- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop