diff --git a/src/apps/deskbar/BeMenu.cpp b/src/apps/deskbar/BeMenu.cpp index 6017f44094..d51bc8cf7e 100644 --- a/src/apps/deskbar/BeMenu.cpp +++ b/src/apps/deskbar/BeMenu.cpp @@ -58,6 +58,18 @@ All rights reserved. #define ROSTER_SIG "application/x-vnd.Be-ROST" + +// One of them is used if HAIKU_DISTRO_COMPATIBILITY_OFFICIAL, and the other if +// not. However, we want both of them to end up in the catalog, so we have to +// put them outside of the ifdef block. +static const char* skSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend"); +static const char* skAboutHaikuMenuItemStr = B_TRANSLATE_MARK( + "About Haiku"); +static const char* skAboutThisSystemMenuItemStr = B_TRANSLATE_MARK( + "About this system"); + + + #ifdef MOUNT_MENU_IN_DESKBAR class DeskbarMountMenu : public BPrivate::MountMenu { @@ -244,19 +256,11 @@ TBeMenu::AddStandardBeMenuItems() AddSeparatorItem(); } -// One of them is used if HAIKU_DISTRO_COMPATIBILITY_OFFICIAL, and the other if -// not. However, we want both of them to end up in the catalog, so we have to -// put them outside of the ifdef block. - static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK( - "About Haiku"); - static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK( - "About this system"); - item = new BMenuItem( #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL - B_TRANSLATE_NOCOLLECT(kAboutHaikuMenuItemStr) + B_TRANSLATE_NOCOLLECT(skAboutHaikuMenuItemStr) #else - B_TRANSLATE_NOCOLLECT(kAboutThisSystemMenuItemStr) + B_TRANSLATE_NOCOLLECT(skAboutThisSystemMenuItemStr) #endif , new BMessage(kShowSplash)); item->SetEnabled(!dragging); @@ -305,11 +309,9 @@ TBeMenu::AddStandardBeMenuItems() item->SetEnabled(!dragging); shutdownMenu->AddItem(item); - // String outside of ifdef block for collectcatkeys purposes - static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend"); #ifdef APM_SUPPORT if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) { - item = new BMenuItem(B_TRANSLATE_NOCOLLECT(kSuspendMenuItemStr), + item = new BMenuItem(B_TRANSLATE_NOCOLLECT(skSuspendMenuItemStr), new BMessage(kSuspendSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item);