void gs_category_tile_set_category (GsCategoryTile *tile, GsCategory *cat) { g_return_if_fail (GS_IS_CATEGORY_TILE (tile)); g_return_if_fail (GS_IS_CATEGORY (cat)); g_clear_object (&tile->cat); tile->cat = g_object_ref (cat); gtk_label_set_label (GTK_LABEL (tile->label), gs_category_get_name (cat)); }
void gs_category_tile_set_category (GsCategoryTile *tile, GsCategory *cat) { GsCategoryTilePrivate *priv; g_return_if_fail (GS_IS_CATEGORY_TILE (tile)); g_return_if_fail (GS_IS_CATEGORY (cat)); priv = gs_category_tile_get_instance_private (tile); g_clear_object (&priv->cat); priv->cat = g_object_ref (cat); gtk_label_set_label (GTK_LABEL (priv->label), gs_category_get_name (cat)); }