aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-27 10:11:25 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-27 10:11:25 +0000
commit8b967ee8465a58b13b0f588e7089bad36a1a337a (patch)
tree05ac939e3f36b027a05c872c6d7efda690bf0197
parent75ffda9ca2eb7708de33673d4a54c29de797e8ea (diff)
downloadayatana-indicator-application-8b967ee8465a58b13b0f588e7089bad36a1a337a.tar.gz
ayatana-indicator-application-8b967ee8465a58b13b0f588e7089bad36a1a337a.tar.bz2
ayatana-indicator-application-8b967ee8465a58b13b0f588e7089bad36a1a337a.zip
Avoid deprecated g_type_class_add_private.
-rw-r--r--src/application-service-appstore.c50
-rw-r--r--src/application-service-appstore.h3
-rw-r--r--src/application-service-watcher.c22
-rw-r--r--src/indicator-application.c56
4 files changed, 60 insertions, 71 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 56407da..9124fe3 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -64,13 +64,13 @@ static void props_cb (GObject * object, GAsyncResult * res, gpointer user_data);
#define OVERRIDE_FILE_NAME "ordering-override.keyfile"
/* Private Stuff */
-struct _ApplicationServiceAppstorePrivate {
+typedef struct {
GCancellable * bus_cancel;
GDBusConnection * bus;
guint dbus_registration;
GList * applications;
GHashTable * ordering_overrides;
-};
+} ApplicationServiceAppstorePrivate;
typedef enum {
VISIBLE_STATE_HIDDEN,
@@ -108,9 +108,6 @@ struct _Application {
guint name_watcher;
};
-#define APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), APPLICATION_SERVICE_APPSTORE_TYPE, ApplicationServiceAppstorePrivate))
-
/* GDBus Stuff */
static GDBusNodeInfo * node_info = NULL;
static GDBusInterfaceInfo * interface_info = NULL;
@@ -138,15 +135,13 @@ static void app_receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar *
static void get_all_properties (Application * app);
static void application_free (Application * app);
-G_DEFINE_TYPE (ApplicationServiceAppstore, application_service_appstore, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (ApplicationServiceAppstore, application_service_appstore, G_TYPE_OBJECT);
static void
application_service_appstore_class_init (ApplicationServiceAppstoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (ApplicationServiceAppstorePrivate));
-
object_class->dispose = application_service_appstore_dispose;
object_class->finalize = application_service_appstore_finalize;
@@ -176,7 +171,7 @@ static void
application_service_appstore_init (ApplicationServiceAppstore *self)
{
- ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE (self);
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(self);
priv->applications = NULL;
priv->bus_cancel = NULL;
@@ -195,8 +190,6 @@ application_service_appstore_init (ApplicationServiceAppstore *self)
bus_get_cb,
self);
- self->priv = priv;
-
return;
}
@@ -212,7 +205,7 @@ bus_get_cb (GObject * object, GAsyncResult * res, gpointer user_data)
return;
}
- ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE (user_data);
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(APPLICATION_SERVICE_APPSTORE(user_data));
g_warn_if_fail(priv->bus == NULL);
priv->bus = connection;
@@ -318,7 +311,7 @@ bus_method_call (GDBusConnection * connection, const gchar * sender,
static void
application_service_appstore_dispose (GObject *object)
{
- ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE(object)->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(APPLICATION_SERVICE_APPSTORE(object));
while (priv->applications != NULL) {
application_service_appstore_application_remove(APPLICATION_SERVICE_APPSTORE(object),
@@ -350,7 +343,7 @@ application_service_appstore_dispose (GObject *object)
static void
application_service_appstore_finalize (GObject *object)
{
- ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE(object)->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(APPLICATION_SERVICE_APPSTORE(object));
if (priv->ordering_overrides != NULL) {
g_hash_table_destroy(priv->ordering_overrides);
@@ -454,7 +447,7 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
return;
}
- ApplicationServiceAppstorePrivate * priv = app->appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(app->appstore);
/* Grab all properties from variant */
GVariantIter * iter = NULL;
@@ -559,7 +552,7 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
app->ordering_index = GPOINTER_TO_UINT(ordering_index_over);
}
g_debug("'%s' ordering index is '%X'", app->id, app->ordering_index);
- app->appstore->priv->applications = g_list_sort_with_data(app->appstore->priv->applications, app_sort_func, NULL);
+ priv->applications = g_list_sort_with_data(priv->applications, app_sort_func, NULL);
g_free(app->label);
if (label != NULL) {
@@ -670,8 +663,7 @@ string_to_cat(const gchar * cat_string)
in the app list of the applications that are visible. */
static gint
get_position (Application * app) {
- ApplicationServiceAppstore * appstore = app->appstore;
- ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(app->appstore);
GList * lapp;
gint count;
@@ -710,9 +702,11 @@ application_free (Application * app)
the proxy objects. */
if (app->currently_free) return;
app->currently_free = TRUE;
+
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(app->appstore);
/* Remove from the application list */
- app->appstore->priv->applications = g_list_remove(app->appstore->priv->applications, app);
+ priv->applications = g_list_remove(priv->applications, app);
if (app->name_watcher != 0) {
g_dbus_connection_signal_unsubscribe(g_dbus_proxy_get_connection(app->dbus_proxy), app->name_watcher);
@@ -814,7 +808,8 @@ static void
emit_signal (ApplicationServiceAppstore * appstore, const gchar * name,
GVariant * variant)
{
- ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(appstore);
+
GError * error = NULL;
g_dbus_connection_emit_signal (priv->bus,
@@ -1047,7 +1042,8 @@ application_service_appstore_application_add (ApplicationServiceAppstore * appst
dbus_proxy_cb,
app);
- appstore->priv->applications = g_list_insert_sorted_with_data (appstore->priv->applications, app, app_sort_func, NULL);
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(app->appstore);
+ priv->applications = g_list_insert_sorted_with_data (priv->applications, app, app_sort_func, NULL);
/* We're returning, nothing is yet added until the properties
come back and give us more info. */
@@ -1217,7 +1213,8 @@ app_receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name
static Application *
find_application (ApplicationServiceAppstore * appstore, const gchar * address, const gchar * object)
{
- ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(appstore);
+
GList * listpntr;
for (listpntr = priv->applications; listpntr != NULL; listpntr = g_list_next(listpntr)) {
@@ -1239,7 +1236,8 @@ find_application_by_menu (ApplicationServiceAppstore * appstore, const gchar * a
g_return_val_if_fail(address, NULL);
g_return_val_if_fail(menuobject, NULL);
- ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(appstore);
+
GList *l;
for (l = priv->applications; l != NULL; l = l->next) {
@@ -1275,7 +1273,8 @@ application_service_appstore_application_remove (ApplicationServiceAppstore * ap
gchar**
application_service_appstore_application_get_list (ApplicationServiceAppstore * appstore)
{
- ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(appstore);
+
gchar ** out;
gchar ** outpntr;
GList * listpntr;
@@ -1303,7 +1302,8 @@ application_service_appstore_new (void)
static GVariant *
get_applications (ApplicationServiceAppstore * appstore)
{
- ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ ApplicationServiceAppstorePrivate * priv = application_service_appstore_get_instance_private(appstore);
+
GVariant * out = NULL;
if (g_list_length(priv->applications) > 0) {
diff --git a/src/application-service-appstore.h b/src/application-service-appstore.h
index 7508658..84b1830 100644
--- a/src/application-service-appstore.h
+++ b/src/application-service-appstore.h
@@ -37,7 +37,6 @@ G_BEGIN_DECLS
typedef struct _ApplicationServiceAppstore ApplicationServiceAppstore;
typedef struct _ApplicationServiceAppstoreClass ApplicationServiceAppstoreClass;
-typedef struct _ApplicationServiceAppstorePrivate ApplicationServiceAppstorePrivate;
struct _ApplicationServiceAppstoreClass {
GObjectClass parent_class;
@@ -51,8 +50,6 @@ struct _ApplicationServiceAppstoreClass {
struct _ApplicationServiceAppstore {
GObject parent;
-
- ApplicationServiceAppstorePrivate * priv;
};
ApplicationServiceAppstore * application_service_appstore_new (void);
diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c
index 6449243..6e76434 100644
--- a/src/application-service-watcher.c
+++ b/src/application-service-watcher.c
@@ -54,14 +54,10 @@ static void get_name_cb (DBusGProxy * proxy, guint status, GError * error, gpoin
#include "ayatana-notification-watcher-server.h"
/* Private Stuff */
-typedef struct _ApplicationServiceWatcherPrivate ApplicationServiceWatcherPrivate;
-struct _ApplicationServiceWatcherPrivate {
+typedef struct {
ApplicationServiceAppstore * appstore;
DBusGProxy * dbus_proxy;
-};
-
-#define APPLICATION_SERVICE_WATCHER_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), APPLICATION_SERVICE_WATCHER_TYPE, ApplicationServiceWatcherPrivate))
+} ApplicationServiceWatcherPrivate;
/* Signals Stuff */
enum {
@@ -81,15 +77,13 @@ static void application_service_watcher_finalize (GObject *object);
static void application_service_watcher_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec);
static void application_service_watcher_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec);
-G_DEFINE_TYPE (ApplicationServiceWatcher, application_service_watcher, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (ApplicationServiceWatcher, application_service_watcher, G_TYPE_OBJECT);
static void
application_service_watcher_class_init (ApplicationServiceWatcherClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (ApplicationServiceWatcherPrivate));
-
object_class->dispose = application_service_watcher_dispose;
object_class->finalize = application_service_watcher_finalize;
@@ -152,7 +146,7 @@ application_service_watcher_class_init (ApplicationServiceWatcherClass *klass)
static void
application_service_watcher_init (ApplicationServiceWatcher *self)
{
- ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(self);
+ ApplicationServiceWatcherPrivate * priv = application_service_watcher_get_instance_private(self);
priv->appstore = NULL;
@@ -192,7 +186,7 @@ application_service_watcher_init (ApplicationServiceWatcher *self)
static void
application_service_watcher_dispose (GObject *object)
{
- ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(object);
+ ApplicationServiceWatcherPrivate * priv = application_service_watcher_get_instance_private(APPLICATION_SERVICE_WATCHER(object));
if (priv->appstore != NULL) {
g_object_unref(G_OBJECT(priv->appstore));
@@ -220,7 +214,7 @@ application_service_watcher_set_property (GObject * object, guint prop_id, const
static void
application_service_watcher_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec)
{
- ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(object);
+ ApplicationServiceWatcherPrivate * priv = application_service_watcher_get_instance_private(APPLICATION_SERVICE_WATCHER(object));
switch (prop_id) {
case PROP_PROTOCOL_VERSION:
g_value_set_int (value, CURRENT_PROTOCOL_VERSION);
@@ -238,7 +232,7 @@ ApplicationServiceWatcher *
application_service_watcher_new (ApplicationServiceAppstore * appstore)
{
GObject * obj = g_object_new(APPLICATION_SERVICE_WATCHER_TYPE, NULL);
- ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(obj);
+ ApplicationServiceWatcherPrivate * priv = application_service_watcher_get_instance_private(APPLICATION_SERVICE_WATCHER(obj));
priv->appstore = appstore;
g_object_ref(G_OBJECT(priv->appstore));
return APPLICATION_SERVICE_WATCHER(obj);
@@ -247,7 +241,7 @@ application_service_watcher_new (ApplicationServiceAppstore * appstore)
static gboolean
_ayatana_notification_watcher_server_register_status_notifier_item (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method)
{
- ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(appwatcher);
+ ApplicationServiceWatcherPrivate * priv = application_service_watcher_get_instance_private(appwatcher);
if (service[0] == '/') {
char * sender = dbus_g_method_get_sender(method);
diff --git a/src/indicator-application.c b/src/indicator-application.c
index fe9c703..24bdb92 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -73,8 +73,7 @@ INDICATOR_SET_TYPE(INDICATOR_APPLICATION_TYPE)
#include "config.h"
#endif
-typedef struct _IndicatorApplicationPrivate IndicatorApplicationPrivate;
-struct _IndicatorApplicationPrivate {
+typedef struct {
GCancellable * service_proxy_cancel;
GDBusProxy * service_proxy;
GList * applications;
@@ -82,7 +81,7 @@ struct _IndicatorApplicationPrivate {
guint disconnect_kill;
GCancellable * get_apps_cancel;
guint watch;
-};
+} IndicatorApplicationPrivate;
typedef struct _ApplicationEntry ApplicationEntry;
struct _ApplicationEntry {
@@ -95,9 +94,6 @@ struct _ApplicationEntry {
gchar * longname;
};
-#define INDICATOR_APPLICATION_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_APPLICATION_TYPE, IndicatorApplicationPrivate))
-
static void indicator_application_class_init (IndicatorApplicationClass *klass);
static void indicator_application_init (IndicatorApplication *self);
static void indicator_application_dispose (GObject *object);
@@ -124,15 +120,13 @@ static void icon_theme_remove_dir_from_search_path (const char * dir);
static void service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data);
static void receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, GVariant * parameters, gpointer user_data);
-G_DEFINE_TYPE (IndicatorApplication, indicator_application, INDICATOR_OBJECT_TYPE);
+G_DEFINE_TYPE_WITH_PRIVATE (IndicatorApplication, indicator_application, INDICATOR_OBJECT_TYPE);
static void
indicator_application_class_init (IndicatorApplicationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (IndicatorApplicationPrivate));
-
object_class->dispose = indicator_application_dispose;
object_class->finalize = indicator_application_finalize;
@@ -149,7 +143,7 @@ indicator_application_class_init (IndicatorApplicationClass *klass)
static void
indicator_application_init (IndicatorApplication *self)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(self);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(self);
/* These are built in the connection phase */
priv->service_proxy_cancel = NULL;
@@ -177,7 +171,7 @@ indicator_application_init (IndicatorApplication *self)
static void
indicator_application_dispose (GObject *object)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(object);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(object));
if (priv->disconnect_kill != 0) {
g_source_remove(priv->disconnect_kill);
@@ -241,7 +235,8 @@ connected (GDBusConnection * con, const gchar * name, const gchar * owner, gpoin
IndicatorApplication * application = INDICATOR_APPLICATION(user_data);
g_return_if_fail(application != NULL);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
+
g_debug("Connected to Application Indicator Service.");
if (priv->service_proxy_cancel == NULL && priv->service_proxy == NULL) {
@@ -272,7 +267,8 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
IndicatorApplication * self = INDICATOR_APPLICATION(user_data);
g_return_if_fail(self != NULL);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(self);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(self);
+
GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
if (priv->service_proxy_cancel != NULL) {
@@ -320,7 +316,7 @@ disconnected (GDBusConnection * con, const gchar * name, gpointer user_data)
IndicatorApplication * application = INDICATOR_APPLICATION(user_data);
g_return_if_fail(application != NULL);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
g_list_foreach(priv->applications, disconnected_helper, application);
/* I'll like this to be a little shorter, but it's a bit
inpractical to make it so. This means that the user will
@@ -345,7 +341,8 @@ static gboolean
disconnected_kill (gpointer user_data)
{
g_return_val_if_fail(IS_INDICATOR_APPLICATION(user_data), FALSE);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(user_data);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(user_data));
+
priv->disconnect_kill = 0;
g_list_foreach(priv->applications, disconnected_kill_helper, user_data);
return FALSE;
@@ -357,7 +354,7 @@ static void
disconnected_kill_helper (gpointer data, gpointer user_data)
{
g_return_if_fail(IS_INDICATOR_APPLICATION(user_data));
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(user_data);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(user_data));
ApplicationEntry * entry = (ApplicationEntry *)data;
if (entry->old_service) {
application_removed(INDICATOR_APPLICATION(user_data), g_list_index(priv->applications, data));
@@ -373,7 +370,8 @@ get_entries (IndicatorObject * io)
{
g_return_val_if_fail(IS_INDICATOR_APPLICATION(io), NULL);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(io);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(io));
+
GList * retval = NULL;
GList * apppointer = NULL;
@@ -394,7 +392,7 @@ static guint
get_location (IndicatorObject * io, IndicatorObjectEntry * entry)
{
g_return_val_if_fail(IS_INDICATOR_APPLICATION(io), 0);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(io);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(io));
return g_list_index(priv->applications, entry);
}
@@ -405,7 +403,7 @@ entry_secondary_activate (IndicatorObject * io, IndicatorObjectEntry * entry,
{
g_return_if_fail(IS_INDICATOR_APPLICATION(io));
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(io);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(io));
g_return_if_fail(priv->service_proxy);
GList *l = g_list_find(priv->applications, entry);
@@ -428,7 +426,7 @@ static void entry_scrolled (IndicatorObject * io, IndicatorObjectEntry * entry,
{
g_return_if_fail(IS_INDICATOR_APPLICATION(io));
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(io);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(INDICATOR_APPLICATION(io));
g_return_if_fail(priv->service_proxy);
GList *l = g_list_find(priv->applications, entry);
@@ -494,7 +492,7 @@ application_added (IndicatorApplication * application, const gchar * iconname, g
{
g_return_if_fail(IS_INDICATOR_APPLICATION(application));
g_debug("Building new application entry: %s with icon: %s at position %i", dbusaddress, iconname, position);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
ApplicationEntry * app = g_new0(ApplicationEntry, 1);
@@ -572,7 +570,7 @@ static void
application_removed (IndicatorApplication * application, gint position)
{
g_return_if_fail(IS_INDICATOR_APPLICATION(application));
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position);
if (app == NULL) {
@@ -624,7 +622,7 @@ application_removed (IndicatorApplication * application, gint position)
static void
application_label_changed (IndicatorApplication * application, gint position, const gchar * label, const gchar * guide)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position);
gboolean signal_reload = FALSE;
@@ -705,7 +703,7 @@ application_label_changed (IndicatorApplication * application, gint position, co
static void
application_icon_changed (IndicatorApplication * application, gint position, const gchar * iconname, const gchar * icondesc)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position);
if (app == NULL) {
@@ -753,7 +751,7 @@ application_icon_changed (IndicatorApplication * application, gint position, con
static void
application_icon_theme_path_changed (IndicatorApplication * application, gint position, const gchar * icon_theme_path)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(application);
ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position);
if (app == NULL) {
@@ -783,7 +781,7 @@ receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name,
GVariant * parameters, gpointer user_data)
{
IndicatorApplication * self = INDICATOR_APPLICATION(user_data);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(self);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(self);
/* If we're in the middle of a GetApplications call and we get
any of these our state is probably going to just be confused. Let's
@@ -868,7 +866,7 @@ static void
get_applications (GObject * obj, GAsyncResult * res, gpointer user_data)
{
IndicatorApplication * self = INDICATOR_APPLICATION(user_data);
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(self);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(self);
GError * error = NULL;
GVariant * result;
GVariant * child;
@@ -948,7 +946,7 @@ get_applications_helper (IndicatorApplication * self, GVariant * variant)
static void
theme_dir_unref(IndicatorApplication * ia, const gchar * dir)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(ia);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(ia);
if (!g_hash_table_contains (priv->theme_dirs, dir)) {
g_warning("Unref'd a directory '%s' that wasn't in the theme dir hash table.", dir);
@@ -1007,7 +1005,7 @@ icon_theme_remove_dir_from_search_path (const char * dir)
static void
theme_dir_ref(IndicatorApplication * ia, const gchar * dir)
{
- IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(ia);
+ IndicatorApplicationPrivate * priv = indicator_application_get_instance_private(ia);
int count = 0;
if ((count = GPOINTER_TO_INT(g_hash_table_lookup(priv->theme_dirs, dir))) != 0) {