Ticket #7348: pairs-catalog-entry-attribute.patch

File pairs-catalog-entry-attribute.patch, 2.1 KB (added by Karvjorm, 13 years ago)

A CatalogEntryAttribute patch for Pairs application

  • src/apps/pairs/Pairs.cpp

     
    77
    88#include <Application.h>
    99#include <Catalog.h>
    10 #include <Locale.h>
    1110
    1211#include "Pairs.h"
    1312#include "PairsWindow.h"
  • src/apps/pairs/Jamfile

     
    1616    PairsView.cpp
    1717    PairsWindow.cpp
    1818;
     19
     20AddCatalogEntryAttribute Pairs
     21    :
     22    x-vnd.Haiku-Pairs:PairsWindow:Pairs
     23;
  • src/apps/pairs/PairsWindow.cpp

     
    1212#include <Alert.h>
    1313#include <Button.h>
    1414#include <Catalog.h>
    15 #include <Locale.h>
    1615#include <Menu.h>
    1716#include <MenuBar.h>
    1817#include <MenuItem.h>
     
    246245                    font.SetFace(B_BOLD_FACE);
    247246                    view->SetFontAndColor(0, 6, &font);
    248247                    view->ResizeToPreferred();
     248                    alert->SetShortcut(0, B_ESCAPE);
    249249
    250250                    if (alert->Go() == 0) {
    251251                        // New game
  • src/apps/pairs/PairsView.cpp

     
    2020#include <FindDirectory.h>
    2121#include <IconUtils.h>
    2222#include <List.h>
    23 #include <Locale.h>
    2423#include <Node.h>
    2524#include <NodeInfo.h>
    2625#include <Path.h>
     
    171170            snprintf(buffer, sizeof(buffer), B_TRANSLATE("Pairs did not find "
    172171                "enough vector icons in the system; it needs at least %d."),
    173172                fNumOfCards / 2);
    174             BAlert* alert = new BAlert("fatal", buffer, B_TRANSLATE("OK"),
    175                 NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     173            BString msgStr(buffer);
     174            msgStr << "\n";
     175            BAlert* alert = new BAlert("Fatal", msgStr.String(),
     176                B_TRANSLATE("OK"),  NULL, NULL, B_WIDTH_FROM_WIDEST,
     177                B_STOP_ALERT);
     178            alert->SetShortcut(0, B_ESCAPE);
    176179            alert->Go();
    177180            exit(1);
    178181        }