diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-06-21 16:57:36 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-06-21 16:57:36 -0400 |
commit | 90a541060c81dc3f93a55889a719afb624ecd605 (patch) | |
tree | 7a4756e76cd59d33587872ca84824d6457a9d949 /src/application-service-appstore.c | |
parent | c6734d217e6c9f7e9d1702d3e454b6291732a0b8 (diff) | |
parent | 61a4f68d7b8aa49dced6eb6afffd6273a95a9d03 (diff) | |
download | libayatana-appindicator-90a541060c81dc3f93a55889a719afb624ecd605.tar.gz libayatana-appindicator-90a541060c81dc3f93a55889a719afb624ecd605.tar.bz2 libayatana-appindicator-90a541060c81dc3f93a55889a719afb624ecd605.zip |
* New upstream release.
* Fix icon updating (LP: #594199)
* Change Mono bindings to only parse particular files (LP: #592706)
* Make a policy for migrating the mono bindings
* Test fixes to make them more reliable
* debian/control: Fixing version numbers
* debian/control: Making the 0.1-cil replace and provide the 0.0-cil
* debian/libappindicator0.1-cil.installcligac: Add the policy.dll
file to the install.
* Upstream release 0.0.2
* Updates API to use GTK instead of dbusmenu to make it
easier for upstream developers to use.
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r-- | src/application-service-appstore.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 66943b5..15abea3 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -243,7 +243,21 @@ 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_ref(APP_INDICATOR_TYPE_INDICATOR_STATUS)); + g_return_val_if_fail(klass != NULL, APP_INDICATOR_STATUS_PASSIVE); + + AppIndicatorStatus retval = APP_INDICATOR_STATUS_PASSIVE; + + GEnumValue * val = g_enum_get_value_by_nick(klass, status_string); + if (val == NULL) { + g_warning("Unrecognized status '%s' assuming passive.", status_string); + } else { + retval = (AppIndicatorStatus)val->value; + } + + g_type_class_unref(klass); + + return retval; } /* A small helper function to get the position of an application |