ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01635
[Merge] lp:~ted/indicator-application/icon-switching into lp:indicator-application
Ted Gould has proposed merging lp:~ted/indicator-application/icon-switching into lp:indicator-application.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Fix icon switching.
--
https://code.launchpad.net/~ted/indicator-application/icon-switching/+merge/27901
Your team ayatana-commits is subscribed to branch lp:indicator-application.
=== modified file 'src/app-indicator.c'
--- src/app-indicator.c 2010-05-23 10:44:53 +0000
+++ src/app-indicator.c 2010-06-18 03:24:31 +0000
@@ -229,7 +229,7 @@
"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:
=== modified file 'src/application-service-appstore.c'
--- src/application-service-appstore.c 2010-05-23 10:44:53 +0000
+++ src/application-service-appstore.c 2010-06-18 03:24:31 +0000
@@ -243,7 +243,17 @@
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);
+
+ GEnumValue * val = g_enum_get_value_by_nick(klass, status_string);
+ g_return_val_if_fail(val != NULL, APP_INDICATOR_STATUS_PASSIVE);
+
+ AppIndicatorStatus retval = (AppIndicatorStatus)val->value;
+
+ g_type_class_unref(klass);
+
+ return retval;
}
/* A small helper function to get the position of an application
Follow ups