summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kcm_gtk/kcmgtk.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/kcm_gtk/kcmgtk.cpp b/kcm_gtk/kcmgtk.cpp
index 9ff9b79..9532bb2 100644
--- a/kcm_gtk/kcmgtk.cpp
+++ b/kcm_gtk/kcmgtk.cpp
@@ -232,13 +232,19 @@ void KcmGtk::getInstalledThemes()
}
}
+ bool installed = false;
widget->styleBox->clear();
TQStringList otherStyles = themes.keys();
- otherStyles.remove(otherStyles.find("Qt"));
- widget->styleBox->insertStringList(otherStyles);
-
- bool installed = (themes.find("Qt") != themes.end());
+ if(!otherStyles.empty()) {
+ otherStyles.remove(otherStyles.find("Qt"));
+ installed = !otherStyles.empty();
+ }
+ if(installed) {
+ widget->styleBox->insertStringList(otherStyles);
+ }
widget->styleKde->setEnabled(installed);
+ widget->styleBox->setEnabled(installed);
+ widget->styleOther->setEnabled(installed);
widget->warning1->setHidden(installed);
widget->warning2->setHidden(installed);
widget->warning3->setHidden(installed);
@@ -261,13 +267,19 @@ void KcmGtk::getInstalledThemes()
}
}
+ bool gtk3installed = false;
widget->styleBox3->clear();
TQStringList otherGtk3Styles = gtk3Themes.keys();
- otherGtk3Styles.remove(otherGtk3Styles.find("tdegtk"));
- widget->styleBox3->insertStringList(otherGtk3Styles);
-
- bool gtk3installed = (gtk3Themes.find("tdegtk") != gtk3Themes.end());
+ if(!otherGtk3Styles.empty()) {
+ otherGtk3Styles.remove(otherGtk3Styles.find("tdegtk"));
+ gtk3installed = !otherGtk3Styles.empty();
+ }
+ if(gtk3installed) {
+ widget->styleBox3->insertStringList(otherGtk3Styles);
+ }
widget->styleKde3->setEnabled(gtk3installed);
+ widget->styleBox3->setEnabled(gtk3installed);
+ widget->styleOther3->setEnabled(gtk3installed);
widget->warning4->setHidden(gtk3installed);
widget->warning5->setHidden(gtk3installed);
widget->warning6->setHidden(gtk3installed);