summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeemu Ikonen <tpikonen@mailbox.org>2021-10-20 21:27:15 +0300
committerTeemu Ikonen <tpikonen@mailbox.org>2021-10-21 14:59:12 +0300
commit0e677b3209a1873499cb8185b8d417d9082ac569 (patch)
tree4969d3f7a186438a3603b48039c06f3464af11aa
parent3e713dd38107fc430e41a94ec7964dccd905768e (diff)
downloadgeoclue-0e677b3209a1873499cb8185b8d417d9082ac569.tar.gz
Don't use G_TYPE_INSTANCE_GET_PRIVATE
It has been deprecated since GObject 2.58. Replace with *_get_instance_private() functions generated by GObject G_ADD_PRIVATE macro.
-rw-r--r--demo/gclue-service-agent.c4
-rw-r--r--libgeoclue/gclue-simple.c4
-rw-r--r--src/gclue-3g.c2
-rw-r--r--src/gclue-cdma.c2
-rw-r--r--src/gclue-client-info.c4
-rw-r--r--src/gclue-compass.c5
-rw-r--r--src/gclue-config.c5
-rw-r--r--src/gclue-location-source.c5
-rw-r--r--src/gclue-location.c4
-rw-r--r--src/gclue-locator.c5
-rw-r--r--src/gclue-min-uint.c4
-rw-r--r--src/gclue-modem-gps.c2
-rw-r--r--src/gclue-modem-manager.c4
-rw-r--r--src/gclue-nmea-source.c4
-rw-r--r--src/gclue-service-client.c4
-rw-r--r--src/gclue-service-location.c4
-rw-r--r--src/gclue-service-manager.c4
-rw-r--r--src/gclue-web-source.c2
-rw-r--r--src/gclue-wifi.c2
19 files changed, 19 insertions, 51 deletions
diff --git a/demo/gclue-service-agent.c b/demo/gclue-service-agent.c
index 1530fd9..ac96795 100644
--- a/demo/gclue-service-agent.c
+++ b/demo/gclue-service-agent.c
@@ -134,9 +134,7 @@ gclue_service_agent_class_init (GClueServiceAgentClass *klass)
static void
gclue_service_agent_init (GClueServiceAgent *agent)
{
- agent->priv = G_TYPE_INSTANCE_GET_PRIVATE (agent,
- GCLUE_TYPE_SERVICE_AGENT,
- GClueServiceAgentPrivate);
+ agent->priv = gclue_service_agent_get_instance_private (agent);
}
static void
diff --git a/libgeoclue/gclue-simple.c b/libgeoclue/gclue-simple.c
index 30b7d60..12c6061 100644
--- a/libgeoclue/gclue-simple.c
+++ b/libgeoclue/gclue-simple.c
@@ -712,9 +712,7 @@ gclue_simple_async_initable_init (GAsyncInitableIface *iface)
static void
gclue_simple_init (GClueSimple *simple)
{
- simple->priv = G_TYPE_INSTANCE_GET_PRIVATE (simple,
- GCLUE_TYPE_SIMPLE,
- GClueSimplePrivate);
+ simple->priv = gclue_simple_get_instance_private (simple);
simple->priv->cancellable = g_cancellable_new ();
}
diff --git a/src/gclue-3g.c b/src/gclue-3g.c
index 96f45b6..e49c622 100644
--- a/src/gclue-3g.c
+++ b/src/gclue-3g.c
@@ -152,7 +152,7 @@ gclue_3g_init (GClue3G *source)
{
GClue3GPrivate *priv;
- source->priv = G_TYPE_INSTANCE_GET_PRIVATE ((source), GCLUE_TYPE_3G, GClue3GPrivate);
+ source->priv = gclue_3g_get_instance_private (source);
priv = source->priv;
priv->cancellable = g_cancellable_new ();
diff --git a/src/gclue-cdma.c b/src/gclue-cdma.c
index 0372788..82c24e6 100644
--- a/src/gclue-cdma.c
+++ b/src/gclue-cdma.c
@@ -141,7 +141,7 @@ gclue_cdma_init (GClueCDMA *source)
{
GClueCDMAPrivate *priv;
- source->priv = G_TYPE_INSTANCE_GET_PRIVATE ((source), GCLUE_TYPE_CDMA, GClueCDMAPrivate);
+ source->priv = gclue_cdma_get_instance_private (source);
priv = source->priv;
priv->cancellable = g_cancellable_new ();
diff --git a/src/gclue-client-info.c b/src/gclue-client-info.c
index fbffc2f..7fc2ac7 100644
--- a/src/gclue-client-info.c
+++ b/src/gclue-client-info.c
@@ -415,9 +415,7 @@ gclue_client_info_async_initable_init (GAsyncInitableIface *iface)
static void
gclue_client_info_init (GClueClientInfo *info)
{
- info->priv = G_TYPE_INSTANCE_GET_PRIVATE (info,
- GCLUE_TYPE_CLIENT_INFO,
- GClueClientInfoPrivate);
+ info->priv = gclue_client_info_get_instance_private(info);
}
void
diff --git a/src/gclue-compass.c b/src/gclue-compass.c
index 0a60275..f425aac 100644
--- a/src/gclue-compass.c
+++ b/src/gclue-compass.c
@@ -196,10 +196,7 @@ on_compass_proxy_ready (GObject *source_object,
static void
gclue_compass_init (GClueCompass *compass)
{
- compass->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (compass,
- GCLUE_TYPE_COMPASS,
- GClueCompassPrivate);
+ compass->priv = gclue_compass_get_instance_private(compass);
compass->priv->cancellable = g_cancellable_new ();
compass_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
diff --git a/src/gclue-config.c b/src/gclue-config.c
index 7330762..fb18f7d 100644
--- a/src/gclue-config.c
+++ b/src/gclue-config.c
@@ -320,10 +320,7 @@ gclue_config_init (GClueConfig *config)
{
GError *error = NULL;
- config->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (config,
- GCLUE_TYPE_CONFIG,
- GClueConfigPrivate);
+ config->priv = gclue_config_get_instance_private(config);
config->priv->key_file = g_key_file_new ();
g_key_file_load_from_file (config->priv->key_file,
CONFIG_FILE_PATH,
diff --git a/src/gclue-location-source.c b/src/gclue-location-source.c
index 09028eb..7229f04 100644
--- a/src/gclue-location-source.c
+++ b/src/gclue-location-source.c
@@ -276,10 +276,7 @@ gclue_location_source_class_init (GClueLocationSourceClass *klass)
static void
gclue_location_source_init (GClueLocationSource *source)
{
- source->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (source,
- GCLUE_TYPE_LOCATION_SOURCE,
- GClueLocationSourcePrivate);
+ source->priv = gclue_location_source_get_instance_private (source);
source->priv->compute_movement = TRUE;
source->priv->time_threshold = gclue_min_uint_new ();
}
diff --git a/src/gclue-location.c b/src/gclue-location.c
index dd14568..864f74e 100644
--- a/src/gclue-location.c
+++ b/src/gclue-location.c
@@ -392,9 +392,7 @@ gclue_location_class_init (GClueLocationClass *klass)
static void
gclue_location_init (GClueLocation *location)
{
- location->priv = G_TYPE_INSTANCE_GET_PRIVATE ((location),
- GCLUE_TYPE_LOCATION,
- GClueLocationPrivate);
+ location->priv = gclue_location_get_instance_private (location);
location->priv->altitude = GCLUE_LOCATION_ALTITUDE_UNKNOWN;
location->priv->accuracy = GCLUE_LOCATION_ACCURACY_UNKNOWN;
diff --git a/src/gclue-locator.c b/src/gclue-locator.c
index 1097938..ec3d004 100644
--- a/src/gclue-locator.c
+++ b/src/gclue-locator.c
@@ -427,10 +427,7 @@ gclue_locator_class_init (GClueLocatorClass *klass)
static void
gclue_locator_init (GClueLocator *locator)
{
- locator->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (locator,
- GCLUE_TYPE_LOCATOR,
- GClueLocatorPrivate);
+ locator->priv = gclue_locator_get_instance_private (locator);
}
static GClueLocationSourceStartResult
diff --git a/src/gclue-min-uint.c b/src/gclue-min-uint.c
index 3d88f89..558bfd7 100644
--- a/src/gclue-min-uint.c
+++ b/src/gclue-min-uint.c
@@ -134,9 +134,7 @@ gclue_min_uint_class_init (GClueMinUINTClass *klass)
static void
gclue_min_uint_init (GClueMinUINT *muint)
{
- muint->priv = G_TYPE_INSTANCE_GET_PRIVATE (muint,
- GCLUE_TYPE_MIN_UINT,
- GClueMinUINTPrivate);
+ muint->priv = gclue_min_uint_get_instance_private (muint);
muint->priv->all_values = g_hash_table_new (g_direct_hash,
g_direct_equal);
muint->priv->notify_value = TRUE;
diff --git a/src/gclue-modem-gps.c b/src/gclue-modem-gps.c
index 53ea1b4..9e073af 100644
--- a/src/gclue-modem-gps.c
+++ b/src/gclue-modem-gps.c
@@ -155,7 +155,7 @@ gclue_modem_gps_init (GClueModemGPS *source)
GClueModemGPSPrivate *priv;
GClueMinUINT *threshold;
- source->priv = G_TYPE_INSTANCE_GET_PRIVATE ((source), GCLUE_TYPE_MODEM_GPS, GClueModemGPSPrivate);
+ source->priv = gclue_modem_gps_get_instance_private (source);
priv = source->priv;
priv->cancellable = g_cancellable_new ();
diff --git a/src/gclue-modem-manager.c b/src/gclue-modem-manager.c
index ef95ba2..b3c4b57 100644
--- a/src/gclue-modem-manager.c
+++ b/src/gclue-modem-manager.c
@@ -796,9 +796,7 @@ gclue_modem_manager_constructed (GObject *object)
static void
gclue_modem_manager_init (GClueModemManager *manager)
{
- manager->priv = G_TYPE_INSTANCE_GET_PRIVATE ((manager),
- GCLUE_TYPE_MODEM_MANAGER,
- GClueModemManagerPrivate);
+ manager->priv = gclue_modem_manager_get_instance_private (manager);
}
static void
diff --git a/src/gclue-nmea-source.c b/src/gclue-nmea-source.c
index 1d6016b..77e309d 100644
--- a/src/gclue-nmea-source.c
+++ b/src/gclue-nmea-source.c
@@ -696,9 +696,7 @@ gclue_nmea_source_init (GClueNMEASource *source)
GClueConfig *config;
int error;
- source->priv = G_TYPE_INSTANCE_GET_PRIVATE ((source),
- GCLUE_TYPE_NMEA_SOURCE,
- GClueNMEASourcePrivate);
+ source->priv = gclue_nmea_source_get_instance_private (source);
priv = source->priv;
glib_poll = avahi_glib_poll_new (NULL, G_PRIORITY_DEFAULT);
diff --git a/src/gclue-service-client.c b/src/gclue-service-client.c
index 3e68f55..5a3e6f8 100644
--- a/src/gclue-service-client.c
+++ b/src/gclue-service-client.c
@@ -943,9 +943,7 @@ gclue_service_client_initable_iface_init (GInitableIface *iface)
static void
gclue_service_client_init (GClueServiceClient *client)
{
- client->priv = G_TYPE_INSTANCE_GET_PRIVATE (client,
- GCLUE_TYPE_SERVICE_CLIENT,
- GClueServiceClientPrivate);
+ client->priv = gclue_service_client_get_instance_private (client);
gclue_dbus_client_set_requested_accuracy_level
(GCLUE_DBUS_CLIENT (client), DEFAULT_ACCURACY_LEVEL);
}
diff --git a/src/gclue-service-location.c b/src/gclue-service-location.c
index c2c1991..214406e 100644
--- a/src/gclue-service-location.c
+++ b/src/gclue-service-location.c
@@ -348,9 +348,7 @@ gclue_service_location_class_init (GClueServiceLocationClass *klass)
static void
gclue_service_location_init (GClueServiceLocation *location)
{
- location->priv = G_TYPE_INSTANCE_GET_PRIVATE (location,
- GCLUE_TYPE_SERVICE_LOCATION,
- GClueServiceLocationPrivate);
+ location->priv = gclue_service_location_get_instance_private (location);
gclue_dbus_location_set_altitude (GCLUE_DBUS_LOCATION (location),
GCLUE_LOCATION_ALTITUDE_UNKNOWN);
}
diff --git a/src/gclue-service-manager.c b/src/gclue-service-manager.c
index 020c2af..efcf5ce 100644
--- a/src/gclue-service-manager.c
+++ b/src/gclue-service-manager.c
@@ -658,9 +658,7 @@ gclue_service_manager_class_init (GClueServiceManagerClass *klass)
static void
gclue_service_manager_init (GClueServiceManager *manager)
{
- manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager,
- GCLUE_TYPE_SERVICE_MANAGER,
- GClueServiceManagerPrivate);
+ manager->priv = gclue_service_manager_get_instance_private (manager);
manager->priv->agents = g_hash_table_new_full (g_direct_hash,
g_direct_equal,
diff --git a/src/gclue-web-source.c b/src/gclue-web-source.c
index 4e2f89f..a63b770 100644
--- a/src/gclue-web-source.c
+++ b/src/gclue-web-source.c
@@ -310,7 +310,7 @@ gclue_web_source_class_init (GClueWebSourceClass *klass)
static void
gclue_web_source_init (GClueWebSource *web)
{
- web->priv = G_TYPE_INSTANCE_GET_PRIVATE ((web), GCLUE_TYPE_WEB_SOURCE, GClueWebSourcePrivate);
+ web->priv = gclue_web_source_get_instance_private (web);
}
/**
diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c
index 2c1e34b..3cdc6e5 100644
--- a/src/gclue-wifi.c
+++ b/src/gclue-wifi.c
@@ -864,7 +864,7 @@ on_interface_removed (WPASupplicant *supplicant,
static void
gclue_wifi_init (GClueWifi *wifi)
{
- wifi->priv = G_TYPE_INSTANCE_GET_PRIVATE ((wifi), GCLUE_TYPE_WIFI, GClueWifiPrivate);
+ wifi->priv = gclue_wifi_get_instance_private (wifi);
wifi->priv->bss_proxies = g_hash_table_new_full (g_str_hash,
g_str_equal,