[haiku-commits] r42993 - haiku/trunk/src/apps/pairs
- From: pulkomandy@xxxxxxxxxxxxxxxxx
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Sun, 30 Oct 2011 10:10:24 +0100 (CET)
Author: pulkomandy
Date: 2011-10-30 10:10:23 +0100 (Sun, 30 Oct 2011)
New Revision: 42993
Changeset: https://dev.haiku-os.org/changeset/42993
Ticket: https://dev.haiku-os.org/ticket/7348
Modified:
haiku/trunk/src/apps/pairs/Jamfile
haiku/trunk/src/apps/pairs/Pairs.cpp
haiku/trunk/src/apps/pairs/PairsView.cpp
haiku/trunk/src/apps/pairs/PairsWindow.cpp
Log:
Patch by Karvjorm (#7348): localize Pairs application name.
Modified: haiku/trunk/src/apps/pairs/Jamfile
===================================================================
--- haiku/trunk/src/apps/pairs/Jamfile 2011-10-30 08:53:57 UTC (rev 42992)
+++ haiku/trunk/src/apps/pairs/Jamfile 2011-10-30 09:10:23 UTC (rev 42993)
@@ -16,3 +16,8 @@
PairsView.cpp
PairsWindow.cpp
;
+
+AddCatalogEntryAttribute Pairs
+ :
+ x-vnd.Haiku-Pairs:PairsWindow:Pairs
+;
Modified: haiku/trunk/src/apps/pairs/Pairs.cpp
===================================================================
--- haiku/trunk/src/apps/pairs/Pairs.cpp 2011-10-30 08:53:57 UTC (rev
42992)
+++ haiku/trunk/src/apps/pairs/Pairs.cpp 2011-10-30 09:10:23 UTC (rev
42993)
@@ -7,7 +7,6 @@
#include <Application.h>
#include <Catalog.h>
-#include <Locale.h>
#include "Pairs.h"
#include "PairsWindow.h"
Modified: haiku/trunk/src/apps/pairs/PairsView.cpp
===================================================================
--- haiku/trunk/src/apps/pairs/PairsView.cpp 2011-10-30 08:53:57 UTC (rev
42992)
+++ haiku/trunk/src/apps/pairs/PairsView.cpp 2011-10-30 09:10:23 UTC (rev
42993)
@@ -20,7 +20,6 @@
#include <FindDirectory.h>
#include <IconUtils.h>
#include <List.h>
-#include <Locale.h>
#include <Node.h>
#include <NodeInfo.h>
#include <Path.h>
@@ -171,8 +170,12 @@
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);
}
Modified: haiku/trunk/src/apps/pairs/PairsWindow.cpp
===================================================================
--- haiku/trunk/src/apps/pairs/PairsWindow.cpp 2011-10-30 08:53:57 UTC (rev
42992)
+++ haiku/trunk/src/apps/pairs/PairsWindow.cpp 2011-10-30 09:10:23 UTC (rev
42993)
@@ -12,7 +12,6 @@
#include <Alert.h>
#include <Button.h>
#include <Catalog.h>
-#include <Locale.h>
#include <Menu.h>
#include <MenuBar.h>
#include <MenuItem.h>
@@ -247,6 +246,7 @@
view->SetFontAndColor(0,
strlen(B_TRANSLATE_SYSTEM_NAME("Pairs")), &font);
view->ResizeToPreferred();
+ alert->SetShortcut(0, B_ESCAPE);
if (alert->Go() == 0) {
// New game
Other related posts:
- » [haiku-commits] r42993 - haiku/trunk/src/apps/pairs - pulkomandy