aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-18 11:18:49 -0500
committerTed Gould <ted@gould.cx>2010-06-18 11:18:49 -0500
commit4eb17f90ec6c7b9c5cf332612cce8deadbe74907 (patch)
tree6e30727ec8e450433d153bfffbb4c0bce0e82928
parentceac80478668981f0e731955d35451154ee9b7eb (diff)
parent87d82b8a092ec250ba08c14e95e3309ae2cc4f39 (diff)
downloadlibayatana-appindicator-4eb17f90ec6c7b9c5cf332612cce8deadbe74907.tar.gz
libayatana-appindicator-4eb17f90ec6c7b9c5cf332612cce8deadbe74907.tar.bz2
libayatana-appindicator-4eb17f90ec6c7b9c5cf332612cce8deadbe74907.zip
* Upstream merge
* Fix icon updating (LP: #594199)
-rw-r--r--debian/changelog7
-rw-r--r--src/app-indicator.c2
-rw-r--r--src/application-service-appstore.c16
3 files changed, 23 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 667b0b5..cfef22a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+indicator-application (0.2.0-0ubuntu4~ppa3) UNRELEASED; urgency=low
+
+ * Upstream merge
+ * Fix icon updating (LP: #594199)
+
+ -- Ted Gould <ted@ubuntu.com> Fri, 18 Jun 2010 11:18:14 -0500
+
indicator-application (0.2.0-0ubuntu4~ppa2) lucid; urgency=low
* Upstream Merge
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 6c2a8d9..bc43e58 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -229,7 +229,7 @@ app_indicator_class_init (AppIndicatorClass *klass)
"An icon for the indicator",
"The default icon that is shown for the indicator.",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
AppIndicator:attention-icon-name:
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