[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeutils/kgpg
From:       Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date:       2011-04-18 6:24:20
Message-ID: 20110418062420.2CA48AC8D3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1228400 by dakon:

make the settings of the GnuPG binary manages by KConfigDialog

 M  +20 -19    conf_gpg.ui  
 M  +5 -14     kgpgoptions.cpp  
 M  +0 -1      kgpgoptions.h  


--- trunk/KDE/kdeutils/kgpg/conf_gpg.ui #1228399:1228400
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0" >
  <class>GPGConf</class>
  <widget class="QWidget" name="GPGConf" >
@@ -10,9 +11,9 @@
    </rect>
   </property>
   <property name="whatsThis" >
-   <string>&lt;qt>&lt;b>Global Settings:&lt;/b>&lt;br />
-&lt;p>&lt;/p>
-&lt;/qt></string>
+   <string>&lt;qt&gt;&lt;b&gt;Global Settings:&lt;/b&gt;&lt;br /&gt;
+&lt;p&gt;&lt;/p&gt;
+&lt;/qt&gt;</string>
   </property>
   <layout class="QVBoxLayout" >
    <item>
@@ -25,28 +26,28 @@
        <layout class="QVBoxLayout" >
         <item>
          <widget class="QLabel" name="textLabel1_5_2" >
+          <property name="whatsThis">
+           <string>&lt;b&gt;Home Location&lt;/b&gt;&lt;p&gt;This is the directory \
where GnuPG stores its configuration and the keyrings. If you have not changed it \
this is usually &lt;em&gt;~/.gnupg/&lt;/em&gt;&lt;/p&gt;</string> +          \
</property>  <property name="text" >
            <string>Home location:</string>
           </property>
           <property name="wordWrap" >
            <bool>false</bool>
           </property>
-          <property name="whatsThis">
-           <string>&lt;b>Home Location&lt;/b>&lt;p>This is the directory where GnuPG \
stores its configuration and the keyrings. If you have not changed it this is usually \
                &lt;em>~/.gnupg/&lt;/em>&lt;/p></string>
-          </property>
          </widget>
         </item>
         <item>
          <widget class="QLabel" name="textLabel1_5_2_2" >
+          <property name="whatsThis">
+           <string>&lt;b&gt;Configuration File&lt;/b&gt;&lt;p&gt;This is the name of \
the configuration file in the directory specified above. The default is \
&lt;em&gt;gnupg.conf&lt;/em&gt; while older versions of GnuPG used \
&lt;em&gt;options&lt;/em&gt;.&lt;/p&gt;</string> +          </property>
           <property name="text" >
            <string>Configuration file:</string>
           </property>
           <property name="wordWrap" >
            <bool>false</bool>
           </property>
-          <property name="whatsThis">
-           <string>&lt;b>Configuration File&lt;/b>&lt;p>This is the name of the \
configuration file in the directory specified above. The default is \
&lt;em>gnupg.conf&lt;/em> while older versions of GnuPG used \
                &lt;em>options&lt;/em>.&lt;/p></string>
-          </property>
          </widget>
         </item>
        </layout>
@@ -71,7 +72,7 @@
           <property name="sizeType" >
            <enum>QSizePolicy::Preferred</enum>
           </property>
-          <property name="sizeHint" >
+          <property name="sizeHint" stdset="0">
            <size>
             <width>40</width>
             <height>20</height>
@@ -109,21 +110,21 @@
      <layout class="QHBoxLayout" >
       <item>
        <widget class="QLabel" name="textLabel1_6_2" >
+        <property name="whatsThis">
+         <string>&lt;b&gt;Program path&lt;/b&gt;&lt;p&gt;This is the program that \
will be called for all GnuPG operations. The default of &lt;em&gt;gpg&lt;/em&gt; will \
work on most systems.&lt;/p&gt;</string> +        </property>
         <property name="text" >
          <string>Program path:</string>
         </property>
         <property name="wordWrap" >
          <bool>false</bool>
         </property>
-        <property name="whatsThis">
-         <string>&lt;b>Program path&lt;/b>&lt;p>This is the program that will be \
called for all GnuPG operations. The default of &lt;em>gpg&lt;/em> will work on most \
                systems.&lt;/p></string>
-        </property>
        </widget>
       </item>
       <item>
        <layout class="QGridLayout" >
         <item row="0" column="0" >
-         <widget class="KLineEdit" name="gpg_bin_path" >
+         <widget class="KLineEdit" name="kcfg_GpgBinaryPath">
           <property name="enabled" >
            <bool>true</bool>
           </property>
@@ -137,7 +138,7 @@
           <property name="sizeType" >
            <enum>QSizePolicy::Preferred</enum>
           </property>
-          <property name="sizeHint" >
+          <property name="sizeHint" stdset="0">
            <size>
             <width>40</width>
             <height>20</height>
@@ -152,12 +153,12 @@
    </item>
    <item>
     <widget class="QCheckBox" name="use_agent" >
+     <property name="whatsThis">
+      <string>&lt;b&gt;Use GnuPG agent&lt;/b&gt;&lt;p&gt;The GnuPG agent stores the \
passwords for your secret keys in memory for a limited amount of time. If you use \
your secret key again while it is cached you do not have to enter it again. This is \
less secure than typing it every time.&lt;/p&gt;</string> +     </property>
      <property name="text" >
       <string>Use GnuPG agent</string>
      </property>
-     <property name="whatsThis">
-      <string>&lt;b>Use GnuPG agent&lt;/b>&lt;p>The GnuPG agent stores the passwords \
for your secret keys in memory for a limited amount of time. If you use your secret \
key again while it is cached you do not have to enter it again. This is less secure \
                than typing it every time.&lt;/p></string>
-     </property>
     </widget>
    </item>
    <item>
@@ -165,7 +166,7 @@
      <property name="orientation" >
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>569</width>
        <height>181</height>
--- trunk/KDE/kdeutils/kgpg/kgpgoptions.cpp #1228399:1228400
@@ -65,8 +65,10 @@
 
 	// Initialize the default server and the default server list.
 	defaultKeyServer = QLatin1String( "hkp://wwwkeys.pgp.net" );
-	defaultServerList << defaultKeyServer << QLatin1String( \
                "hkp://search.keyserver.net" ) << QLatin1String( \
                "hkp://pgp.dtype.org" );
-	defaultServerList << QLatin1String( "hkp://wwwkeys.us.pgp.net" ) << QLatin1String( \
"hkp://subkeys.pgp.net" ); +	defaultServerList << defaultKeyServer
+			<< QLatin1String("hkp://search.keyserver.net")
+			<< QLatin1String("hkp://pgp.dtype.org")
+			<< QLatin1String("hkp://subkeys.pgp.net");
 
 	// Read the default keyserver from the GnuPG settings.
 	keyServer = KgpgInterface::getGpgSetting(QLatin1String( "keyserver" ), \
KGpgSettings::gpgConfigPath()); @@ -152,7 +154,7 @@
 					KGuiItem(i18n("Create")),
 					KGuiItem(i18n("Ignore")))) {
 				// start GnuPG so that it will create a config file
-				QString gpgbin = m_page4->gpg_bin_path->text();
+				QString gpgbin = m_page4->kcfg_GpgBinaryPath->text();
 				if (!QFile::exists(gpgbin))
 					gpgbin = QLatin1String( "gpg" );
 
@@ -337,8 +339,6 @@
 	gpgConfigPath = KGpgSettings::gpgConfigPath();
 	m_page4->gpg_conf_path->setText(KUrl::fromPath(gpgConfigPath).fileName());
 	m_page4->gpg_home_path->setText(KUrl::fromPath(gpgConfigPath).directory(KUrl::AppendTrailingSlash));
                
-	gpgBinPath = KGpgSettings::gpgBinaryPath();
-	m_page4->gpg_bin_path->setText(gpgBinPath);
 
 	m_useagent = KgpgInterface::getGpgBoolSetting(QLatin1String( "use-agent" ), \
KGpgSettings::gpgConfigPath());  m_defaultuseagent = false;
@@ -364,7 +364,6 @@
 
 	m_page4->gpg_conf_path->setText(defaultConfigPath);
 	m_page4->gpg_home_path->setText(defaultHomePath);
-	m_page4->gpg_bin_path->setText(defaultBinPath);
 
 	m_page6->ServerBox->clear();
 	m_page6->ServerBox->addItem(i18nc("Mark default keyserver in GUI", "%1 (Default)", \
defaultKeyServer)); @@ -386,8 +385,6 @@
 
 		gpgConfigPath = KGpgSettings::gpgConfigPath();
 	}
-	KGpgSettings::setGpgBinaryPath(m_page4->gpg_bin_path->text());
-	gpgBinPath = KGpgSettings::gpgBinaryPath();
 
 	// save selected keys for file encryption & always encrypt with
 	if (m_page1->kcfg_EncryptFilesTo->isChecked())
@@ -566,9 +563,6 @@
 	if (m_page4->gpg_home_path->text() != \
KUrl::fromPath(gpgConfigPath).directory(KUrl::AppendTrailingSlash))  return true;
 
-	if (m_page4->gpg_bin_path->text() != gpgBinPath)
-		return true;
-
 	if (m_page4->use_agent->isChecked() != m_useagent)
 		return true;
 
@@ -613,9 +607,6 @@
 	if (m_page4->gpg_home_path->text() != defaultHomePath)
 		return false;
 
-	if (m_page4->gpg_bin_path->text() != defaultBinPath)
-		return false;
-
 	if (m_page4->use_agent->isChecked() != m_defaultuseagent)
 		return false;
 
--- trunk/KDE/kdeutils/kgpg/kgpgoptions.h #1228399:1228400
@@ -122,7 +122,6 @@
     QString alwaysKeyID;
     QString fileEncryptionKey;
     QString gpgConfigPath;
-    QString gpgBinPath;
     QString keyServer;              // Server stored in GnuPG config
     QStringList serverList;         // Servers stored in kgpgrc
     QString defaultKeyServer;       // Default keyserver


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic