From 5b264395c068fa5a9b22121bafc5ae58197710e6 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 30 Oct 2011 09:10:23 +0000 Subject: [PATCH] Patch by Karvjorm (#7348): localize Pairs application name. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42993 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/pairs/Jamfile | 5 +++++ src/apps/pairs/Pairs.cpp | 1 - src/apps/pairs/PairsView.cpp | 9 ++++++--- src/apps/pairs/PairsWindow.cpp | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/apps/pairs/Jamfile b/src/apps/pairs/Jamfile index a8585d066f..3127be1c09 100644 --- a/src/apps/pairs/Jamfile +++ b/src/apps/pairs/Jamfile @@ -16,3 +16,8 @@ DoCatalogs Pairs : PairsView.cpp PairsWindow.cpp ; + +AddCatalogEntryAttribute Pairs + : + x-vnd.Haiku-Pairs:PairsWindow:Pairs +; diff --git a/src/apps/pairs/Pairs.cpp b/src/apps/pairs/Pairs.cpp index 7c3798edb3..0857716530 100644 --- a/src/apps/pairs/Pairs.cpp +++ b/src/apps/pairs/Pairs.cpp @@ -7,7 +7,6 @@ #include #include -#include #include "Pairs.h" #include "PairsWindow.h" diff --git a/src/apps/pairs/PairsView.cpp b/src/apps/pairs/PairsView.cpp index 6cee5dae66..1041b03409 100644 --- a/src/apps/pairs/PairsView.cpp +++ b/src/apps/pairs/PairsView.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -171,8 +170,12 @@ PairsView::_ReadRandomIcons() snprintf(buffer, sizeof(buffer), B_TRANSLATE("Pairs did not find " "enough vector icons in the system; it needs at least %d."), fNumOfCards / 2); - BAlert* alert = new BAlert("fatal", buffer, B_TRANSLATE("OK"), - NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT); + BString msgStr(buffer); + msgStr << "\n"; + BAlert* alert = new BAlert("Fatal", msgStr.String(), + B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, + B_STOP_ALERT); + alert->SetShortcut(0, B_ESCAPE); alert->Go(); exit(1); } diff --git a/src/apps/pairs/PairsWindow.cpp b/src/apps/pairs/PairsWindow.cpp index 03ade3f296..a78fddfe38 100644 --- a/src/apps/pairs/PairsWindow.cpp +++ b/src/apps/pairs/PairsWindow.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -247,6 +246,7 @@ PairsWindow::MessageReceived(BMessage* message) view->SetFontAndColor(0, strlen(B_TRANSLATE_SYSTEM_NAME("Pairs")), &font); view->ResizeToPreferred(); + alert->SetShortcut(0, B_ESCAPE); if (alert->Go() == 0) { // New game