While I agree that, yeah, had they not had time to prepare themselves before the 1877 war, they certainly could've suffered some losses (Bosnia and Herzogovinia, probably northern Bulgaria, etc.), but the Ottomans were catching on fairly quick to the whole nationalism thing-- one concept which the government failed to properly work out before the Russians charged in and the pan-Slavic nationalism really flared up was "Ottomanism", which tried to encourage an Ottoman national identity centered around the dynasty and the shared history of the empire.
Seems to have come too late to do much good in the Christian Balkan provinces, but had they stuck to their guns and continued to develop the concept (especially the more Islam-tinted variant proposed by the Young Ottomans) and coupled the greater automony of provinces with a solid parliamentary structure in Constantinople, I'd figure it likely that they might've been able to at least hold on to southern Bulgaria, Macedonia, Albania, and that whole south-central stretch of the Balkans.
I figure Egypt's mostly a lost cause by the 1870s, though. Too much French and British influence.