Merge branch 'master' into gtk3-merge-master-b8eb349

This commit is contained in:
Morgan Hardwood
2016-10-10 23:07:41 +02:00
166 changed files with 15898 additions and 2285 deletions

View File

@@ -292,6 +292,7 @@ void Options::setDefaults ()
{
font = "sans, 8";
colorPickerFont = "sans, 8";
windowWidth = 1200;
windowHeight = 680;
windowX = 0;
@@ -1241,6 +1242,10 @@ int Options::readFromFile (Glib::ustring fname)
font = keyFile.get_string ("GUI", "Font");
}
if (keyFile.has_key ("GUI", "ColorPickerFont")) {
colorPickerFont = keyFile.get_string ("GUI", "ColorPickerFont");
}
if (keyFile.has_key ("GUI", "WindowWidth")) {
windowWidth = keyFile.get_integer ("GUI", "WindowWidth");
}
@@ -1967,6 +1972,7 @@ int Options::saveToFile (Glib::ustring fname)
keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys);
keyFile.set_string ("GUI", "Font", font);
keyFile.set_string ("GUI", "ColorPickerFont", colorPickerFont);
keyFile.set_integer ("GUI", "WindowWidth", windowWidth);
keyFile.set_integer ("GUI", "WindowHeight", windowHeight);
keyFile.set_integer ("GUI", "WindowX", windowX);
@@ -2162,9 +2168,9 @@ bool Options::load ()
} else {
#ifdef WIN32
WCHAR pathW[MAX_PATH] = {0};
char pathA[MAX_PATH];
if (SHGetSpecialFolderPathW (NULL, pathW, CSIDL_LOCAL_APPDATA, false)) {
char pathA[MAX_PATH];
WideCharToMultiByte (CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0);
rtdir = Glib::build_filename (Glib::ustring (pathA), Glib::ustring (CACHEFOLDERNAME));
}