SVN Commit by andreas: r4716 - branches/REL-1_4_0_PATCHES/pgadmin3/src/utils - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by andreas: r4716 - branches/REL-1_4_0_PATCHES/pgadmin3/src/utils
Date
Msg-id 200511091833.jA9IXwYh029599@developer.pgadmin.org
Whole thread Raw
List pgadmin-hackers
Author: andreas
Date: 2005-11-09 18:33:58 +0000 (Wed, 09 Nov 2005)
New Revision: 4716

Modified:
   branches/REL-1_4_0_PATCHES/pgadmin3/src/utils/sysSettings.cpp
Log:
Convert TOTD setting from REG_DWORD to REG_SZ

Modified: branches/REL-1_4_0_PATCHES/pgadmin3/src/utils/sysSettings.cpp
===================================================================
--- branches/REL-1_4_0_PATCHES/pgadmin3/src/utils/sysSettings.cpp    2005-11-09 14:33:35 UTC (rev 4715)
+++ branches/REL-1_4_0_PATCHES/pgadmin3/src/utils/sysSettings.cpp    2005-11-09 18:33:58 UTC (rev 4716)
@@ -32,6 +32,25 @@

 sysSettings::sysSettings(const wxString& name) : wxConfig(name)
 {
+    // Convert setting from pre-1.3
+#ifdef __WXMSW__
+    DWORD type=0;
+    HKEY hkey=0;
+    RegOpenKeyEx(HKEY_CURRENT_USER, wxT("Software\\") + GetAppName(), 0, KEY_READ, &hkey);
+    if (hkey)
+    {
+        RegQueryValueEx(hkey, wxT("ShowTipOfTheDay"), 0, &type, 0, 0);
+        if (type == REG_DWORD)
+        {
+            long value;
+            Read(wxT("ShowTipOfTheDay"), &value, 0L);
+
+            Write(wxT("ShowTipOfTheDay"), value != 0);
+        }
+        RegCloseKey(hkey);
+    }
+#endif
+
     // Tip Of The Day
     Read(wxT("ShowTipOfTheDay"), &showTipOfTheDay, true);
     Read(wxT("NextTipOfTheDay"), &nextTipOfTheDay, 0);


pgadmin-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Rev 4704
Next
From: svn@pgadmin.org
Date:
Subject: SVN Commit by andreas: r4718 - trunk/pgadmin3/src/ui