[haiku-commits] r35317 - haiku/trunk/src/apps/terminal

Author: jackburton
Date: 2010-01-27 13:46:21 +0100 (Wed, 27 Jan 2010)
New Revision: 35317
Changeset: http://dev.haiku-os.org/changeset/35317/haiku

Modified:
   haiku/trunk/src/apps/terminal/PrefHandler.cpp
Log:
Moved terminal preferences to its own directory.


Modified: haiku/trunk/src/apps/terminal/PrefHandler.cpp
===================================================================
--- haiku/trunk/src/apps/terminal/PrefHandler.cpp       2010-01-27 12:45:53 UTC 
(rev 35316)
+++ haiku/trunk/src/apps/terminal/PrefHandler.cpp       2010-01-27 12:46:21 UTC 
(rev 35317)
@@ -120,16 +120,27 @@
 status_t
 PrefHandler::GetDefaultPath(BPath& path)
 {
-       if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) != B_OK)
-               return B_ERROR;
+       status_t status;
+       status = find_directory(B_USER_SETTINGS_DIRECTORY, &path, true);
+       if (status != B_OK)
+               return status;
 
-#ifdef HAIKU_TARGET_PLATFORM_HAIKU
-       path.Append("Terminal_settings");
+       status = path.Append("Terminal");
+       if (status != B_OK)
+               return status;
+       
+       // Just create the directory. Harmless if already there
+       status = create_directory(path.Path(), 0755);
+       if (status != B_OK)
+               return status;
+               
+#ifdef HAIKU_TARGET_PLATFORM_HAIKU     
+       status = path.Append("Default");
 #else
-       path.Append("HaikuTerminal_settings");
+       status = path.Append("HaikuTerminal_settings");
 #endif
 
-       return B_OK;
+       return status;
 }
 
 


Other related posts: