Categories in the settings dialog are now clickable
[quassel.git] / src / qtui / settingspages / appearancesettingspage.cpp
index fc4674f..91e32a0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-08 by the Quassel IRC Team                         *
+ *   Copyright (C) 2005-09 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include <QStyleFactory>
 
 AppearanceSettingsPage::AppearanceSettingsPage(QWidget *parent)
-  : SettingsPage(tr("Appearance"), tr("General"), parent) {
+  : SettingsPage(tr("Appearance"), QString(), parent)
+{
   ui.setupUi(this);
   initStyleComboBox();
   initLanguageComboBox();
 
+#ifndef HAVE_WEBKIT
+  ui.showWebPreview->hide();
+  ui.showWebPreview->setEnabled(false);
+#endif
+
   foreach(QComboBox *comboBox, findChildren<QComboBox *>()) {
     connect(comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(widgetHasChanged()));
   }
@@ -52,7 +58,7 @@ void AppearanceSettingsPage::initStyleComboBox() {
 }
 
 void AppearanceSettingsPage::initLanguageComboBox() {
-  QDir i18nDir(":/i18n", "quassel_*.qm");
+  QDir i18nDir(Quassel::translationDirPath(), "quassel_*.qm");
 
   foreach(QString translationFile, i18nDir.entryList()) {
     QString localeName(translationFile.mid(8));
@@ -90,7 +96,7 @@ void AppearanceSettingsPage::load() {
     ui.languageComboBox->setCurrentIndex(1);
   else
     ui.languageComboBox->setCurrentIndex(ui.languageComboBox->findText(QLocale::languageToString(locale.language()), Qt::MatchExactly));
-  loadTranslation(selectedLocale());
+  Quassel::loadTranslation(selectedLocale());
 
   ChatViewSettings chatViewSettings;
   SettingsPage::load(ui.showWebPreview, chatViewSettings.showWebPreview());