summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-02-14 13:15:39 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-02-14 13:15:39 +0000
commitab8f3f793a6f6a5255cd22b212915a1909efe9a7 (patch)
tree085e8e0bc4033cb3fe6eac34ea49dc34f7f7714e
parentcb852cd3eb5113b92ca8d0c09ecba5859d0920dc (diff)
Fl_Preferences::RootNode did not find the user's home directory
on some non-US versions of Windows (STR #720) src/Fl_Preferences.cxx: - RootNode::RootNode(): if AppData key does not exist, try Personal key instead. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4042 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES3
-rw-r--r--src/Fl_Preferences.cxx10
2 files changed, 10 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index 5a822c3a3..7c17105aa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692)
+ - Fl_Preferences::RootNode did not find the user's home
+ directory on some non-US versions of Windows (STR
+ #720)
- Fl_Window::hide() didn't delete the current clipping
region on WIN32, causing a GDI resource leak in some
situations (STR #723)
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index bba7c78a5..600ff6fb2 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Preferences.cxx,v 1.1.2.27 2004/04/11 04:38:58 easysw Exp $"
+// "$Id$"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@@ -616,7 +616,11 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, Root root, const char
nn = FL_PATH_MAX - appDataLen;
err = RegQueryValueEx( key, "AppData", 0L, &type, (BYTE*)filename, &nn );
if ( ( err != ERROR_SUCCESS ) && ( type == REG_SZ ) )
- filename[0] = 0;
+ {
+ err = RegQueryValueEx( key, "Personal", 0L, &type, (BYTE*)filename, &nn );
+ if ( ( err != ERROR_SUCCESS ) && ( type == REG_SZ ) )
+ filename[0] = 0;
+ }
RegCloseKey(key);
}
break;
@@ -1113,5 +1117,5 @@ char Fl_Preferences::Node::remove()
//
-// End of "$Id: Fl_Preferences.cxx,v 1.1.2.27 2004/04/11 04:38:58 easysw Exp $".
+// End of "$Id$".
//