[Winpt-commits] r315 - trunk/Src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 25 16:45:07 CEST 2007


Author: twoaday
Date: 2007-05-25 16:45:06 +0200 (Fri, 25 May 2007)
New Revision: 315

Modified:
   trunk/Src/ChangeLog
   trunk/Src/wptGPGPrefsDlg.cpp
Log:


Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog	2007-05-13 09:44:03 UTC (rev 314)
+++ trunk/Src/ChangeLog	2007-05-25 14:45:06 UTC (rev 315)
@@ -1,3 +1,8 @@
+2007-05-25  Timo Schulz  <twoaday at gmx.net>
+
+	* wptGPGPrefsDlg.cpp (gpgprefs_dlg_proc): Issue a warning
+	if the gpgProgram entry will be modified. Suggested by Werner.
+
 2007-03-23  Timo Schulz  <twoaday at gmx.net>
 
 	* wptCardDlg.cpp (card_keygen_dlg_proc): Use dynamic

Modified: trunk/Src/wptGPGPrefsDlg.cpp
===================================================================
--- trunk/Src/wptGPGPrefsDlg.cpp	2007-05-13 09:44:03 UTC (rev 314)
+++ trunk/Src/wptGPGPrefsDlg.cpp	2007-05-25 14:45:06 UTC (rev 315)
@@ -200,7 +200,6 @@
 	activate_items (dlg, FALSE);
 #endif
 
-
 	center_window (dlg, NULL);
         SetForegroundWindow (dlg);
         return TRUE;
@@ -226,13 +225,13 @@
         switch (LOWORD (wparam)) {
         case IDC_GPGPREFS_SAVE:
             if (!GetDlgItemText (dlg, IDC_GPGPREFS_HOMEDIR, 
-				 homedir, sizeof (homedir) -1)) {
+				 homedir, DIM (homedir) -1)) {
                 msg_box (dlg, _("Please enter the GnuPG home directory."),
 			 _("Preferences"), MB_ERR);
                 return FALSE;
             }
             if (dir_exist_check (homedir)) {
-		_snprintf (t, sizeof (t) - 1, "%s: %s", homedir,
+		_snprintf (t, DIM (t) - 1, "%s: %s", homedir,
 			   winpt_strerror (WPTERR_DIR_OPEN));
                 msg_box (dlg, t, _("Preferences"), MB_ERR);
                 return FALSE;
@@ -244,7 +243,7 @@
                 return FALSE;
             }
             if (!GetDlgItemText (dlg, IDC_GPGPREFS_EXEDIR,
-				 exedir, sizeof (exedir) -1)) {
+				 exedir, DIM (exedir) -1)) {
                 msg_box (dlg, _("Please enter where GPG.exe is located."),
 			 _("Preferences"), MB_ERR);
                 return FALSE;
@@ -260,7 +259,7 @@
                 return FALSE;
             }
             if (GetDlgItemText (dlg, IDC_GPGPREFS_LOCALE,
-				locale_dir, sizeof (locale_dir) -1) > 0) {
+				locale_dir, DIM (locale_dir) -1) > 0) {
                 if (dir_exist_check (locale_dir)) {
 		    log_box ( _("Preferences"), MB_ERR, "%s: %s", locale_dir, 
 			     winpt_strerror (WPTERR_DIR_OPEN));
@@ -349,6 +348,15 @@
 	    return TRUE;
 	    
         case IDC_GPGREFS_EXEDLG:
+	    n = msg_box (dlg, _("Please be aware that the modifcation of "
+				"the value will affect all installed "
+				"programs which use GPG via the "
+				"GPGME interface library\n\n"
+				"Do you really want to continue?"),
+			 _("GPG Warning"), MB_WARN_ASK);
+	    if (n != IDYES)
+		return TRUE;
+	    
 	    s = get_fileopen_dlg (dlg, _("Choose GPG Binary"), 
 				  "Executable Files (*.exe)\0*.exe\0\0",
 				  NULL);



More information about the Winpt-commits mailing list