aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-05 10:05:10 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-05 10:05:10 +0000
commita734066d76c5b62438c617212ec942a3b9909837 (patch)
tree93e25afec921ddd23f4b1814ceba7ad081b7a21d
parente8073fda9f024d25810ffee79aaf5f52024fd53e (diff)
downloadlibayatana-indicator-a734066d76c5b62438c617212ec942a3b9909837.tar.gz
libayatana-indicator-a734066d76c5b62438c617212ec942a3b9909837.tar.bz2
libayatana-indicator-a734066d76c5b62438c617212ec942a3b9909837.zip
GObject private API/ABI: Get rid of g_type_class_add_private() and use DEFINE_TYPE_WITH_PRIVATE().
-rw-r--r--libayatana-indicator/indicator-desktop-shortcuts.c28
-rw-r--r--libayatana-indicator/indicator-object.c28
-rw-r--r--libayatana-indicator/indicator-service-manager.c34
-rw-r--r--libayatana-indicator/indicator-service.c30
4 files changed, 59 insertions, 61 deletions
diff --git a/libayatana-indicator/indicator-desktop-shortcuts.c b/libayatana-indicator/indicator-desktop-shortcuts.c
index 0806321..b380145 100644
--- a/libayatana-indicator/indicator-desktop-shortcuts.c
+++ b/libayatana-indicator/indicator-desktop-shortcuts.c
@@ -80,8 +80,6 @@ indicator_desktop_shortcuts_class_init (IndicatorDesktopShortcutsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (IndicatorDesktopShortcutsPrivate));
-
object_class->dispose = indicator_desktop_shortcuts_dispose;
object_class->finalize = indicator_desktop_shortcuts_finalize;
@@ -109,7 +107,7 @@ indicator_desktop_shortcuts_class_init (IndicatorDesktopShortcutsClass *klass)
static void
indicator_desktop_shortcuts_init (IndicatorDesktopShortcuts *self)
{
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(self);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(self);
priv->keyfile = NULL;
priv->identity = NULL;
@@ -124,7 +122,8 @@ indicator_desktop_shortcuts_init (IndicatorDesktopShortcuts *self)
static void
indicator_desktop_shortcuts_dispose (GObject *object)
{
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(object);
+ IndicatorDesktopShortcuts * desktop_shortcuts = INDICATOR_DESKTOP_SHORTCUTS(object);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(desktop_shortcuts);
if (priv->keyfile) {
g_key_file_free(priv->keyfile);
@@ -139,7 +138,8 @@ indicator_desktop_shortcuts_dispose (GObject *object)
static void
indicator_desktop_shortcuts_finalize (GObject *object)
{
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(object);
+ IndicatorDesktopShortcuts * desktop_shortcuts = INDICATOR_DESKTOP_SHORTCUTS(object);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(desktop_shortcuts);
if (priv->identity != NULL) {
g_free(priv->identity);
@@ -170,7 +170,8 @@ static void
set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec)
{
g_return_if_fail(INDICATOR_IS_DESKTOP_SHORTCUTS(object));
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(object);
+ IndicatorDesktopShortcuts * desktop_shortcuts = INDICATOR_DESKTOP_SHORTCUTS(object);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(desktop_shortcuts);
switch(prop_id) {
case PROP_DESKTOP_FILE: {
@@ -208,7 +209,7 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
}
priv->keyfile = keyfile;
- parse_keyfile(INDICATOR_DESKTOP_SHORTCUTS(object));
+ parse_keyfile(desktop_shortcuts);
break;
}
case PROP_IDENTITY:
@@ -217,7 +218,7 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
return;
}
priv->identity = g_value_dup_string(value);
- parse_keyfile(INDICATOR_DESKTOP_SHORTCUTS(object));
+ parse_keyfile(desktop_shortcuts);
break;
/* *********************** */
default:
@@ -233,7 +234,8 @@ static void
get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec)
{
g_return_if_fail(INDICATOR_IS_DESKTOP_SHORTCUTS(object));
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(object);
+ IndicatorDesktopShortcuts * desktop_shortcuts = INDICATOR_DESKTOP_SHORTCUTS(object);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(desktop_shortcuts);
switch(prop_id) {
case PROP_IDENTITY:
@@ -253,7 +255,7 @@ get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspe
static void
parse_keyfile (IndicatorDesktopShortcuts * ids)
{
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(ids);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(ids);
if (priv->keyfile == NULL) {
return;
@@ -475,7 +477,7 @@ const gchar **
indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids)
{
g_return_val_if_fail(INDICATOR_IS_DESKTOP_SHORTCUTS(ids), NULL);
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(ids);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(ids);
return (const gchar **)priv->nicks->data;
}
@@ -497,7 +499,7 @@ gchar *
indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, const gchar * nick)
{
g_return_val_if_fail(INDICATOR_IS_DESKTOP_SHORTCUTS(ids), NULL);
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(ids);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(ids);
g_return_val_if_fail(priv->actions != ACTIONS_NONE, NULL);
g_return_val_if_fail(priv->keyfile != NULL, NULL);
@@ -574,7 +576,7 @@ indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts *
gchar * current_dir = NULL;
g_return_val_if_fail(INDICATOR_IS_DESKTOP_SHORTCUTS(ids), FALSE);
- IndicatorDesktopShortcutsPrivate * priv = INDICATOR_DESKTOP_SHORTCUTS_GET_PRIVATE(ids);
+ IndicatorDesktopShortcutsPrivate * priv = indicator_desktop_shortcuts_get_instance_private(ids);
g_return_val_if_fail(priv->actions != ACTIONS_NONE, FALSE);
g_return_val_if_fail(priv->keyfile != NULL, FALSE);
diff --git a/libayatana-indicator/indicator-object.c b/libayatana-indicator/indicator-object.c
index 0a1a04e..7e16130 100644
--- a/libayatana-indicator/indicator-object.c
+++ b/libayatana-indicator/indicator-object.c
@@ -74,9 +74,6 @@ struct _IndicatorObjectPrivate {
GStrv environments;
};
-#define INDICATOR_OBJECT_GET_PRIVATE(o) (INDICATOR_OBJECT(o)->priv)
-
-
/* Signals Stuff */
enum {
ENTRY_ADDED,
@@ -118,7 +115,7 @@ static void indicator_object_entry_was_added (IndicatorObject*, IndicatorObj
static gint indicator_object_real_get_position (IndicatorObject*);
static IndicatorObjectEntryPrivate * entry_get_private (IndicatorObject*, IndicatorObjectEntry*);
-G_DEFINE_TYPE (IndicatorObject, indicator_object, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (IndicatorObject, indicator_object, G_TYPE_OBJECT);
/* Setup the class and put the functions into the
class structure */
@@ -127,8 +124,6 @@ indicator_object_class_init (IndicatorObjectClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (IndicatorObjectPrivate));
-
object_class->dispose = indicator_object_dispose;
object_class->finalize = indicator_object_finalize;
object_class->set_property = set_property;
@@ -304,7 +299,7 @@ indicator_object_class_init (IndicatorObjectClass *klass)
static void
indicator_object_init (IndicatorObject *self)
{
- IndicatorObjectPrivate * priv = G_TYPE_INSTANCE_GET_PRIVATE (self, INDICATOR_OBJECT_TYPE, IndicatorObjectPrivate);
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(self);
priv->module = NULL;
@@ -360,7 +355,9 @@ module_unref (gpointer data)
static void
indicator_object_finalize (GObject *object)
{
- IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(object);
+
+ IndicatorObject * obj = INDICATOR_OBJECT (object);
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(obj);
if (priv->entry_privates != NULL) {
g_hash_table_destroy (priv->entry_privates);
@@ -466,9 +463,11 @@ indicator_object_new_from_file (const gchar * file)
}
/* Now we can track the module */
- INDICATOR_OBJECT_GET_PRIVATE(object)->module = module;
+ IndicatorObject * obj = INDICATOR_OBJECT(object);
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(obj);
+ priv->module = module;
- return INDICATOR_OBJECT(object);
+ return obj;
/* Error, let's drop the object and return NULL. Sad when
this happens. */
@@ -487,7 +486,7 @@ unrefandout:
static GList *
get_entries_default (IndicatorObject * io)
{
- IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(io);
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(io);
if (!priv->gotten_entries) {
IndicatorObjectClass * class = INDICATOR_OBJECT_GET_CLASS(io);
@@ -603,7 +602,8 @@ indicator_object_get_entries (IndicatorObject * io)
GList * l;
GList * ret = NULL;
GList * all_entries = get_all_entries (io);
- const gboolean default_visibility = INDICATOR_OBJECT_GET_PRIVATE(io)->default_visibility;
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(io);
+ const gboolean default_visibility = priv->default_visibility;
for (l=all_entries; l!=NULL; l=l->next)
{
@@ -900,7 +900,7 @@ get_property (GObject * object,
IndicatorObject * self = INDICATOR_OBJECT(object);
g_return_if_fail(self != NULL);
- IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(self);
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(self);
g_return_if_fail(priv != NULL);
switch (prop_id) {
@@ -928,7 +928,7 @@ set_property (GObject * object,
IndicatorObject * self = INDICATOR_OBJECT(object);
g_return_if_fail (self != NULL);
- IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(self);
+ IndicatorObjectPrivate * priv = indicator_object_get_instance_private(self);
g_return_if_fail (priv != NULL);
diff --git a/libayatana-indicator/indicator-service-manager.c b/libayatana-indicator/indicator-service-manager.c
index a427954..e1772fa 100644
--- a/libayatana-indicator/indicator-service-manager.c
+++ b/libayatana-indicator/indicator-service-manager.c
@@ -87,10 +87,6 @@ enum {
static GDBusNodeInfo * node_info = NULL;
static GDBusInterfaceInfo * interface_info = NULL;
-/* GObject Stuff */
-#define INDICATOR_SERVICE_MANAGER_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerPrivate))
-
static void indicator_service_manager_class_init (IndicatorServiceManagerClass *klass);
static void indicator_service_manager_init (IndicatorServiceManager *self);
static void indicator_service_manager_dispose (GObject *object);
@@ -105,7 +101,7 @@ static void unwatch (GDBusProxy * proxy);
static void service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data);
static void service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_name, const gchar * object_path, const gchar * interface_name, const gchar * signal_name, GVariant * parameters, gpointer user_data);
-G_DEFINE_TYPE (IndicatorServiceManager, indicator_service_manager, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (IndicatorServiceManager, indicator_service_manager, G_TYPE_OBJECT);
/* Build all of our signals and proxies and tie everything
all together. Lovely. */
@@ -114,8 +110,6 @@ indicator_service_manager_class_init (IndicatorServiceManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (IndicatorServiceManagerPrivate));
-
object_class->dispose = indicator_service_manager_dispose;
object_class->finalize = indicator_service_manager_finalize;
@@ -181,7 +175,7 @@ indicator_service_manager_class_init (IndicatorServiceManagerClass *klass)
static void
indicator_service_manager_init (IndicatorServiceManager *self)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(self);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(self);
/* Get the private variables in a decent state */
priv->name = NULL;
@@ -204,7 +198,8 @@ indicator_service_manager_init (IndicatorServiceManager *self)
static void
indicator_service_manager_dispose (GObject *object)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(object);
+ IndicatorServiceManager * sm = INDICATOR_SERVICE_MANAGER(object);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(sm);
/* Removing the idle task to restart if it exists. */
if (priv->restart_source != 0) {
@@ -263,7 +258,8 @@ indicator_service_manager_dispose (GObject *object)
static void
indicator_service_manager_finalize (GObject *object)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(object);
+ IndicatorServiceManager * sm = INDICATOR_SERVICE_MANAGER(object);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(sm);
if (priv->name != NULL) {
g_free(priv->name);
@@ -282,7 +278,7 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
IndicatorServiceManager * self = INDICATOR_SERVICE_MANAGER(object);
g_return_if_fail(self != NULL);
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(self);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(self);
g_return_if_fail(priv != NULL);
switch (prop_id) {
@@ -316,7 +312,7 @@ get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspe
IndicatorServiceManager * self = INDICATOR_SERVICE_MANAGER(object);
g_return_if_fail(self != NULL);
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(self);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(self);
g_return_if_fail(priv != NULL);
switch (prop_id) {
@@ -363,7 +359,7 @@ static void
watch_cb (GObject * object, GAsyncResult * res, gpointer user_data)
{
GError * error = NULL;
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(user_data);
GVariant * params = g_dbus_proxy_call_finish(G_DBUS_PROXY(object), res, &error);
@@ -421,7 +417,7 @@ watch_cb (GObject * object, GAsyncResult * res, gpointer user_data)
static void
start_service (IndicatorServiceManager * service)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(service);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(service);
g_return_if_fail(priv->name != NULL);
@@ -463,7 +459,7 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(user_data);
if (priv->service_proxy_cancel != NULL) {
g_object_unref(priv->service_proxy_cancel);
@@ -534,7 +530,7 @@ service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_n
gpointer user_data)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(user_data);
const gchar * new_name = NULL;
const gchar * prev_name = NULL;
@@ -580,7 +576,7 @@ service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_n
static gboolean
start_service_again_cb (gpointer data)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(data);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(data);
priv->restart_count++;
g_debug("Restarting service '%s' count %d", priv->name, priv->restart_count);
start_service(INDICATOR_SERVICE_MANAGER(data));
@@ -595,7 +591,7 @@ start_service_again_cb (gpointer data)
static void
start_service_again (IndicatorServiceManager * manager)
{
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(manager);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(manager);
/* If we've already got a restart source running then
let's not do this again. */
@@ -683,7 +679,7 @@ gboolean
indicator_service_manager_connected (IndicatorServiceManager * sm)
{
g_return_val_if_fail(INDICATOR_IS_SERVICE_MANAGER(sm), FALSE);
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(sm);
+ IndicatorServiceManagerPrivate * priv = indicator_service_manager_get_instance_private(sm);
return priv->connected;
}
diff --git a/libayatana-indicator/indicator-service.c b/libayatana-indicator/indicator-service.c
index 1cd6964..9caa347 100644
--- a/libayatana-indicator/indicator-service.c
+++ b/libayatana-indicator/indicator-service.c
@@ -108,15 +108,13 @@ static GDBusInterfaceVTable interface_table = {
};
/* THE define */
-G_DEFINE_TYPE (IndicatorService, indicator_service, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (IndicatorService, indicator_service, G_TYPE_OBJECT);
static void
indicator_service_class_init (IndicatorServiceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (IndicatorServicePrivate));
-
object_class->dispose = indicator_service_dispose;
object_class->finalize = indicator_service_finalize;
@@ -184,7 +182,7 @@ indicator_service_class_init (IndicatorServiceClass *klass)
static void
indicator_service_init (IndicatorService *self)
{
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(self);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(self);
/* Get the private variables in a decent state */
priv->name = NULL;
@@ -231,7 +229,8 @@ indicator_service_init (IndicatorService *self)
static void
indicator_service_dispose (GObject *object)
{
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(object);
+ IndicatorService * service = INDICATOR_SERVICE(object);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(service);
g_clear_pointer (&priv->watchers, g_hash_table_destroy);
@@ -263,7 +262,8 @@ indicator_service_dispose (GObject *object)
static void
indicator_service_finalize (GObject *object)
{
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(object);
+ IndicatorService * service = INDICATOR_SERVICE(object);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(service);
g_free (priv->name);
g_clear_pointer (&priv->watchers, g_hash_table_destroy);
@@ -280,7 +280,7 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
IndicatorService * self = INDICATOR_SERVICE(object);
g_return_if_fail(self != NULL);
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(self);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(self);
g_return_if_fail(priv != NULL);
switch (prop_id) {
@@ -318,7 +318,7 @@ get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspe
IndicatorService * self = INDICATOR_SERVICE(object);
g_return_if_fail(self != NULL);
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(self);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(self);
g_return_if_fail(priv != NULL);
switch (prop_id) {
@@ -357,7 +357,7 @@ bus_get_cb (GObject * object, GAsyncResult * res, gpointer user_data)
return;
}
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(user_data);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(user_data);
g_warn_if_fail(priv->bus == NULL);
priv->bus = connection;
@@ -439,7 +439,7 @@ try_and_get_name_acquired_cb (GDBusConnection * connection, const gchar * name,
g_return_if_fail(connection != NULL);
g_return_if_fail(INDICATOR_IS_SERVICE(user_data));
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(user_data);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(user_data);
/* Check to see if we already had a timer, if so we want to
extend it a bit. */
@@ -463,7 +463,7 @@ try_and_get_name_lost_cb (GDBusConnection * connection, const gchar * name, gpoi
g_return_if_fail(connection != NULL);
g_return_if_fail(INDICATOR_IS_SERVICE(user_data));
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(user_data);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(user_data);
if (!priv->replace_mode) {
g_warning("Name request failed.");
@@ -498,7 +498,7 @@ try_and_get_name_lost_cb (GDBusConnection * connection, const gchar * name, gpoi
static void
try_and_get_name (IndicatorService * service)
{
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(service);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(service);
g_return_if_fail(priv->name != NULL);
g_bus_own_name(G_BUS_TYPE_SESSION,
@@ -519,7 +519,7 @@ static void
watcher_vanished_cb (GDBusConnection * connection, const gchar * name, gpointer user_data)
{
g_return_if_fail(INDICATOR_IS_SERVICE(user_data));
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(user_data);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(user_data);
gpointer finddata = g_hash_table_lookup(priv->watchers, name);
if (finddata != NULL) {
@@ -539,7 +539,7 @@ static GVariant *
bus_watch (IndicatorService * service, const gchar * sender)
{
g_return_val_if_fail(INDICATOR_IS_SERVICE(service), NULL);
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(service);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(service);
if (GPOINTER_TO_UINT(g_hash_table_lookup(priv->watchers, sender)) == 0) {
guint watch = g_bus_watch_name_on_connection(priv->bus,
@@ -574,7 +574,7 @@ unwatch_core (IndicatorService * service, const gchar * name)
g_return_if_fail(name != NULL);
g_return_if_fail(INDICATOR_IS_SERVICE(service));
- IndicatorServicePrivate * priv = INDICATOR_SERVICE_GET_PRIVATE(service);
+ IndicatorServicePrivate * priv = indicator_service_get_instance_private(service);
/* Remove us from the watcher list here */
gpointer watcher_item = g_hash_table_lookup(priv->watchers, name);