rem: docker->dock();
add: if (KPostit::dock) docker->dock();
context: int main( int argc, char **argv ) {  FILE *fp;  int pid;  KPostit* postit;  // Torben  testDir( "/.kde" );  testDir( "/.kde/share" );  testDir( "/.kde/share/config" );  testDir( "/.kde/share/apps" );  testDir( "/.kde/share/apps/knotes" );  testDir( "/.kde/share/apps/knotes/notes" );  testDir( "/.kde/share/apps/knotes/xyalarms" );  QString p = getenv( "HOME" );  QString rcDir = p + "/.kde/share/apps/knotes";  pidFile = rcDir + "/knotes.pid";  XSetErrorHandler( knotes_x_errhandler );  XSetIOErrorHandler( knotes_xio_errhandler );  // if there is a pidFile then this is not the first instance of kpostit  if ( ( fp = fopen( pidFile, "r" ) ) != NULL )    {      fscanf( fp, "%d", &pid);      printf("pid %d\n",pid);      // if this fails I assume that the pid file is left over from a bad exit      // and continue on      //      if ( kill( pid, SIGUSR1 ) == 0){		// the kpostit is still alive	// it could however be zombi or a recycled pid -- use IPC instead.	exit(0);      }      fclose( fp );    }  catchSignals();  fp = fopen( pidFile, "w" );  fprintf( fp, "%d\n", getpid());  fclose( fp );  KApplication a(argc, argv, "knotes");  mykapp = &a;  readSettings();  findPostitFiles();  readalarms();  alarmConsistencyCheck();  mytimer = new MyTimer();  savetimer = new SaveTimer();  bool restoring = false;  if (QString("-knotes_restore") == (QString)argv[1]){    restoring = true;  }  if(KPostit::PostitFilesList.count() == 0 && !restoring){    KPostit::PostitFilesList.append("knote 1");  }  unsigned int i;  bool one_is_visible = false;  for (i=0; i<KPostit::PostitFilesList.count(); i++){    postit = new KPostit(NULL,NULL,0,KPostit::PostitFilesList.at(i));    KPostit::PostitList.append(postit);    if(!postit->hidden){      postit->show();      one_is_visible = true;    }  }  // manual session management (knotes alredy stores everything)  kapp->setTopWidget(new QWidget);  kapp->enableSessionManagement(true);  kapp->setWmCommand("knotes -knotes_restore");  docker = new DockWidget();  docker->dock();  return a.exec();}