From 3b7d1b050fcb69d93fd672ed96c91ad701d9bf24 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 30 Oct 2011 12:48:18 +0000 Subject: [PATCH] Use the proper define to make the string visible only to collectcatkeys. Makes gcc4 happy. Sorry for the inconvenience, build fixed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42996 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../outbound_protocols/smtp/ConfigView.cpp | 3 ++ src/apps/deskbar/BeMenu.cpp | 33 ++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp b/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp index 1477401cb6..083bea1402 100644 --- a/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp +++ b/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp @@ -43,9 +43,12 @@ SMTPConfigView::SMTPConfigView(MailAddonSettings& settings, #endif ) { +#if defined(USE_SSL) || defined(B_COLLECTING_CATKEYS) static const char* kUnencryptedStr = B_TRANSLATE_MARK("Unencrypted"); static const char* kSSLStr = B_TRANSLATE_MARK("SSL"); static const char* kSTARTTLSStr = B_TRANSLATE_MARK("STARTTLS"); +#endif + #ifdef USE_SSL AddFlavor(B_TRANSLATE_NOCOLLECT(kUnencryptedStr)); AddFlavor(B_TRANSLATE(kSSLStr)); diff --git a/src/apps/deskbar/BeMenu.cpp b/src/apps/deskbar/BeMenu.cpp index d51bc8cf7e..240500e6f8 100644 --- a/src/apps/deskbar/BeMenu.cpp +++ b/src/apps/deskbar/BeMenu.cpp @@ -58,18 +58,6 @@ 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 { @@ -256,11 +244,24 @@ 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 +// make them visible to collectcatkeys in either case. +#if defined(B_COLLECTING_CATKEYS)||defined(HAIKU_DISTRO_COMPATIBILITY_OFFICIAL) + static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK( + "About Haiku"); +#endif + +#if defined(B_COLLECTING_CATKEYS)||!defined(HAIKU_DISTRO_COMPATIBILITY_OFFICIAL) + static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK( + "About this system"); +#endif + item = new BMenuItem( #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL - B_TRANSLATE_NOCOLLECT(skAboutHaikuMenuItemStr) + B_TRANSLATE_NOCOLLECT(kAboutHaikuMenuItemStr) #else - B_TRANSLATE_NOCOLLECT(skAboutThisSystemMenuItemStr) + B_TRANSLATE_NOCOLLECT(kAboutThisSystemMenuItemStr) #endif , new BMessage(kShowSplash)); item->SetEnabled(!dragging); @@ -309,9 +310,11 @@ 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(skSuspendMenuItemStr), + item = new BMenuItem(B_TRANSLATE_NOCOLLECT(kSuspendMenuItemStr), new BMessage(kSuspendSystem)); item->SetEnabled(!dragging); shutdownMenu->AddItem(item);