From 23579d1e394f3f4003d4b191c3d189a15f4c3b63 Mon Sep 17 00:00:00 2001 From: cafeina Date: Thu, 1 Aug 2024 01:00:22 -0300 Subject: [PATCH] Minor commit to remove an old code that led to a crash in the new usage of user list view (preflet), other minor edits to attempt fix for known bug. --- src/application/mBackgroundView.cpp | 4 ++-- src/application/mSystemInfo.cpp | 8 +++++--- src/preflet/mWindow.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/application/mBackgroundView.cpp b/src/application/mBackgroundView.cpp index e927334..0b7bccb 100644 --- a/src/application/mBackgroundView.cpp +++ b/src/application/mBackgroundView.cpp @@ -71,11 +71,11 @@ int mBackgroundView::CallSetBackgroundImage(void* data) void mBackgroundView::SetBackgroundImage(void* data) { BStringList* localList = (BStringList*)data; - BBitmap* nextimage = nullptr, *releaseimage = nullptr; while(!shouldExit) { + BBitmap* nextimage = nullptr, *releaseimage = nullptr; for(int i = 0; i < localList->CountStrings(); i++) { - nextimage = BTranslationUtils::GetBitmap(localList->StringAt(i)); + nextimage = BTranslationUtils::GetBitmap(localList->StringAt(i).String()); if(nextimage != NULL) { snooze(multiplier * 1000000); diff --git a/src/application/mSystemInfo.cpp b/src/application/mSystemInfo.cpp index d7dd87f..da44c88 100644 --- a/src/application/mSystemInfo.cpp +++ b/src/application/mSystemInfo.cpp @@ -125,11 +125,13 @@ void mSystemInfo::Update() LockLooper(); - memmax->SetText(fStrMaxMem); - memused->SetText(fStrUsedMem); - runtime->SetText(fStrRunningTime); + memmax->SetText(fStrMaxMem.String()); + memused->SetText(fStrUsedMem.String()); + runtime->SetText(fStrRunningTime.String()); UnlockLooper(); + LockLooper(); + UnlockLooper(); } BStringView* mSystemInfo::AddTitle(const char* title) diff --git a/src/preflet/mWindow.cpp b/src/preflet/mWindow.cpp index 30db5f9..4b7be3a 100644 --- a/src/preflet/mWindow.cpp +++ b/src/preflet/mWindow.cpp @@ -638,7 +638,7 @@ void mWindow::UpdateStrings_Thread() LockLooper(); mAddUserName->SetText(settings->DefaultUser()); - ((BStringView*)mListOfUsers->ItemAt(0))->SetText(settings->DefaultUser()); + // ((BStringView*)mListOfUsers->ItemAt(0))->SetText(settings->DefaultUser()); settings->BackgroundColor() = mCCBgColor->ValueAsColor(); settings->SetBackgroundImageFolderPath(mTextControlmPathToImageFolder->Text());