Switch to side-by-side view

--- a/src/qtgui/main.cpp
+++ b/src/qtgui/main.cpp
@@ -1,5 +1,5 @@
 #ifndef lint
-static char rcsid[] = "@(#$Id: main.cpp,v 1.51 2006-09-28 11:55:30 dockes Exp $ (C) 2005 J.F.Dockes";
+static char rcsid[] = "@(#$Id: main.cpp,v 1.52 2006-10-11 14:16:26 dockes Exp $ (C) 2005 J.F.Dockes";
 #endif
 /*
  *   This program is free software; you can redistribute it and/or modify
@@ -18,6 +18,8 @@
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#include "autoconfig.h"
+
 #include <unistd.h>
 
 //#define WITH_KDE
@@ -51,6 +53,9 @@
 #endif
 #include "rclmain_w.h"
 #include "guiutils.h"
+#ifdef RCL_USE_ASPELL
+#include "rclaspell.h"
+#endif
 
 #ifdef WITH_KDE
 static const char description[] =
@@ -68,6 +73,9 @@
 
 RclConfig *rclconfig;
 Rcl::Db *rcldb;
+#ifdef RCL_USE_ASPELL
+Aspell *aspell;
+#endif
 
 RclHistory *g_dynconf;
 int recollNeedsExit;
@@ -123,6 +131,10 @@
     rcldb = 0;
     delete rclconfig;
     rclconfig = 0;
+#ifdef RCL_USE_ASPELL
+    delete aspell;
+    aspell = 0;
+#endif
     LOGDEB2(("recollCleanup: done\n"));
 }
 
@@ -214,6 +226,15 @@
     }
     //    fprintf(stderr, "recollinit done\n");
 
+#ifdef RCL_USE_ASPELL
+    aspell = new Aspell(rclconfig);
+    aspell->init(reason);
+    if (!aspell || !aspell->ok()) {
+	LOGDEB(("Aspell speller creation failed %s\n", reason.c_str()));
+	aspell = 0;
+    }
+#endif
+
     string historyfile = path_cat(rclconfig->getConfDir(), "history");
     g_dynconf = new RclHistory(historyfile);
     if (!g_dynconf || !g_dynconf->ok()) {