]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.cpp
add FileName::renameTo() method.
[lyx.git] / src / support / os_unix.cpp
index b580a99fd38591c2943b03beaebe792234cbe8d1..8e61c6564912bdf757ac6764b3e23d9d024ec262 100644 (file)
 #include <config.h>
 
 #include "support/os.h"
+#include "support/docstring.h"
 
 #ifdef __APPLE__
-#include "debug.h"
 #include <Carbon/Carbon.h>
-#include <ApplicationServices/ApplicationServices.h>
-using std::endl;
 #endif
 
-using std::string;
-
+using namespace std;
 
 namespace lyx {
 namespace support {
@@ -195,42 +192,6 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode)
 #endif
 }
 
-
-void addFontResources()
-{
-#ifdef __APPLE__
-       CFBundleRef  myAppBundle = CFBundleGetMainBundle();
-       CFURLRef  myAppResourcesURL, FontsURL;
-       FSRef  fontDirRef;
-       FSSpec  fontDirSpec;
-       CFStringRef  filePath = CFStringCreateWithBytes(kCFAllocatorDefault,
-                                       (UInt8 *) "fonts", strlen("fonts"),
-                                       kCFStringEncodingISOLatin1, false);
-
-       myAppResourcesURL = CFBundleCopyResourcesDirectoryURL(myAppBundle);
-       FontsURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault,
-                       myAppResourcesURL, filePath, true);
-       if (lyxerr.debugging(Debug::FONT)) {
-               UInt8  buf[255];
-               if (CFURLGetFileSystemRepresentation(FontsURL, true, buf, 255))
-                       lyxerr << "Adding Fonts directory: " << buf << endl;
-       }
-       CFURLGetFSRef (FontsURL, &fontDirRef);
-       OSStatus err = FSGetCatalogInfo (&fontDirRef, kFSCatInfoNone,
-                                        NULL, NULL, &fontDirSpec, NULL);
-       if (err)
-               lyxerr << "FSGetCatalogInfo err = " << err << endl;
-       err = FMActivateFonts (&fontDirSpec, NULL, NULL,
-                              kFMLocalActivationContext);
-       if (err)
-               lyxerr << "FMActivateFonts err = " << err << endl;
-#endif
-}
-
-
-void restoreFontResources()
-{}
-
 } // namespace os
 } // namespace support
 } // namespace lyx