From 10e9b12fe0659358a218146042f84cfca3e7ee70 Mon Sep 17 00:00:00 2001 From: Waldemar Kornewald Date: Wed, 7 Feb 2007 14:39:08 +0000 Subject: [PATCH] Renamed SET_INITIAL_MODE_MSG to BUTTON_UNDO_MSG. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20101 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/screen/AlertView.cpp | 6 +++--- src/preferences/screen/AlertWindow.cpp | 4 ++-- src/preferences/screen/Constants.h | 2 +- src/preferences/screen/ScreenApplication.cpp | 1 - src/preferences/screen/ScreenMode.h | 1 - src/preferences/screen/ScreenWindow.cpp | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/preferences/screen/AlertView.cpp b/src/preferences/screen/AlertView.cpp index 36838bee3a..707f0f22b8 100644 --- a/src/preferences/screen/AlertView.cpp +++ b/src/preferences/screen/AlertView.cpp @@ -52,7 +52,7 @@ AlertView::AlertView(BRect frame, char *name) AddChild(keepButton); BButton* button = new BButton(rect, "undo", "Undo", - new BMessage(SET_INITIAL_MODE_MSG), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); + new BMessage(BUTTON_UNDO_MSG), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); button->ResizeToPreferred(); AddChild(button); @@ -107,7 +107,7 @@ void AlertView::Pulse() { if (--fSeconds == 0) - Window()->PostMessage(SET_INITIAL_MODE_MSG); + Window()->PostMessage(BUTTON_UNDO_MSG); else UpdateCountdownView(); } @@ -117,7 +117,7 @@ void AlertView::KeyDown(const char* bytes, int32 numBytes) { if (numBytes == 1 && bytes[0] == B_ESCAPE) - Window()->PostMessage(SET_INITIAL_MODE_MSG); + Window()->PostMessage(BUTTON_UNDO_MSG); } diff --git a/src/preferences/screen/AlertWindow.cpp b/src/preferences/screen/AlertWindow.cpp index a003dc1941..97f6b53272 100644 --- a/src/preferences/screen/AlertWindow.cpp +++ b/src/preferences/screen/AlertWindow.cpp @@ -43,8 +43,8 @@ AlertWindow::MessageReceived(BMessage *message) PostMessage(B_QUIT_REQUESTED); break; - case SET_INITIAL_MODE_MSG: - fTarget.SendMessage(SET_INITIAL_MODE_MSG); + case BUTTON_UNDO_MSG: + fTarget.SendMessage(BUTTON_UNDO_MSG); PostMessage(B_QUIT_REQUESTED); break; diff --git a/src/preferences/screen/Constants.h b/src/preferences/screen/Constants.h index 653eb574a6..700719c2cb 100644 --- a/src/preferences/screen/Constants.h +++ b/src/preferences/screen/Constants.h @@ -21,6 +21,7 @@ static const uint32 BUTTON_REVERT_MSG = 'brev'; static const uint32 BUTTON_APPLY_MSG = 'bapl'; static const uint32 BUTTON_DONE_MSG = 'bdon'; static const uint32 BUTTON_KEEP_MSG = 'bkep'; +static const uint32 BUTTON_UNDO_MSG = 'bund'; static const uint32 POP_WORKSPACE_CHANGED_MSG = 'pwsc'; static const uint32 POP_RESOLUTION_MSG = 'pres'; static const uint32 POP_COLORS_MSG = 'pclr'; @@ -34,7 +35,6 @@ static const uint32 UPDATE_DESKTOP_COLOR_MSG = 'udsc'; static const uint32 UPDATE_DESKTOP_MSG = 'udsk'; static const uint32 SLIDER_MODIFICATION_MSG = 'sldm'; static const uint32 SLIDER_INVOKE_MSG = 'sldi'; -static const uint32 SET_INITIAL_MODE_MSG = 'sinm'; static const uint32 SET_CUSTOM_REFRESH_MSG = 'scrf'; static const uint32 DIM_COUNT_MSG = 'scrf'; static const uint32 MAKE_INITIAL_MSG = 'mkin'; diff --git a/src/preferences/screen/ScreenApplication.cpp b/src/preferences/screen/ScreenApplication.cpp index fb8b1f8f3a..af8a287838 100644 --- a/src/preferences/screen/ScreenApplication.cpp +++ b/src/preferences/screen/ScreenApplication.cpp @@ -43,7 +43,6 @@ void ScreenApplication::MessageReceived(BMessage* message) { switch (message->what) { - case SET_INITIAL_MODE_MSG: case SET_CUSTOM_REFRESH_MSG: case MAKE_INITIAL_MSG: fScreenWindow->PostMessage(message); diff --git a/src/preferences/screen/ScreenMode.h b/src/preferences/screen/ScreenMode.h index 191122d49c..775f775b7e 100644 --- a/src/preferences/screen/ScreenMode.h +++ b/src/preferences/screen/ScreenMode.h @@ -62,7 +62,6 @@ class ScreenMode { uint32 fModeCount; bool fUpdatedModes; - // TODO: hard-coded to the current workspace limit display_mode fOriginalDisplayMode[32]; screen_mode fOriginal[32]; }; diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp index 49db25317f..bb8887f291 100644 --- a/src/preferences/screen/ScreenWindow.cpp +++ b/src/preferences/screen/ScreenWindow.cpp @@ -916,7 +916,7 @@ ScreenWindow::MessageReceived(BMessage* message) break; } - case SET_INITIAL_MODE_MSG: + case BUTTON_UNDO_MSG: fTempScreenMode.Revert(); UpdateActiveMode(); break;