Skip to content
Snippets Groups Projects
Commit be35156b authored by Olivier Fourdan's avatar Olivier Fourdan
Browse files

Fall back to default keytheme if user specified keytheme is not found, rather than just exiting...

(Old svn revision: 11245)
parent 4032b368
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@
#define CHANNEL1 "xfwm4"
#define CHANNEL2 "margins"
#define TOINT(x) (x ? atoi(x) : 0)
#define DEFAULT_KEYTHEME "default.keys"
Params params;
......@@ -749,7 +750,14 @@ loadKeyBindings (Settings rc[])
if (keythemevalue)
{
keytheme = getThemeDir (keythemevalue);
parseRc ("keythemerc", keytheme, rc);
if (!parseRc ("keythemerc", keytheme, rc))
{
g_warning (_("%s: specified key theme \"%s\" missing, using default"),
progname, keythemevalue);
g_free (keytheme);
keytheme = getThemeDir (DEFAULT_KEYTHEME);
parseRc ("keythemerc", keytheme, rc);
}
g_free (keytheme);
if (!checkRc (rc))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment