2003-12-29 17:28:13 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2003 Dirk Mueller <mueller@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2005-10-05 08:44:32 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-12-29 17:28:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include <qregexp.h>
|
|
|
|
#include <qlayout.h>
|
|
|
|
#include <kstandarddirs.h>
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kfiledialog.h>
|
|
|
|
#include <kurlrequester.h>
|
|
|
|
#include <kdebug.h>
|
|
|
|
|
|
|
|
#include <kapplication.h>
|
|
|
|
#include <dcopclient.h>
|
|
|
|
#include <kprocio.h>
|
2005-10-22 10:44:47 +00:00
|
|
|
#include <ktoolinvocation.h>
|
2003-12-29 17:28:13 +00:00
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2004-11-22 03:00:19 +00:00
|
|
|
KDE_EXPORT void init_nsplugin()
|
2003-12-29 17:28:13 +00:00
|
|
|
{
|
|
|
|
KConfig *config = new KConfig("kcmnspluginrc", true /* readonly */, false /* no globals*/);
|
|
|
|
config->setGroup("Misc");
|
2006-01-03 14:01:15 +00:00
|
|
|
bool scan = config->readEntry( "startkdeScan", QVariant(false )).toBool();
|
|
|
|
bool firstTime = config->readEntry( "firstTime", QVariant(true )).toBool();
|
2003-12-29 17:28:13 +00:00
|
|
|
delete config;
|
|
|
|
|
2004-01-04 19:59:26 +00:00
|
|
|
if ( scan || firstTime )
|
2003-12-29 17:28:13 +00:00
|
|
|
{
|
2005-10-22 10:44:47 +00:00
|
|
|
KToolInvocation::kdeinitExec("nspluginscan");
|
2003-12-29 17:28:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (firstTime) {
|
|
|
|
config= new KConfig("kcmnspluginrc", false);
|
|
|
|
config->setGroup("Misc");
|
|
|
|
config->writeEntry( "firstTime", false );
|
|
|
|
config->sync();
|
|
|
|
delete config;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|