531 URL url = new URL(new File(userHome).toURI().toURL(), |
531 URL url = new URL(new File(userHome).toURI().toURL(), |
532 ".gconf/apps/metacity/general/%25gconf.xml"); |
532 ".gconf/apps/metacity/general/%25gconf.xml"); |
533 // Pending: verify character encoding spec for gconf |
533 // Pending: verify character encoding spec for gconf |
534 Reader reader = new InputStreamReader(url.openStream(), "ISO-8859-1"); |
534 Reader reader = new InputStreamReader(url.openStream(), "ISO-8859-1"); |
535 char[] buf = new char[1024]; |
535 char[] buf = new char[1024]; |
536 StringBuffer strBuf = new StringBuffer(); |
536 StringBuilder sb = new StringBuilder(); |
537 int n; |
537 int n; |
538 while ((n = reader.read(buf)) >= 0) { |
538 while ((n = reader.read(buf)) >= 0) { |
539 strBuf.append(buf, 0, n); |
539 sb.append(buf, 0, n); |
540 } |
540 } |
541 reader.close(); |
541 reader.close(); |
542 String str = strBuf.toString(); |
542 String str = sb.toString(); |
543 if (str != null) { |
543 if (str != null) { |
544 String strLowerCase = str.toLowerCase(); |
544 String strLowerCase = str.toLowerCase(); |
545 int i = strLowerCase.indexOf("<entry name=\"theme\""); |
545 int i = strLowerCase.indexOf("<entry name=\"theme\""); |
546 if (i >= 0) { |
546 if (i >= 0) { |
547 i = strLowerCase.indexOf("<stringvalue>", i); |
547 i = strLowerCase.indexOf("<stringvalue>", i); |