From 77cbd6e9576edc206b1610ea9495e502a3639068 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 9 May 2013 14:17:33 -0500 Subject: Fix theme manager overwriting undefined theme settings with garbage This resolves Bug 1174 Fix tderandrtray displaying profile list when only the default profile is available --- kcontrol/randr/tderandrtray.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kcontrol/randr/tderandrtray.cpp') diff --git a/kcontrol/randr/tderandrtray.cpp b/kcontrol/randr/tderandrtray.cpp index 87346818c..4d998efd7 100644 --- a/kcontrol/randr/tderandrtray.cpp +++ b/kcontrol/randr/tderandrtray.cpp @@ -280,14 +280,14 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu) // Find any display profiles TQStringList displayProfiles; displayProfiles = getDisplayConfigurationProfiles(locateLocal("config", "/", true)); - if (displayProfiles.isEmpty() == false) { + if (!displayProfiles.isEmpty()) { menu->insertTitle(SmallIcon("background"), i18n("Display Profiles")); - } - lastIndex = menu->insertItem(SmallIcon("bookmark"), ""); - menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int))); - for (TQStringList::Iterator t(displayProfiles.begin()); t != displayProfiles.end(); ++t) { - lastIndex = menu->insertItem(SmallIcon("bookmark"), *t); + lastIndex = menu->insertItem(SmallIcon("bookmark"), ""); menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int))); + for (TQStringList::Iterator t(displayProfiles.begin()); t != displayProfiles.end(); ++t) { + lastIndex = menu->insertItem(SmallIcon("bookmark"), *t); + menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int))); + } } } -- cgit v1.2.3