aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-09 15:04:30 -0500
committerTed Gould <ted@gould.cx>2010-07-09 15:04:30 -0500
commitfb4da4abb85c6c9ada6c47766bb46445617db440 (patch)
tree74325ee2c28c3b1389265a41ff72ad69e2ee2c5e /src
parenta8aac3aa0fd375c258579df7bc9db031900966dd (diff)
parent1ddd622e7f2ab0142c826459e1a38fec926c4dc6 (diff)
downloadlibayatana-appindicator-fb4da4abb85c6c9ada6c47766bb46445617db440.tar.gz
libayatana-appindicator-fb4da4abb85c6c9ada6c47766bb46445617db440.tar.bz2
libayatana-appindicator-fb4da4abb85c6c9ada6c47766bb46445617db440.zip
Sync to trunk
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c8
-rw-r--r--src/application-service-appstore.c22
-rw-r--r--src/application-service-appstore.h3
3 files changed, 19 insertions, 14 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index bc43e58..32f512f 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -1408,12 +1408,12 @@ container_iterate (GtkWidget *widget,
container_iterate,
child);
g_signal_connect_object (submenu,
- "add",
+ "child-added",
G_CALLBACK (submenu_changed),
child,
0);
g_signal_connect_object (submenu,
- "remove",
+ "child-removed",
G_CALLBACK (submenu_changed),
child,
0);
@@ -1552,11 +1552,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);
}
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);