rem: if(kapp->isRestored()) RESTORE(KMMainWin) else { mainWin = new KMMainWin; assert( mainWin != NULL); mainWin->show();
add: if (kapp->isRestored()){ int n = 1; while (KTMainWindow::canBeRestored(n)){  if (KTMainWindow::classNameOfToplevel(n) == "KMMainWin") (new KMMainWin)->restore(n); n++;
context: main(int argc, char *argv[]){  KMMainWin* mainWin;  init(argc, argv);  // filterMgr->dump();  if (argc > 1)    processArgs(argc-1, argv+1);  if (!mailto)  {    if(kapp->isRestored())      RESTORE(KMMainWin)	else 	  {	  mainWin = new KMMainWin;	  assert( mainWin != NULL);	  mainWin->show();  	  }  }  if (checkNewMail) acctMgr->checkMail();  recoverDeadLetters();  if (firstStart)  {    KMSettings* dlg = new KMSettings;    assert(dlg != NULL);    dlg->show();  }  app->exec();  cleanup();}