#include <qdir.h>
#include <kmsgbox.h>
#include <kapp.h>

#include "Editor.h"



///////////////////////////////////////////////////////
int main(int argc, char **argv)
{

		// prepare app and main widget
	KApplication a(argc, argv);

	if(argc <= 1)
	{
		warning("new file (<unnamed>)");
		Editor *e = new Editor(0, "editor", 0);
		e->show();
	}
	else
	{	
			// i == 0 is the name of the binary!
		for(int i = 1; i < argc; i++)
		{
			warning("edit file <%s>\n", argv[i]);
			Editor *e = new Editor(0, "editor", argv[i]);
			e->show();
		}
	}

	int retVal = a.exec();
	a.getConfig()->sync(); // doesn't work ?
	return retVal;
}
///////////////////////////////////////////////////////

