xapp-status-icon.c: Don't warn when trying to set the name property
to NULL during construction.
Michael Webster
3 years ago
1157 | 1157 | XAPP_STATUS_ICON (object)->priv->icon_size = CLAMP (g_value_get_int (value), 0, MAX_SANE_ICON_SIZE); |
1158 | 1158 | break; |
1159 | 1159 | case PROP_NAME: |
1160 | { | |
1161 | const gchar *name = g_value_get_string (value); | |
1162 | // Can't be null. We set to g_get_application_name() by default. | |
1163 | if (name == NULL || name[0] == '\0') | |
1164 | { | |
1165 | break; | |
1166 | } | |
1167 | } | |
1168 | ||
1160 | 1169 | xapp_status_icon_set_name (XAPP_STATUS_ICON (object), g_value_get_string (value)); |
1161 | 1170 | break; |
1162 | 1171 | default: |
1499 | 1508 | |
1500 | 1509 | if (name == NULL || name[0] == '\0') |
1501 | 1510 | { |
1511 | // name can't be null. We set to g_get_application_name() at startup, | |
1512 | // and the set_property handler silently ignores nulls, but if this | |
1513 | // is explicit, warn about it. | |
1502 | 1514 | g_warning ("Can't set icon the name to null or empty string"); |
1503 | 1515 | return; |
1504 | 1516 | } |