diff options
author | Ted Gould <ted@gould.cx> | 2010-06-17 17:04:52 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-06-17 17:04:52 -0500 |
commit | 28a5a2e19999186d31cfbd1b5b00e84fac5209f9 (patch) | |
tree | f7c9afc0349e32c1a90831608f45f2eb29c4602c | |
parent | 6ee70d2127b676b6663fedc6f63a8b5df20b67a4 (diff) | |
parent | e589ecaddf4d14e9aeea5aed9f4076b1447cc926 (diff) | |
download | libayatana-appindicator-28a5a2e19999186d31cfbd1b5b00e84fac5209f9.tar.gz libayatana-appindicator-28a5a2e19999186d31cfbd1b5b00e84fac5209f9.tar.bz2 libayatana-appindicator-28a5a2e19999186d31cfbd1b5b00e84fac5209f9.zip |
* Upstream Merge
* Fixing the enum lookup from nick
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | src/application-service-appstore.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 31a707a..393d7b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +indicator-application (0.2.0-0ubuntu4~ppa2~icons2) UNRELEASED; urgency=low + + * Upstream Merge + * Fixing the enum lookup from nick + + -- Ted Gould <ted@ubuntu.com> Thu, 17 Jun 2010 17:04:32 -0500 + indicator-application (0.2.0-0ubuntu4~ppa2~icons1) lucid; urgency=low * Upstream Merge diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 66943b5..c18ebe2 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -243,7 +243,13 @@ get_all_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * err static AppIndicatorStatus string_to_status(const gchar * status_string) { - return (AppIndicatorStatus) g_enum_get_value_by_nick((GEnumClass *)g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_STATUS), status_string); + GEnumClass * klass = G_ENUM_CLASS(g_type_class_peek_static(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; } /* A small helper function to get the position of an application |