aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-28 09:53:02 -0500
committerTed Gould <ted@gould.cx>2011-09-28 09:53:02 -0500
commit61ce1240559e39b4ef2ff6d28b9a202bd8e45ff8 (patch)
tree05835318e337c3da0e094dcf745ad6d895ad5a1a /src
parente7d1dd3c138ddfab3a23d384a4c4c5f89cb408db (diff)
parentec05da4c7b67aa27d9da78027d4c7d826519c43b (diff)
downloadayatana-indicator-application-61ce1240559e39b4ef2ff6d28b9a202bd8e45ff8.tar.gz
ayatana-indicator-application-61ce1240559e39b4ef2ff6d28b9a202bd8e45ff8.tar.bz2
ayatana-indicator-application-61ce1240559e39b4ef2ff6d28b9a202bd8e45ff8.zip
Import upstream version 0.4.0
Diffstat (limited to 'src')
-rw-r--r--src/application-service-appstore.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index d59cfe9..edc517f 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -508,6 +508,14 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
else {
app->validated = TRUE;
+ /* It is possible we're coming through a second time and
+ getting the properties. So we need to ensure we don't
+ already have them stored */
+ g_free(app->id);
+ g_free(app->category);
+ g_free(app->icon);
+ g_free(app->menu);
+
app->id = g_variant_dup_string(id, NULL);
app->category = g_variant_dup_string(category, NULL);
app->status = string_to_status(g_variant_get_string(status, NULL));
@@ -516,10 +524,30 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
/* Now the optional properties */
+ g_free(app->icon_desc);
+ if (icon_desc != NULL) {
+ app->icon_desc = g_variant_dup_string(icon_desc, NULL);
+ }
+ else {
+ app->icon_desc = g_strdup("");
+ }
+
+ g_free(app->aicon);
if (aicon_name != NULL) {
app->aicon = g_variant_dup_string(aicon_name, NULL);
+ } else {
+ app->aicon = g_strdup("");
+ }
+
+ g_free(app->aicon_desc);
+ if (aicon_desc != NULL) {
+ app->aicon_desc = g_variant_dup_string(aicon_desc, NULL);
+ }
+ else {
+ app->aicon_desc = g_strdup("");
}
+ g_free(app->icon_theme_path);
if (icon_theme_path != NULL) {
app->icon_theme_path = g_variant_dup_string(icon_theme_path, NULL);
} else {
@@ -539,12 +567,14 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
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);
+ g_free(app->label);
if (label != NULL) {
app->label = g_variant_dup_string(label, NULL);
} else {
app->label = g_strdup("");
}
+ g_free(app->guide);
if (guide != NULL) {
app->guide = g_variant_dup_string(guide, NULL);
} else {
@@ -736,6 +766,9 @@ application_free (Application * app)
if (app->icon_desc != NULL) {
g_free(app->icon_desc);
}
+ if (app->aicon != NULL) {
+ g_free(app->aicon);
+ }
if (app->aicon_desc != NULL) {
g_free(app->aicon_desc);
}