From 34a4af960f7d98d178e2f56f93837bcb68a78758 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 11 Jun 2010 16:01:32 -0500 Subject: Changing the signal names --- src/libappindicator/app-indicator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index f7e121b..f13e7f6 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -1364,12 +1364,12 @@ container_iterate (GtkWidget *widget, container_iterate, child); g_signal_connect_object (submenu, - "add", + "GtkContainer::child-added", G_CALLBACK (submenu_changed), child, 0); g_signal_connect_object (submenu, - "remove", + "GtkContainer::child-removed", G_CALLBACK (submenu_changed), child, 0); -- cgit v1.2.3 From 95c79072099f677f140c8d4b6525c9c9e858b972 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 11 Jun 2010 16:40:42 -0500 Subject: Changing signal names and getting the ones on the base menu as well. --- src/libappindicator/app-indicator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index f13e7f6..03819ca 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -1364,12 +1364,12 @@ container_iterate (GtkWidget *widget, container_iterate, child); g_signal_connect_object (submenu, - "GtkContainer::child-added", + "child-added", G_CALLBACK (submenu_changed), child, 0); g_signal_connect_object (submenu, - "GtkContainer::child-removed", + "child-removed", G_CALLBACK (submenu_changed), child, 0); @@ -1506,11 +1506,11 @@ app_indicator_set_menu (AppIndicator *self, GtkMenu *menu) check_connect (self); g_signal_connect (menu, - "add", + "child-added", G_CALLBACK (client_menu_changed), self); g_signal_connect (menu, - "remove", + "child-removed", G_CALLBACK (client_menu_changed), self); } -- cgit v1.2.3 From 925e3d8fea64fecdb16ce4a83750abb414f8687b Mon Sep 17 00:00:00 2001 From: Sense Hofstede Date: Thu, 8 Jul 2010 20:45:51 +0200 Subject: Removed all but one calls to the APPLICATION_SERVICE_APPSTORE_GET_PRIVATE() macro All references to the APPLICATION_SERVICE_APPSTORE_GET_PRIVATE() macro were removed from src/application-service-appstore.c. This makes this file comply with the recommended practise, which should reduce overhead. --- src/application-service-appstore.c | 22 ++++++++++++---------- src/application-service-appstore.h | 3 +++ 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 15abea3..886fe92 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -50,7 +50,6 @@ static gboolean _application_service_server_get_applications (ApplicationService #define NOTIFICATION_ITEM_SIG_NEW_STATUS "NewStatus" /* Private Stuff */ -typedef struct _ApplicationServiceAppstorePrivate ApplicationServiceAppstorePrivate; struct _ApplicationServiceAppstorePrivate { DBusGConnection * bus; GList * applications; @@ -139,7 +138,8 @@ application_service_appstore_class_init (ApplicationServiceAppstoreClass *klass) static void application_service_appstore_init (ApplicationServiceAppstore *self) { - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(self); + + ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE (self); priv->applications = NULL; priv->lrufile = NULL; @@ -155,6 +155,8 @@ application_service_appstore_init (ApplicationServiceAppstore *self) dbus_g_connection_register_g_object(priv->bus, INDICATOR_APPLICATION_DBUS_OBJ, G_OBJECT(self)); + + self->priv = priv; return; } @@ -162,7 +164,7 @@ application_service_appstore_init (ApplicationServiceAppstore *self) static void application_service_appstore_dispose (GObject *object) { - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(object); + ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE(object)->priv; while (priv->applications != NULL) { application_service_appstore_application_remove(APPLICATION_SERVICE_APPSTORE(object), @@ -209,7 +211,7 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err app->id = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ID)); app->category = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_CATEGORY)); - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(app->appstore); + ApplicationServiceAppstorePrivate * priv = app->appstore->priv; app_lru_file_touch(priv->lrufile, app->id, app->category); app->icon = g_value_dup_string(g_hash_table_lookup(properties, NOTIFICATION_ITEM_PROP_ICON_NAME)); @@ -265,7 +267,7 @@ string_to_status(const gchar * status_string) static gint get_position (Application * app) { ApplicationServiceAppstore * appstore = app->appstore; - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + ApplicationServiceAppstorePrivate * priv = appstore->priv; GList * applistitem = g_list_find(priv->applications, app); if (applistitem == NULL) { @@ -384,7 +386,7 @@ apply_status (Application * app, AppIndicatorStatus status) g_debug("Changing app status to: %d", status); ApplicationServiceAppstore * appstore = app->appstore; - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + ApplicationServiceAppstorePrivate * priv = appstore->priv; /* This means we're going off line */ if (status == APP_INDICATOR_STATUS_PASSIVE) { @@ -567,7 +569,7 @@ application_service_appstore_application_add (ApplicationServiceAppstore * appst g_return_if_fail(IS_APPLICATION_SERVICE_APPSTORE(appstore)); g_return_if_fail(dbus_name != NULL && dbus_name[0] != '\0'); g_return_if_fail(dbus_object != NULL && dbus_object[0] != '\0'); - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + ApplicationServiceAppstorePrivate * priv = appstore->priv; /* Build the application entry. This will be carried along until we're sure we've got everything. */ @@ -665,7 +667,7 @@ application_service_appstore_application_remove (ApplicationServiceAppstore * ap g_return_if_fail(dbus_name != NULL && dbus_name[0] != '\0'); g_return_if_fail(dbus_object != NULL && dbus_object[0] != '\0'); - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + ApplicationServiceAppstorePrivate * priv = appstore->priv; GList * listpntr; for (listpntr = priv->applications; listpntr != NULL; listpntr = g_list_next(listpntr)) { @@ -687,7 +689,7 @@ application_service_appstore_new (AppLruFile * lrufile) { g_return_val_if_fail(IS_APP_LRU_FILE(lrufile), NULL); ApplicationServiceAppstore * appstore = APPLICATION_SERVICE_APPSTORE(g_object_new(APPLICATION_SERVICE_APPSTORE_TYPE, NULL)); - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + ApplicationServiceAppstorePrivate * priv = appstore->priv; priv->lrufile = lrufile; return appstore; } @@ -696,7 +698,7 @@ application_service_appstore_new (AppLruFile * lrufile) static gboolean _application_service_server_get_applications (ApplicationServiceAppstore * appstore, GPtrArray ** apps, GError ** error) { - ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE(appstore); + ApplicationServiceAppstorePrivate * priv = appstore->priv; *apps = g_ptr_array_new(); GList * listpntr; diff --git a/src/application-service-appstore.h b/src/application-service-appstore.h index d2e0013..86d989b 100644 --- a/src/application-service-appstore.h +++ b/src/application-service-appstore.h @@ -38,6 +38,7 @@ G_BEGIN_DECLS typedef struct _ApplicationServiceAppstore ApplicationServiceAppstore; typedef struct _ApplicationServiceAppstoreClass ApplicationServiceAppstoreClass; +typedef struct _ApplicationServiceAppstorePrivate ApplicationServiceAppstorePrivate; struct _ApplicationServiceAppstoreClass { GObjectClass parent_class; @@ -49,6 +50,8 @@ struct _ApplicationServiceAppstoreClass { struct _ApplicationServiceAppstore { GObject parent; + + ApplicationServiceAppstorePrivate * priv; }; ApplicationServiceAppstore * application_service_appstore_new (AppLruFile * lrufile); -- cgit v1.2.3