Categories in the settings dialog are now clickable
[quassel.git] / src / qtui / mainwin.cpp
index 5a7b77f..53324dd 100644 (file)
@@ -55,6 +55,7 @@
 #include "inputwidget.h"
 #include "inputline.h"
 #include "irclistmodel.h"
+#include "ircconnectionwizard.h"
 #include "jumpkeyhandler.h"
 #include "msgprocessorstatuswidget.h"
 #include "nicklistwidget.h"
@@ -199,13 +200,18 @@ MainWin::~MainWin() {
   s.setValue("MainWinState", saveState());
 }
 
-// FIXME
 void MainWin::updateIcon() {
+#ifdef Q_WS_MAC
+  const int size = 128;
+#else
+  const int size = 48;
+#endif
+
   QPixmap icon;
   if(Client::isConnected())
-    icon = DesktopIcon("quassel", IconLoader::SizeEnormous);
+    icon = DesktopIcon("quassel", size);
   else
-    icon = DesktopIcon("quassel_disconnected", IconLoader::SizeEnormous);
+    icon = DesktopIcon("quassel_inactive", size);
   setWindowIcon(icon);
   qApp->setWindowIcon(icon);
 }
@@ -601,6 +607,11 @@ void MainWin::setConnectedState() {
   coreLagLabel->setVisible(!Client::internalCore());
   updateIcon();
   systemTray()->setState(SystemTray::Active);
+
+  if(Client::networkIds().isEmpty()) {
+    IrcConnectionWizard *wizard = new IrcConnectionWizard(this, Qt::Sheet);
+    wizard->show();
+  }
 }
 
 void MainWin::loadLayout() {
@@ -711,20 +722,20 @@ void MainWin::showSettingsDlg() {
   SettingsDlg *dlg = new SettingsDlg();
 
   //Category: Appearance
+  dlg->registerSettingsPage(new AppearanceSettingsPage(dlg)); //General
   dlg->registerSettingsPage(new ColorSettingsPage(dlg));
   dlg->registerSettingsPage(new FontsSettingsPage(dlg));
-  dlg->registerSettingsPage(new AppearanceSettingsPage(dlg)); //General
-  //Category: Behaviour
-  dlg->registerSettingsPage(new GeneralSettingsPage(dlg));
-  dlg->registerSettingsPage(new BacklogSettingsPage(dlg));
   dlg->registerSettingsPage(new HighlightSettingsPage(dlg));
-  dlg->registerSettingsPage(new AliasesSettingsPage(dlg));
   dlg->registerSettingsPage(new NotificationsSettingsPage(dlg));
+  dlg->registerSettingsPage(new BacklogSettingsPage(dlg));
+  dlg->registerSettingsPage(new BufferViewSettingsPage(dlg));
   dlg->registerSettingsPage(new ChatMonitorSettingsPage(dlg));
-  //Category: General
+
+  //Category: Misc
+  dlg->registerSettingsPage(new GeneralSettingsPage(dlg));
   dlg->registerSettingsPage(new IdentitiesSettingsPage(dlg));
   dlg->registerSettingsPage(new NetworksSettingsPage(dlg));
-  dlg->registerSettingsPage(new BufferViewSettingsPage(dlg));
+  dlg->registerSettingsPage(new AliasesSettingsPage(dlg));
 
   dlg->show();
 }
@@ -773,8 +784,8 @@ void MainWin::toggleMinimizedToTray() {
     // restore
     setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
     show();
+    activateWindow();
     raise();
-    
   } else {
     setWindowState((windowState() & ~Qt::WindowActive) | Qt::WindowMinimized);
     hideToTray();