From c31c485eeeec501a536c0b35a15114a03ebd1b55 Mon Sep 17 00:00:00 2001 From: Humdinger Date: Tue, 28 Apr 2026 19:30:11 +0200 Subject: [PATCH] SoftwareUpdater: Make the checkmark label less technical Change-Id: Iff0eb78878189d033e4849f3994f34d5523530d6 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10852 Tested-by: Commit checker robot Reviewed-by: Adrien Destugues --- src/apps/softwareupdater/SoftwareUpdaterWindow.cpp | 4 ++-- src/apps/softwareupdater/UpdateManager.cpp | 5 ++--- src/apps/softwareupdater/constants.h | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/apps/softwareupdater/SoftwareUpdaterWindow.cpp b/src/apps/softwareupdater/SoftwareUpdaterWindow.cpp index a5c07ad3a3..99938602c2 100644 --- a/src/apps/softwareupdater/SoftwareUpdaterWindow.cpp +++ b/src/apps/softwareupdater/SoftwareUpdaterWindow.cpp @@ -725,10 +725,10 @@ SoftwareUpdaterWindow::_ShowSettingsDialog() { BWindow* window = new BWindow(BRect(Frame().left + 50, Frame().top + 50, 0, 0), B_TRANSLATE("Settings"), B_FLOATING_WINDOW, - B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE); + B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_CLOSE_ON_ESCAPE); BCheckBox* autoCleanUp = new BCheckBox(B_TRANSLATE( - "Automatically clean up administrative directory")); + "Automatically clean up old install states")); autoCleanUp->SetValue(fAutoCleanUpAdminDirectory); autoCleanUp->SetMessage(new BMessage(kSettingMsgAutoCleanUp)); autoCleanUp->SetTarget(this); diff --git a/src/apps/softwareupdater/UpdateManager.cpp b/src/apps/softwareupdater/UpdateManager.cpp index fdb93739b2..a51374db6f 100644 --- a/src/apps/softwareupdater/UpdateManager.cpp +++ b/src/apps/softwareupdater/UpdateManager.cpp @@ -406,10 +406,9 @@ UpdateManager::ProgressApplyingChangesDone(InstalledRepository& repository) BJobStateListener listener; BContext context(decisionProvider, listener); - const int days = 30; - time_t before = time(NULL) - days * 24 * 60 * 60; + time_t before = time(NULL) - kCleanUpKeepDays * 24 * 60 * 60; - CleanUpAdminDirectoryRequest request(context, info, before, 10); + CleanUpAdminDirectoryRequest request(context, info, before, kCleanUpKeepStates); request.Process(); } } diff --git a/src/apps/softwareupdater/constants.h b/src/apps/softwareupdater/constants.h index 50144f7fe4..d4e35f8d15 100644 --- a/src/apps/softwareupdater/constants.h +++ b/src/apps/softwareupdater/constants.h @@ -12,6 +12,9 @@ #define kAppSignature "application/x-vnd.haiku-softwareupdater" #define kSettingsFilename "SoftwareUpdater_settings" +static const size_t kCleanUpKeepDays = 30; +static const size_t kCleanUpKeepStates = 10; + enum { ACTION_STEP_INIT = 0, ACTION_STEP_START,