summaryrefslogtreecommitdiffstats
path: root/redhat/tdelibs/tdelibs-3.5.13.2-cups_by_default.patch
blob: dfb472ee10d8e10ef3c002757d43aa45d14ac6bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- ./kdeprint/kmfactory.cpp.ORI	2013-05-09 00:14:51.664045869 +0200
+++ ./kdeprint/kmfactory.cpp	2013-05-09 00:16:59.154367127 +0200
@@ -249,8 +249,21 @@
 		conf->writeEntry("PrintSystem", sys);
 		conf->sync();
 	}
-	else if ( sys.length()==1 && sys[0].isDigit() ) // discard old-style settings
+	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;
 }
 
@@ -278,6 +291,7 @@
 	{
 		KConfig	*conf = printConfig();
 		conf->setGroup("General");
+		conf->writeEntry("AlwaysSearch","no");
 		conf->writeEntry("PrintSystem", syst);
 		conf->sync();