Use correct Window/Page titles for categories
authorSebastian Goth <seezer@roath.org>
Sat, 14 Mar 2009 14:38:23 +0000 (15:38 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 15 Mar 2009 16:17:42 +0000 (17:17 +0100)
src/qtui/settingsdlg.cpp

index f260fb0..d1db2ce 100644 (file)
@@ -95,8 +95,15 @@ void SettingsDlg::selectPage(SettingsPage *sp) {
   }
 
   if(sp != currentPage()) {
-    ui.pageTitle->setText(sp->title());
-    setWindowTitle(tr("Configure %1").arg(sp->title()));
+    if(sp->title().isEmpty()) {
+      ui.pageTitle->setText(sp->category());
+      setWindowTitle(tr("Configure %1").arg(sp->category()));
+    }
+    else {
+      ui.pageTitle->setText(sp->title());
+      setWindowTitle(tr("Configure %1").arg(sp->title()));
+    }
+
     ui.settingsStack->setCurrentWidget(sp);
     _currentPage = sp;
   }