void OperationalSettings::readSettings(const char* filePath)
{
    GKeyFile* keyfile = g_key_file_new();
    qint32 v = INT_MIN;
    qreal vf = 0.0;
	if (!g_key_file_load_from_file(keyfile, filePath,
								   G_KEY_FILE_NONE, NULL)) {
		goto Done;
	}

	KEY_QSTRING("Main","StartOnPageDesignated",startOnPageDesignated);
	KEY_QSTRING("Main","ReturnToPageDesignatedOnHide",returnToDesignatorOnHide);
	KEY_QSTRING("Main","SavedPagesDirectory",savedPagesDirectory);
	KEY_QSTRING("Main","AppBlacklistFilepath",appBlacklistFilepath);
	KEY_BOOLEAN("Main","ForceFavoritesToAllContent",forceFavoritesToAllContent);
	KEY_BOOLEAN("Main","UseAllContentInsteadOfEmptyFavorites",useAllContentInsteadOfEmptyFavorites);
	KEY_BOOLEAN("Main","ForceSaveOnHide",forceSaveOnHide);
	KEY_BOOLEAN("Main","UsePreciseTimeForMasterFilename",usePreciseTimeForMasterSaveFileName);
	KEY_BOOLEAN("Main","UseSingleMasterFilename",useSingleMasterSaveFileName);
	KEY_BOOLEAN("Main","UseApplicationManagerHiddenFlag",useApplicationManagerHiddenFlag);
	KEY_BOOLEAN("Main","UseStagedRendering",useStagedRendering);
	KEY_QSTRING("Main","AppKeywordsToPageDesignatorMapFilepath",appKeywordsToPageDesignatorMapFilepath);
	KEY_BOOLEAN("Main","UseSingleQuicklaunchSaveFilename",useSingleQuicklaunchSaveFileName);
	KEY_UINTEGER("Main","FavoritesPageIndex",favoritesPageIndex);
	KEY_UINTEGER("Main","InstalledAppsPageIndex",installedAppsPageIndex);
	KEY_QSTRING("Main","AppCatalogAppId",appCatalogAppId);
	KEY_UINTEGER("Main","SettingsPageIndex",settingsPageIndex);
	KEY_QSTRING("Main","SettingsAppCategoryDesignator",settingsAppCategoryDesignator);
	KEY_UINTEGER("Main","SystemAppsPageIndex",systemAppsPageIndex);
	KEY_BOOLEAN("Main","PreferAppKeywordsForAppPlacement",preferAppKeywordsForAppPlacement);
	KEY_BOOLEAN("Main","UseDynamicMultiPageInitialConfigurator",useDynamicMultiPageInitialConfigurator);
	KEY_BOOLEAN("Main","AllowedToLaunchInReorderMode",allowedToLaunchInReorderMode);
	KEY_BOOLEAN("Main","IgnoreLegacyCustomizationFiles",ignoreLegacyCustomizationFiles);
	KEY_BOOLEAN("Main","SafeLauncherBoot",safeLauncherBoot);
	KEY_QSTRING("Debug","LogDirPath",logDirPath);
	KEY_QSTRING("Debug","ArchiverExeFilename",archiverExeFilename);

	verify();
Done:

	if (keyfile) {
		g_key_file_free(keyfile);
	}
}
void StaticElementSettings::readSettings(const char* filePath)
{
    GKeyFile* keyfile = g_key_file_new();
    qint32 v = INT_MIN;
    qreal vf = 0.0;
	if (!g_key_file_load_from_file(keyfile, filePath,
								   G_KEY_FILE_NONE, NULL)) {
		goto Done;
	}


	KEY_BOOLEAN("HorizontalLabeledDivider",		"UseAlignmentGeom",
													horizLabeledDivider_useAlignmentGeom);
	KEY_UINTEGER("HorizontalLabeledDivider",	"AlignmentAbsoluteGeomSizeHeightPx",
													horizLabeledDivider_alignmentHeightPx);

Done:

	if (keyfile) {
		g_key_file_free(keyfile);
	}
}
void IconGeometrySettings::readSettings(const char* filePath)
{
    GKeyFile* keyfile = g_key_file_new();
    qint32 v = INT_MIN;
    qreal vf = 0.0;
	if (!g_key_file_load_from_file(keyfile, filePath,
								   G_KEY_FILE_NONE, NULL)) {
		goto Done;
	}

	KEY_BOOLEAN("Main","UseAbsoluteGeom",useAbsoluteGeom);
	KEYS_SIZE("Main","AbsoluteGeomSizeWidthPx",
								"AbsoluteGeomSizeHeightPx",
								absoluteGeomSizePx);

	KEY_BOOLEAN("Main","UseAbsoluteFrameGeom",useAbsoluteFrameGeom);
	KEYS_SIZE("Main",		"FrameAbsoluteGeomSizeWidthPx",
							"FrameAbsoluteGeomSizeHeightPx",
							frameBoxAbsoluteGeomSizePx);
	KEYS_SIZEF("Main",		"FrameBoxHorizontalProportionToTotalGeom",
							"FrameBoxVerticalProportionToTotalGeom",
							frameBoxProportionToGeom);

	KEY_BOOLEAN("Main","UseAbsoluteMainIconGeom",useAbsoluteMainIconGeom);
	KEYS_SIZE("Main",		"MainIconAbsoluteGeomSizeWidthPx",
							"MainIconAbsoluteGeomSizeHeightPx",
							mainIconBoxAbsoluteGeomSizePx);
	KEYS_SIZEF("Main",		"MainIconBoxHorizontalProportionToTotalGeom",
							"MainIconBoxVerticalProportionToTotalGeom",
							mainIconBoxProportionToGeom);

	KEY_BOOLEAN("Main","UseAlignmentGeom",useAlignmentGeom);
	KEYS_SIZE("Main",		"AlignmentAbsoluteGeomSizeWidthPx",
								"AlignmentAbsoluteGeomSizeHeightPx",
								alignmentGeomSizePx);

	KEY_BOOLEAN("Main","UseAbsoluteRemoveDeleteDecoratorGeom",useAbsoluteRemoveDeleteDecoratorGeom);
	KEYS_SIZE("Main",		"RemoveDeleteDecoratorBoxAbsoluteGeomWidthPx",
							"RemoveDeleteDecoratorBoxAbsoluteGeomHeightPx",
							removeDeleteDecoratorBoxAbsoluteGeomSizePx);
	KEYS_SIZEF("Main",		"RemoveDeleteDecoratorBoxHorizontalProportionToTotalGeom",
							"RemoveDeleteDecoratorBoxVerticalProportionToTotalGeom",
							removeDeleteDecoratorBoxProportionToGeom);
	KEY_BOOLEAN("Main","UseAbsoluteRemoveDeleteDecoratorOffsetFromGeomOrigin",useAbsoluteRemoveDeleteDecoratorOffsetFromGeomOrigin);
	KEYS_POINT("Main", "RemoveDeleteDecoratorHorizontalOffsetFromGeomOrigin",
					   "RemoveDeleteDecoratorVerticalOffsetFromGeomOrigin",
					   removeDeleteDecoratorOffsetFromGeomOriginPx);

	KEY_BOOLEAN("Main","UseAbsoluteInstallStatusDecoratorGeom",useAbsoluteInstallStatusDecoratorGeom);
	KEYS_SIZE("Main",		"InstallStatusDecoratorBoxAbsoluteGeomWidthPx",
							"InstallStatusDecoratorBoxAbsoluteGeomHeightPx",
							installStatusDecoratorBoxAbsoluteGeomSizePx);
	KEYS_SIZEF("Main",		"InstallStatusDecoratorBoxHorizontalProportionToTotalGeom",
							"InstallStatusDecoratorBoxVerticalProportionToTotalGeom",
							installStatusDecoratorBoxProportionToGeom);
	KEY_BOOLEAN("Main","UseAbsoluteInstallStatusDecoratorOffsetFromGeomOrigin",useAbsoluteInstallStatusDecoratorOffsetFromGeomOrigin);
	KEYS_POINT("Main", "InstallStatusDecoratorHorizontalOffsetFromGeomOrigin",
					   "InstallStatusDecoratorVerticalOffsetFromGeomOrigin",
					   installStatusDecoratorOffsetFromGeomOriginPx);

	KEY_BOOLEAN("Label",	"UseAbsoluteLabelBoxGeom",useAbsoluteLabelBoxGeom);
	KEYS_SIZE("Label",		"LabelBoxAbsoluteGeomWidthPx",
							"LabelBoxAbsoluteGeomHeightPx",
							labelBoxAbsoluteGeomSizePx);
	KEYS_SIZEF("Label",		"LabelBoxHorizontalProportionToTotalGeom",
							"LabelBoxVerticalProportionToTotalGeom",
							labelBoxProportionToGeom);

	KEY_UINTEGER("Label","LabelVerticalSpacingFromMainIcon",labelVerticalSpacingPx);

	KEY_UINTEGER("Label","FontSizePx",labelFontSizePx);
	KEY_COLOR("Label","FontColor",labelFontColor);
	KEY_BOOLEAN("Label","FontUsesBold",labelFontEmbolden);

	KEYS_SIZE("Decorators",	"EdgeOffsetHorizontalPx",
							"EdgeOffsetVerticalPx",
							decoratorEdgeOffsetPx);

	KEYS_POINT("Main","MainIconHorizontalOffsetFromGeomOriginPx",
					"MainIconVerticalOffsetFromGeomOriginPx",
					mainIconOffsetFromGeomOriginPx);

	KEYS_POINT("Main","FrameHorizontalOffsetFromGeomOriginPx",
					 "FrameVerticalOffsetFromGeomOriginPx",
					 frameOffsetFromGeomOriginPx);

Done:

	if (keyfile) {
		g_key_file_free(keyfile);
	}
}
void DynamicsSettings::readSettings(const char* filePath)
{
    QString alphaTrAnimTypeName;
    GKeyFile* keyfile = g_key_file_new();

    if (!g_key_file_load_from_file(keyfile, filePath,
                                   G_KEY_FILE_NONE, NULL)) {
        goto Done;
    }

    KEY_UINTEGER("Animations","IconReorderIconMoveAnimTime",iconReorderIconMoveAnimTime);
    KEY_CURVE("Animations","IconReorderIconMoveAnimCurve",iconReorderIconMoveAnimCurve);

    KEY_UINTEGER("UserControl","IconReorderSampleRate",iconReorderSampleRate);
    if (iconReorderSampleRate == 0)
    {
        iconReorderSampleRate = 1;
    }

    KEY_BOOLEAN("Animations","AlwaysWaitForIconReorderAnimToFinish",alwaysWaitForIconReorderAnimToFinish);
    KEY_BOOLEAN("Animations","TrackedIconUseDistanceBasedAnimTime",iconReorderTrackedIconUseDistanceBasedAnimTime);
    KEY_UINTEGER("Animations","TrackedIconMinAnimTime",iconReorderTrackedIconMinAnimTime);

    KEY_BOOLEAN("Animations","UseAnimationForAlphaTrackedIconCancel",alphaIconMoveTrackedIconUseAnimation);
    KEY_QSTRING("Animations","AlphaTrackedIconCancelAnimationType",alphaTrAnimTypeName);
    if (!alphaTrAnimTypeName.isEmpty())
    {
        alphaIconMoveTrackedIconAnimType = animName2Type(alphaTrAnimTypeName);
    }
    KEY_UINTEGER("UserControl","PageScrollUnderIconMoveDelayMs",pageScrollDelayMs);
    KEY_UINTEGER("UserControl","PageVerticalAutoScrollAmountPx",pageScrollAmount);
    KEY_UINTEGER("Animations","PageVerticalAutoScrollAnimTime",pageScrollAnimTime);

    KEY_QREAL("IconRender","IconInstallModeOpacity",iconInstallModeOpacity);

    KEY_UINTEGER("Animations","AppInfoDialogFadeInAnimTime",appInfoDialogFadeInTime);
    KEY_UINTEGER("Animations","AppInfoDialogFadeOutAnimTime",appInfoDialogFadeOutTime);

    KEY_UINTEGER("UserControl","IconFeedbackTimeout", launchFeedbackTimeout);

    KEY_UINTEGER("UserControl","MaxVelocityForSampling",maxVelocityForSampling);
    KEY_UINTEGER("UserControl","VelocityTimeNormalizationUnit",timeNormalizationUnit);
    KEY_UINTEGER("UserControl","VelocityDistanceMagFactor",distanceMagFactor);

    KEY_UINTEGER("UserControl","PagePanForIconMoveDelayMs",pagePanForIconMoveDelayMs);
Done:

    if (keyfile) {
        g_key_file_free(keyfile);
    }
}