diff options
Diffstat (limited to 'plugins/rfkill')
-rw-r--r-- | plugins/rfkill/msd-rfkill-manager.c | 11 | ||||
-rw-r--r-- | plugins/rfkill/msd-rfkill-manager.h | 1 | ||||
-rw-r--r-- | plugins/rfkill/msd-rfkill-plugin.c | 1 | ||||
-rw-r--r-- | plugins/rfkill/msd-rfkill-plugin.h | 1 | ||||
-rw-r--r-- | plugins/rfkill/rfkill-glib.c | 9 | ||||
-rw-r--r-- | plugins/rfkill/rfkill-glib.h | 1 | ||||
-rw-r--r-- | plugins/rfkill/rfkill.h | 1 |
7 files changed, 20 insertions, 5 deletions
diff --git a/plugins/rfkill/msd-rfkill-manager.c b/plugins/rfkill/msd-rfkill-manager.c index 7a79511..252761d 100644 --- a/plugins/rfkill/msd-rfkill-manager.c +++ b/plugins/rfkill/msd-rfkill-manager.c @@ -2,6 +2,7 @@ * * Copyright (C) 2007 William Jon McCann <[email protected]> * Copyright (C) 2010,2011 Red Hat, Inc. + * Copyright (C) 2012-2021 MATE Developers * * Author: Bastien Nocera <[email protected]> * @@ -65,9 +66,8 @@ struct MsdRfkillManagerPrivate #define MSD_RFKILL_DBUS_PATH MSD_DBUS_PATH "/Rfkill" static const gchar introspection_xml[] = -"<node>" +"<node name='/org/mate/SettingsDaemon/Rfkill'>" " <interface name='org.mate.SettingsDaemon.Rfkill'>" -" <annotation name='org.freedesktop.DBus.GLib.CSymbol' value='msd_rfkill_manager'/>" " <property name='AirplaneMode' type='b' access='readwrite'/>" " <property name='HardwareAirplaneMode' type='b' access='read'/>" " <property name='HasAirplaneMode' type='b' access='read'/>" @@ -461,7 +461,8 @@ static const GDBusInterfaceVTable interface_vtable = { NULL, handle_get_property, - handle_set_property + handle_set_property, + { 0 } }; static void @@ -490,8 +491,8 @@ on_bus_gotten (GObject *source_object, NULL); manager->priv->name_id = g_bus_own_name_on_connection (connection, - MSD_RFKILL_DBUS_NAME, - G_BUS_NAME_OWNER_FLAGS_NONE, + MSD_DBUS_NAME, + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, NULL, NULL, NULL, diff --git a/plugins/rfkill/msd-rfkill-manager.h b/plugins/rfkill/msd-rfkill-manager.h index 6ca862f..24dfbf2 100644 --- a/plugins/rfkill/msd-rfkill-manager.h +++ b/plugins/rfkill/msd-rfkill-manager.h @@ -2,6 +2,7 @@ * * Copyright (C) 2007 William Jon McCann <[email protected]> * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2012-2021 MATE Developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/rfkill/msd-rfkill-plugin.c b/plugins/rfkill/msd-rfkill-plugin.c index a508ca4..5b9f889 100644 --- a/plugins/rfkill/msd-rfkill-plugin.c +++ b/plugins/rfkill/msd-rfkill-plugin.c @@ -2,6 +2,7 @@ * * Copyright (C) 2007 William Jon McCann <[email protected]> * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2012-2021 MATE Developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/rfkill/msd-rfkill-plugin.h b/plugins/rfkill/msd-rfkill-plugin.h index 1887d62..d293d74 100644 --- a/plugins/rfkill/msd-rfkill-plugin.h +++ b/plugins/rfkill/msd-rfkill-plugin.h @@ -2,6 +2,7 @@ * * Copyright (C) 2007 William Jon McCann <[email protected]> * Copyright (C) 2014 Michal Ratajsky <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/plugins/rfkill/rfkill-glib.c b/plugins/rfkill/rfkill-glib.c index 6ef1143..37e43d2 100644 --- a/plugins/rfkill/rfkill-glib.c +++ b/plugins/rfkill/rfkill-glib.c @@ -4,6 +4,7 @@ * * Copyright (C) 2012 Bastien Nocera <[email protected]> * Copyright © 2017 Endless Mobile, Inc. + * Copyright (C) 2012-2021 MATE Developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -357,7 +358,11 @@ event_cb (GIOChannel *source, print_event (&event); +#if GLIB_CHECK_VERSION (2, 68, 0) + event_ptr = g_memdup2 (&event, sizeof(event)); +#else event_ptr = g_memdup (&event, sizeof(event)); +#endif events = g_list_prepend (events, event_ptr); status = g_io_channel_read_chars (source, @@ -440,7 +445,11 @@ cc_rfkill_glib_open (CcRfkillGlib *rfkill) type_to_string (event.type), event.idx, event.soft, event.hard); +#if GLIB_CHECK_VERSION (2, 68, 0) + event_ptr = g_memdup2 (&event, sizeof(event)); +#else event_ptr = g_memdup (&event, sizeof(event)); +#endif events = g_list_prepend (events, event_ptr); } diff --git a/plugins/rfkill/rfkill-glib.h b/plugins/rfkill/rfkill-glib.h index 4734154..e7dc7a7 100644 --- a/plugins/rfkill/rfkill-glib.h +++ b/plugins/rfkill/rfkill-glib.h @@ -3,6 +3,7 @@ * gnome-bluetooth - Bluetooth integration for GNOME * * Copyright (C) 2012 Bastien Nocera <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * * * This program is free software; you can redistribute it and/or modify diff --git a/plugins/rfkill/rfkill.h b/plugins/rfkill/rfkill.h index abb2c66..dbb2527 100644 --- a/plugins/rfkill/rfkill.h +++ b/plugins/rfkill/rfkill.h @@ -5,6 +5,7 @@ * Copyright (C) 2006 - 2007 Ivo van Doorn * Copyright (C) 2007 Dmitry Torokhov * Copyright 2009 Johannes Berg <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above |