Codebase list xapp / 2e8b628
xapp-status-icon.c: Don't warn when trying to set the name property to NULL during construction. Michael Webster 3 years ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11571157 XAPP_STATUS_ICON (object)->priv->icon_size = CLAMP (g_value_get_int (value), 0, MAX_SANE_ICON_SIZE);
11581158 break;
11591159 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
11601169 xapp_status_icon_set_name (XAPP_STATUS_ICON (object), g_value_get_string (value));
11611170 break;
11621171 default:
14991508
15001509 if (name == NULL || name[0] == '\0')
15011510 {
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.
15021514 g_warning ("Can't set icon the name to null or empty string");
15031515 return;
15041516 }