aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-17 22:17:25 -0500
committerTed Gould <ted@gould.cx>2010-06-17 22:17:25 -0500
commit985eb7069cdd508b7581aa22f1c616fb0161c599 (patch)
treec6299a3f033f9ed4e02e28ed74e3850b9afd34a3
parentc204273cea815bba2776ca8b508d4be174f9bdae (diff)
parentce25d4c9ac44237bb1f38576e99de3533489bd74 (diff)
downloadlibayatana-appindicator-985eb7069cdd508b7581aa22f1c616fb0161c599.tar.gz
libayatana-appindicator-985eb7069cdd508b7581aa22f1c616fb0161c599.tar.bz2
libayatana-appindicator-985eb7069cdd508b7581aa22f1c616fb0161c599.zip
* Upstream merge
* Using class_ref and unref to allocate the type if need be
-rw-r--r--debian/changelog7
-rw-r--r--src/application-service-appstore.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 75b95e3..01abf01 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+indicator-application (0.2.0-0ubuntu4~ppa2~icons3) UNRELEASED; urgency=low
+
+ * Upstream merge
+ * Using class_ref and unref to allocate the type if need be
+
+ -- Ted Gould <ted@ubuntu.com> Thu, 17 Jun 2010 22:16:47 -0500
+
indicator-application (0.2.0-0ubuntu4~ppa2~icons2) lucid; urgency=low
* Upstream Merge
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index c18ebe2..66e3cf3 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -243,13 +243,17 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err
static AppIndicatorStatus
string_to_status(const gchar * status_string)
{
- GEnumClass * klass = G_ENUM_CLASS(g_type_class_peek_static(APP_INDICATOR_TYPE_INDICATOR_STATUS));
+ GEnumClass * klass = G_ENUM_CLASS(g_type_class_ref(APP_INDICATOR_TYPE_INDICATOR_STATUS));
g_return_val_if_fail(klass != NULL, APP_INDICATOR_STATUS_PASSIVE);
GEnumValue * val = g_enum_get_value_by_nick(klass, status_string);
g_return_val_if_fail(val != NULL, APP_INDICATOR_STATUS_PASSIVE);
- return (AppIndicatorStatus)val->value;
+ AppIndicatorStatus retval = (AppIndicatorStatus)val->value;
+
+ g_type_class_unref(klass);
+
+ return retval;
}
/* A small helper function to get the position of an application