Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleConfig.cpp
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Line(s) | 200 | { | |||
---|---|---|---|---|---|
201 | mGuiConfig.writeEntry(QStringLiteral("captureModeIndex"), index); | 201 | mGuiConfig.writeEntry(QStringLiteral("captureModeIndex"), index); | ||
202 | mGuiConfig.sync(); | 202 | mGuiConfig.sync(); | ||
203 | } | 203 | } | ||
204 | 204 | | |||
205 | // remember last rectangular region | 205 | // remember last rectangular region | ||
206 | 206 | | |||
207 | bool SpectacleConfig::rememberLastRectangularRegion() const | 207 | bool SpectacleConfig::rememberLastRectangularRegion() const | ||
208 | { | 208 | { | ||
209 | return mGuiConfig.readEntry(QStringLiteral("rememberLastRectangularRegion"), false); | 209 | return mGuiConfig.readEntry(QStringLiteral("rememberLastRectangularRegion"), true); | ||
210 | } | 210 | } | ||
211 | 211 | | |||
212 | void SpectacleConfig::setRememberLastRectangularRegion(bool enabled) | 212 | void SpectacleConfig::setRememberLastRectangularRegion(bool enabled) | ||
213 | { | 213 | { | ||
214 | mGuiConfig.writeEntry(QStringLiteral("rememberLastRectangularRegion"), enabled); | 214 | mGuiConfig.writeEntry(QStringLiteral("rememberLastRectangularRegion"), enabled); | ||
215 | mGuiConfig.sync(); | 215 | mGuiConfig.sync(); | ||
216 | } | 216 | } | ||
217 | 217 | | |||
218 | bool SpectacleConfig::alwaysRememberRegion() const | 218 | bool SpectacleConfig::alwaysRememberRegion() const | ||
219 | { | 219 | { | ||
220 | // Default Value is for compatibility reasons as the old behavior was always to remember across restarts | 220 | // Default Value is for compatibility reasons as the old behavior was always to remember across restarts | ||
221 | return mGuiConfig.readEntry(QStringLiteral("alwaysRememberRegion"), rememberLastRectangularRegion()); | 221 | bool useOldBehavior = mGuiConfig.readEntry(QStringLiteral("rememberLastRectangularRegion"), false); | ||
222 | return mGuiConfig.readEntry(QStringLiteral("alwaysRememberRegion"), useOldBehavior); | ||||
222 | } | 223 | } | ||
223 | 224 | | |||
224 | void SpectacleConfig::setAlwaysRememberRegion (bool enabled) | 225 | void SpectacleConfig::setAlwaysRememberRegion (bool enabled) | ||
225 | { | 226 | { | ||
226 | mGuiConfig.writeEntry(QStringLiteral("alwaysRememberRegion"), enabled); | 227 | mGuiConfig.writeEntry(QStringLiteral("alwaysRememberRegion"), enabled); | ||
227 | mGuiConfig.sync(); | 228 | mGuiConfig.sync(); | ||
228 | } | 229 | } | ||
229 | 230 | | |||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |