We compute the spectral function A(k,omega) of a model two-dimensional high-temperature superconductor at both zero and finite temperatures T. The model consists of a two-dimensional BCS Hamiltonian with d-wave symmetry, which has a spatially varying, thermally fluctuating, complex gap Delta. Thermal fluctuations are governed by a Ginzburg-Landau free energy functional. We assume that an areal fraction c(beta) of the superconductor has a large Delta (beta regions), while the rest has a smaller Delta (alpha regions), both of which are randomly distributed in space. We find that A(k,omega) is most strongly affected by inhomogeneity near the point k=(pi,0) (and the symmetry-related points). For c(beta)similar or equal to 0.5, A(k,omega) exhibits two double peaks (at positive and negative energies) near this k point if the difference between Delta(alpha) and Delta(beta) is sufficiently large in comparison to the hopping integral; otherwise, it has only two broadened single peaks. The strength of the inhomogeneity required to produce a split spectral function peak suggests that inhomogeneity is unlikely to be the cause of a second branch in the dispersion relation, such as has been reported in underdoped LSCO. Thermal fluctuations also affect A(k,omega) most strongly near k=(pi,0). Typically, peaks that are sharp at T=0 become reduced in height, broadened, and shifted toward lower energies with increasing T; the spectral weight near k=(pi,0) becomes substantial at zero energy for T greater than the phase-ordering temperature.