diff options
author | Ted Gould <ted@gould.cx> | 2010-02-10 08:44:09 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-10 08:44:09 -0600 |
commit | f5b69fe95891fd20bdce7100701799c3f997f1d7 (patch) | |
tree | cb682aa3672767bc4fe814883aeec7990514f533 /src | |
parent | 370c87f0cfa8364d3efd66e229772e2db94b13dc (diff) | |
download | ayatana-indicator-application-f5b69fe95891fd20bdce7100701799c3f997f1d7.tar.gz ayatana-indicator-application-f5b69fe95891fd20bdce7100701799c3f997f1d7.tar.bz2 ayatana-indicator-application-f5b69fe95891fd20bdce7100701799c3f997f1d7.zip |
Making it so that you can't set an ID twice instead of just issuing a warning.
Diffstat (limited to 'src')
-rw-r--r-- | src/libappindicator/app-indicator.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index fb6e7dc..ea823ff 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -441,16 +441,15 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu switch (prop_id) { case PROP_ID: - if (priv->id != NULL) { - g_warning ("Resetting ID value when I already had a value of: %s", priv->id); - g_free (priv->id); - priv->id = NULL; - } + if (priv->id != NULL) { + g_warning ("Resetting ID value when I already had a value of: %s", priv->id); + break; + } - priv->id = g_strdup (g_value_get_string (value)); + priv->id = g_strdup (g_value_get_string (value)); - check_connect (self); - break; + check_connect (self); + break; case PROP_CATEGORY: enum_val = g_enum_get_value_by_nick ((GEnumClass *) g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_CATEGORY), |