From 1b8abf6ffd7a1fec6fe0f69030e1ec3c35a99c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 18 Mar 2024 17:16:00 +0100 Subject: [PATCH] fix gcc2 build (#59) --- source/AlarmWindow.cpp | 2 +- source/ColorWindow.cpp | 4 +++- source/ColorWindow.h | 2 -- source/NoteWindow.cpp | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/AlarmWindow.cpp b/source/AlarmWindow.cpp index e50c363..9851ee0 100644 --- a/source/AlarmWindow.cpp +++ b/source/AlarmWindow.cpp @@ -272,7 +272,7 @@ int AlarmWindow :: GetTime(int element) { // Variables struct tm *now; - bigtime_t time_value; + time_t time_value; // Initialize tm struct and time_t value now = NULL; diff --git a/source/ColorWindow.cpp b/source/ColorWindow.cpp index 4acbe43..55ca6d7 100644 --- a/source/ColorWindow.cpp +++ b/source/ColorWindow.cpp @@ -38,6 +38,8 @@ #include #include +static const rgb_color sBgColor = {255,240,113}; + #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "ColorWindow" @@ -105,7 +107,7 @@ void ColorWindow :: MessageReceived (BMessage* message) { // It answer to an REVERT request case BUTTON_REVERT: { - fColorControl->SetValue(gBgColor); + fColorControl->SetValue(sBgColor); this->PostMessage(COLOR_CHANGED); } break; diff --git a/source/ColorWindow.h b/source/ColorWindow.h index 2253242..9f6bdae 100644 --- a/source/ColorWindow.h +++ b/source/ColorWindow.h @@ -29,8 +29,6 @@ class ColorWindow : public BWindow { virtual bool QuitRequested(); virtual void MessageReceived(BMessage*); virtual void Quit(); - const rgb_color gBgColor = {255,240,113}; - private: diff --git a/source/NoteWindow.cpp b/source/NoteWindow.cpp index 4ec1feb..cd7f8d9 100644 --- a/source/NoteWindow.cpp +++ b/source/NoteWindow.cpp @@ -492,7 +492,8 @@ NoteWindow::_CreateNoteView(void) fNoteView->AddChild(fScrollView); //load color read from the settings file which was loaded in fSettingsMessage - fNoteView->SetBackgroundColor(note_app->fSettingsMessage->GetColor("def_color", {255,240,113})); + rgb_color color = {255,240,113}; + fNoteView->SetBackgroundColor(note_app->fSettingsMessage->GetColor("def_color", color)); if(!fSaveMessage) MoveTo(200+(note_app->fWindowCount*20),200+( note_app->fWindowCount*20));