--- kdelibs-3.5.8/kdeprint/kmfactory.cpp.orig 2007-12-17 11:21:40.000000000 -0200 +++ kdelibs-3.5.8/kdeprint/kmfactory.cpp 2007-12-17 11:21:49.000000000 -0200 @@ -226,6 +226,7 @@ void KMFactory::loadFactory(const QStrin KConfig* KMFactory::printConfig(const QString& group) { + //exit(0); if (!m_printconfig) { m_printconfig = new KConfig("kdeprintrc"); @@ -251,6 +252,19 @@ QString KMFactory::printSystem() } else if ( sys.length()==1 && sys[0].isDigit() ) // discard old-style settings sys = "lpdunix"; + else{ + //Always Autodetect + //it will not try autodetect if user changes any option + //when user force some option, AlwaysSearch will be "no" and then + //kprinter will not to try autodetect again. + if(conf->readEntry("AlwaysSearch") != "no" ){ + sys = autoDetect(); + conf->writeEntry("PrintSystem",sys); + conf->writeEntry("AlwaysSearch","yes"); + conf->sync(); + } + + } return sys; } @@ -276,8 +290,10 @@ void KMFactory::reload(const QString& sy unload(); if (saveSyst) { - KConfig *conf = printConfig(); + KConfig *conf = printConfig(); conf->setGroup("General"); + + conf->writeEntry("AlwaysSearch","no"); conf->writeEntry("PrintSystem", syst); conf->sync();