[haiku-commits] haiku: hrev44205 - in src: apps/deskbar add-ons/mail_daemon/outbound_protocols/smtp

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 27 May 2012 09:34:22 +0200 (CEST)

hrev44205 adds 1 changeset to branch 'master'
old head: 85136facdeaac7df6ae1f0b4f2dbfb3550ded245
new head: 028ad0311cbf31c75dfa6da3f7f912a98969ce14

----------------------------------------------------------------------------

028ad03: Fix collecting of ifdef dependant strings
  
  Following some recent changes, the collection of strings does not use
  B_COLLECTING_CATKEYS define anymore. Adjust the code to use
  B_TRANSLATE_MARK_VOID instead, leading to the same result (string is
  added to catalog, but not used)

                [ Adrien Destugues - PulkoMandy <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44205
Commit:      028ad0311cbf31c75dfa6da3f7f912a98969ce14
URL:         http://cgit.haiku-os.org/haiku/commit/?id=028ad03
Author:      Adrien Destugues - PulkoMandy <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun May 27 06:42:33 2012 UTC

----------------------------------------------------------------------------

2 files changed, 12 insertions(+), 23 deletions(-)
.../outbound_protocols/smtp/ConfigView.cpp         |   14 +++++------
src/apps/deskbar/DeskbarMenu.cpp                   |   21 +++++-----------

----------------------------------------------------------------------------

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 6024b56..888c451 100644
--- a/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp
+++ b/src/add-ons/mail_daemon/outbound_protocols/smtp/ConfigView.cpp
@@ -43,16 +43,14 @@ 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
+       B_TRANSLATE_MARK_VOID("Unencrypted");
+       B_TRANSLATE_MARK_VOID("SSL");
+       B_TRANSLATE_MARK_VOID("STARTTLS");
 
 #ifdef USE_SSL
-       AddFlavor(B_TRANSLATE_NOCOLLECT(kUnencryptedStr));
-       AddFlavor(B_TRANSLATE(kSSLStr));
-       AddFlavor(B_TRANSLATE(kSTARTTLSStr));
+       AddFlavor(B_TRANSLATE_NOCOLLECT("Unencrypted"));
+       AddFlavor(B_TRANSLATE("SSL"));
+       AddFlavor(B_TRANSLATE("STARTTLS"));
 #endif
 
        AddAuthMethod(B_TRANSLATE("None"), false);
diff --git a/src/apps/deskbar/DeskbarMenu.cpp b/src/apps/deskbar/DeskbarMenu.cpp
index bd0bd65..04d51fb 100644
--- a/src/apps/deskbar/DeskbarMenu.cpp
+++ b/src/apps/deskbar/DeskbarMenu.cpp
@@ -253,21 +253,14 @@ TDeskbarMenu::AddStandardDeskbarMenuItems()
 // 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
+B_TRANSLATE_MARK_VOID("About Haiku")
+B_TRANSLATE_MARK_VOID("About this system")
 
        item = new BMenuItem(
 #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
-       B_TRANSLATE_NOCOLLECT(kAboutHaikuMenuItemStr)
+       B_TRANSLATE_NOCOLLECT("About Haiku")
 #else
-       B_TRANSLATE_NOCOLLECT(kAboutThisSystemMenuItemStr)
+       B_TRANSLATE_NOCOLLECT("About this system")
 #endif
                , new BMessage(kShowSplash));
        item->SetEnabled(!dragging);
@@ -316,13 +309,11 @@ TDeskbarMenu::AddStandardDeskbarMenuItems()
        item->SetEnabled(!dragging);
        shutdownMenu->AddItem(item);
 
-#if defined(APM_SUPPORT) || defined(B_COLLECTING_CATKEYS)
-       static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend");
-#endif
+       B_TRANSLATE_MARK_VOID("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("Suspend"),
                        new BMessage(kSuspendSystem));
                item->SetEnabled(!dragging);
                shutdownMenu->AddItem(item);


Other related posts:

  • » [haiku-commits] haiku: hrev44205 - in src: apps/deskbar add-ons/mail_daemon/outbound_protocols/smtp - pulkomandy