Skip site navigation (1) Skip section navigation (2)

SVN Commit by andreas: r4716 - branches/REL-1_4_0_PATCHES/pgadmin3/src/utils

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by andreas: r4716 - branches/REL-1_4_0_PATCHES/pgadmin3/src/utils
Date: 2005-11-09 18:33:58
Message-ID: 200511091833.jA9IXwYh029599@developer.pgadmin.org (view raw or flat)
Thread:
Lists: 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

Next:From: svnDate: 2005-11-09 19:55:54
Subject: SVN Commit by andreas: r4718 - trunk/pgadmin3/src/ui
Previous:From: Andreas PflugDate: 2005-11-09 17:08:31
Subject: Re: Rev 4704

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group