File psi-0.15-signing-presence-optional.patch of Package psi

diff -ruN ./src/accountmodifydlg.cpp ../psi-0.15.signing/src/accountmodifydlg.cpp
--- ./src/accountmodifydlg.cpp	2012-10-04 09:53:03.000000000 +0900
+++ ../psi-0.15.signing/src/accountmodifydlg.cpp	2012-10-10 15:05:25.092834000 +0900
@@ -154,7 +154,8 @@
 	if(PGPUtil::instance().pgpAvailable()) {
 		gb_pgp->setEnabled(true);
 	}
-
+	ck_sign->setChecked(acc.pgp_sign);
+	
 	pc = ProxyManager::instance()->createProxyChooser(tab_connection);
 	replaceWidget(lb_proxychooser, pc);
 	pc->setCurrentItem(acc.proxyID);
@@ -530,6 +531,7 @@
 	acc.stunPass = le_stunPass->text();
 
 	acc.pgpSecretKey = key;
+	acc.pgp_sign = ck_sign->isChecked();
 
 	acc.proxyID = pc->currentItem();
 
diff -ruN ./src/accountmodify.ui ../psi-0.15.signing/src/accountmodify.ui
--- ./src/accountmodify.ui	2012-10-04 09:53:03.000000000 +0900
+++ ../psi-0.15.signing/src/accountmodify.ui	2012-10-10 15:04:49.216833998 +0900
@@ -331,6 +331,23 @@
             </item>
            </layout>
           </item>
+	  <item>
+           <layout class="QHBoxLayout">
+            <property name="spacing">
+             <number>6</number>
+            </property>
+            <property name="margin">
+             <number>0</number>
+            </property>
+            <item>
+             <widget class="QCheckBox" name="ck_sign">
+              <property name="text">
+               <string>Sign presence status</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
          </layout>
         </widget>
        </item>
diff -ruN ./src/profiles.h ../psi-0.15.signing/src/profiles.h
--- ./src/profiles.h	2012-10-04 09:53:03.000000000 +0900
+++ ../psi-0.15.signing/src/profiles.h	2012-10-10 15:05:47.724834004 +0900
@@ -74,7 +74,8 @@
 	QMap<QString, GroupData> groupState;
 
 	QCA::PGPKey pgpSecretKey;
-
+	bool pgp_sign;
+	
 	VarList keybind;
 
 	XMPP::Jid dtProxy;
diff -ruN ./src/psiaccount.cpp ../psi-0.15.signing/src/psiaccount.cpp
--- ./src/psiaccount.cpp	2012-10-04 09:53:03.000000000 +0900
+++ ../psi-0.15.signing/src/psiaccount.cpp	2012-10-10 15:07:21.988834001 +0900
@@ -2829,7 +2829,7 @@
 	//printf("setting status to [%s]\n", s.status().latin1());
 
 	// using pgp?
-	if(!d->cur_pgpSecretKey.isNull()) {
+	if(!d->cur_pgpSecretKey.isNull() && d->acc.pgp_sign) {
 		d->loginStatus = s;
 
 		// sign presence
diff -ruN ./src/psi_profiles.cpp ../psi-0.15.signing/src/psi_profiles.cpp
--- ./src/psi_profiles.cpp	2012-10-04 09:53:03.000000000 +0900
+++ ../psi-0.15.signing/src/psi_profiles.cpp	2012-10-10 15:06:59.156834001 +0900
@@ -141,6 +141,7 @@
 	opt_reconn = false;
 	opt_connectAfterSleep = false;
 	opt_ignoreSSLWarnings = false;
+	pgp_sign = false;
 
 	proxy_index = 0;
 	proxy_type = PROXY_NONE;
@@ -238,6 +239,7 @@
 		if (!e.isNull())
 			pgpSecretKey = e.pgpSecretKey();
 	}
+	pgp_sign = o->getOption(base + ".pgp-sign").toBool();
 #endif
 
 	tmp = o->getOption(base + ".allow-plain").toString();
@@ -365,6 +367,8 @@
 	} else {
 		o->setOption(base + ".pgp-secret-key-id", "");
 	}
+	o->setOption(base + ".pgp-sign", pgp_sign);
+	
 	switch (allow_plain) {
 		case XMPP::ClientStream::NoAllowPlain:
 			o->setOption(base + ".allow-plain", "never");
@@ -538,6 +542,7 @@
 		if (!e.isNull())
 			pgpSecretKey = e.pgpSecretKey();
 	}
+	readBoolEntry(a, "pgpSign", &pgp_sign);
 #endif
 
 	QDomElement r = findSubTag(a, "roster", &found);