]> git.lyx.org Git - lyx.git/blobdiff - src/support/Package.cpp
Fix layout bug. Pasting text into a cell tried to set Standard layout, because
[lyx.git] / src / support / Package.cpp
index 7ccc5e65c3227d64224007bd77b35ea4791cd2f6..7cd1fe099e96627be5e713a6ebb819fedf516197 100644 (file)
@@ -461,11 +461,11 @@ get_system_support_dir(FileName const & abs_binary,
                        return path;
        }
 
-       // 2. Use the "LYX_DIR_16x" environment variable.
-       path = extract_env_var_dir("LYX_DIR_16x");
+       // 2. Use the "LYX_DIR_${major}${minor}x" environment variable.
+       path = extract_env_var_dir(LYX_DIR_VER);
        if (!path.empty()) {
                searched_dirs.push_back(path);
-               if (check_env_var_dir(path, chkconfig_ltx, "LYX_DIR_16x"))
+               if (check_env_var_dir(path, chkconfig_ltx, LYX_DIR_VER))
                        return path;
        }
 
@@ -553,13 +553,13 @@ get_system_support_dir(FileName const & abs_binary,
        // FIXME UNICODE
        throw ExceptionMessage(ErrorException, _("No system directory"),
                bformat(_("Unable to determine the system directory "
-                                        "having searched\n"
-                                        "\t%1$s\n"
-                                        "Use the '-sysdir' command line parameter or "
-                                        "set the environment variable LYX_DIR_16x to "
-                                        "the LyX system directory containing the file "
-                                        "`chkconfig.ltx'."),
-                         from_utf8(searched_dirs_str)));
+                               "having searched\n"
+                               "\t%1$s\n"
+                               "Use the '-sysdir' command line parameter or "
+                               "set the environment variable\n%2$s "
+                               "to the LyX system directory containing the "
+                               "file `chkconfig.ltx'."),
+                         from_utf8(searched_dirs_str), from_ascii(LYX_DIR_VER)));
 
        // Keep the compiler happy.
        return FileName();
@@ -577,10 +577,8 @@ bool userSupportDir(FileName const & default_user_support_dir,
        if (!result.empty())
                return true;
 
-       // 2. Use the LYX_USERDIR_16x environment variable.
-       // FIXME We need to iherit the atual version number from elsewhere other-
-       // wise we will forget to update this for new major releases
-       result = extract_env_var_dir("LYX_USERDIR_16x");
+       // 2. Use the LYX_USERDIR_${major}${minor}x environment variable.
+       result = extract_env_var_dir(LYX_USERDIR_VER);
        if (!result.empty())
                return true;