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 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); } }