Ticket #7152: app_server-localization.patch
File app_server-localization.patch, 22.9 KB (added by , 13 years ago) |
---|
-
src/servers/app/FontCacheEntry.cpp
31 31 #include <new> 32 32 33 33 #include <Autolock.h> 34 #include <Catalog.h> 34 35 35 36 #include <agg_array.h> 36 37 #include <utf8_functions.h> … … 38 39 39 40 #include "GlobalSubpixelSettings.h" 40 41 42 #undef B_TRANSLATE_CONTEXT 43 #define B_TRANSLATE_CONTEXT "FontCacheEntry" 41 44 45 42 46 BLocker FontCacheEntry::sUsageUpdateLock("FontCacheEntry usage lock"); 43 47 44 48 … … 159 163 160 164 if (!fEngine.Init(font.Path(), 0, font.Size(), charMap, 161 165 renderingType, hinting)) { 162 fprintf(stderr, "FontCacheEntry::Init() - some error loading font"163 " file %s\n", font.Path());166 fprintf(stderr, B_TRANSLATE("FontCacheEntry::Init() - some error " 167 "loading font file %s\n"), font.Path()); 164 168 return false; 165 169 } 166 170 if (fGlyphCache->Init() != B_OK) { 167 fprintf(stderr, "FontCacheEntry::Init() - failed to allocate"168 " GlyphCache table for font file %s\n", font.Path());171 fprintf(stderr, B_TRANSLATE("FontCacheEntry::Init() - failed to " 172 "allocate GlyphCache table for font file %s\n"), font.Path()); 169 173 return false; 170 174 } 171 175 -
src/servers/app/RegionPool.cpp
15 15 #include <debugger.h> 16 16 #endif 17 17 18 #include <Catalog.h> 18 19 #include <Region.h> 19 20 21 #undef B_TRANSLATE_CONTEXT 22 #define B_TRANSLATE_CONTEXT "RegionPool" 23 20 24 using std::nothrow; 21 25 22 26 RegionPool::RegionPool() … … 49 53 region = new (nothrow) BRegion(); 50 54 if (!region) { 51 55 // whoa 52 fprintf(stderr, "RegionPool::GetRegion() - "53 "no memory!\n") ;56 fprintf(stderr, B_TRANSLATE("RegionPool::GetRegion() - " 57 "no memory!\n")); 54 58 } 55 59 } 56 60 #if DEBUG_LEAK … … 72 76 region = new (nothrow) BRegion(other); 73 77 if (!region) { 74 78 // whoa 75 fprintf(stderr, "RegionPool::GetRegion() - "76 "no memory!\n") ;79 fprintf(stderr, B_TRANSLATE("RegionPool::GetRegion() - " 80 "no memory!\n")); 77 81 } 78 82 } 79 83 -
src/servers/app/FontCache.cpp
12 12 #include <stdio.h> 13 13 #include <string.h> 14 14 15 #include <Catalog.h> 15 16 #include <Entry.h> 16 17 #include <Path.h> 17 18 18 19 #include "AutoLocker.h" 19 20 21 #undef B_TRANSLATE_CONTEXT 22 #define B_TRANSLATE_CONTEXT "FontCache" 20 23 24 21 25 using std::nothrow; 22 26 23 27 … … 87 91 entry = new (nothrow) FontCacheEntry(); 88 92 if (!entry || !entry->Init(font) 89 93 || fFontCacheEntries.Put(signature, entry) < B_OK) { 90 fprintf(stderr, "FontCache::FontCacheEntryFor() - "91 "out of memory or no font file\n") ;94 fprintf(stderr, B_TRANSLATE("FontCache::FontCacheEntryFor() - " 95 "out of memory or no font file\n")); 92 96 delete entry; 93 97 return NULL; 94 98 } -
src/servers/app/EventStream.cpp
9 9 10 10 #include "EventStream.h" 11 11 12 #include <Catalog.h> 12 13 #include <InputServerTypes.h> 13 14 #include <ServerProtocol.h> 14 15 #include <shared_cursor_area.h> … … 17 18 #include <stdio.h> 18 19 #include <string.h> 19 20 21 #undef B_TRANSLATE_CONTEXT 22 #define B_TRANSLATE_CONTEXT "EventStream" 20 23 24 21 25 EventStream::EventStream() 22 26 { 23 27 } … … 266 270 delete[] buffer; 267 271 268 272 if (status != B_OK) { 269 printf("Unflatten event failed: %s, port message code was: %ld - %c%c%c%c\n", 273 printf(B_TRANSLATE("Unflatten event failed: %s, " 274 "port message code was: %ld - %c%c%c%c\n"), 270 275 strerror(status), code, (int8)(code >> 24), (int8)(code >> 16), 271 276 (int8)(code >> 8), (int8)code); 272 277 delete message; -
src/servers/app/DrawState.cpp
17 17 #include <new> 18 18 #include <stdio.h> 19 19 20 #include <Catalog.h> 20 21 #include <Region.h> 21 22 22 23 #include "LinkReceiver.h" 23 24 #include "LinkSender.h" 24 25 #include "ServerProtocolStructs.h" 25 26 27 #undef B_TRANSLATE_CONTEXT 28 #define B_TRANSLATE_CONTEXT "DrawState" 26 29 27 30 using std::nothrow; 28 31 … … 625 628 void 626 629 DrawState::PrintToStream() const 627 630 { 628 printf( "\t Origin: (%.1f, %.1f)\n", fOrigin.x, fOrigin.y);629 printf( "\t Scale: %.2f\n", fScale);631 printf(B_TRANSLATE("\t Origin: (%.1f, %.1f)\n"), fOrigin.x, fOrigin.y); 632 printf(B_TRANSLATE("\t Scale: %.2f\n"), fScale); 630 633 631 printf( "\t Pen Location and Size: (%.1f, %.1f) - %.2f (%.2f)\n",632 634 printf(B_TRANSLATE("\t Pen Location and Size: (%.1f, %.1f) - %.2f " 635 "(%.2f)\n"), fPenLocation.x, fPenLocation.y, PenSize(), fPenSize); 633 636 634 printf( "\t HighColor: r=%d g=%d b=%d a=%d\n",637 printf(B_TRANSLATE("\t HighColor: r=%d g=%d b=%d a=%d\n"), 635 638 fHighColor.red, fHighColor.green, fHighColor.blue, fHighColor.alpha); 636 printf( "\t LowColor: r=%d g=%d b=%d a=%d\n",639 printf(B_TRANSLATE("\t LowColor: r=%d g=%d b=%d a=%d\n"), 637 640 fLowColor.red, fLowColor.green, fLowColor.blue, fLowColor.alpha); 638 printf( "\t Pattern: %llu\n", fPattern.GetInt64());641 printf(B_TRANSLATE("\t Pattern: %llu\n"), fPattern.GetInt64()); 639 642 640 printf( "\t DrawMode: %lu\n", (uint32)fDrawingMode);641 printf( "\t AlphaSrcMode: %ld\t AlphaFncMode: %ld\n",643 printf(B_TRANSLATE("\t DrawMode: %lu\n"), (uint32)fDrawingMode); 644 printf(B_TRANSLATE("\t AlphaSrcMode: %ld\t AlphaFncMode: %ld\n"), 642 645 (int32)fAlphaSrcMode, (int32)fAlphaFncMode); 643 646 644 printf( "\t LineCap: %d\t LineJoin: %d\t MiterLimit: %.2f\n",647 printf(B_TRANSLATE("\t LineCap: %d\t LineJoin: %d\t MiterLimit: %.2f\n"), 645 648 (int16)fLineCapMode, (int16)fLineJoinMode, fMiterLimit); 646 649 647 650 if (fClippingRegion) 648 651 fClippingRegion->PrintToStream(); 649 652 650 printf( "\t ===== Font Data =====\n");651 printf( "\t Style: CURRENTLY NOT SET\n"); // ???652 printf( "\t Size: %.1f (%.1f)\n", fFont.Size(), fUnscaledFontSize);653 printf( "\t Shear: %.2f\n", fFont.Shear());654 printf( "\t Rotation: %.2f\n", fFont.Rotation());655 printf( "\t Spacing: %ld\n", fFont.Spacing());656 printf( "\t Encoding: %ld\n", fFont.Encoding());657 printf( "\t Face: %d\n", fFont.Face());658 printf( "\t Flags: %lu\n", fFont.Flags());653 printf(B_TRANSLATE("\t ===== Font Data =====\n")); 654 printf(B_TRANSLATE("\t Style: CURRENTLY NOT SET\n")); // ??? 655 printf(B_TRANSLATE("\t Size: %.1f (%.1f)\n"), fFont.Size(), fUnscaledFontSize); 656 printf(B_TRANSLATE("\t Shear: %.2f\n"), fFont.Shear()); 657 printf(B_TRANSLATE("\t Rotation: %.2f\n"), fFont.Rotation()); 658 printf(B_TRANSLATE("\t Spacing: %ld\n"), fFont.Spacing()); 659 printf(B_TRANSLATE("\t Encoding: %ld\n"), fFont.Encoding()); 660 printf(B_TRANSLATE("\t Face: %d\n"), fFont.Face()); 661 printf(B_TRANSLATE("\t Flags: %lu\n"), fFont.Flags()); 659 662 } 660 663 -
src/servers/app/ServerApp.cpp
29 29 30 30 #include <AppDefs.h> 31 31 #include <Autolock.h> 32 #include <Catalog.h> 32 33 #include <Debug.h> 34 #include <FontPrivate.h> 33 35 #include <List.h> 34 #include <ScrollBar.h>35 #include <Shape.h>36 #include <String.h>37 38 #include <FontPrivate.h>39 36 #include <MessengerPrivate.h> 40 37 #include <PrivateScreen.h> 41 38 #include <RosterPrivate.h> 39 #include <ScrollBar.h> 42 40 #include <ServerProtocol.h> 41 #include <Shape.h> 42 #include <String.h> 43 43 #include <WindowPrivate.h> 44 44 45 45 #include "AppServer.h" … … 64 64 #include "SystemPalette.h" 65 65 #include "Window.h" 66 66 67 #undef B_TRANSLATE_CONTEXT 68 #define B_TRANSLATE_CONTEXT "ServerApp" 67 69 68 70 //#define DEBUG_SERVERAPP 69 71 #ifdef DEBUG_SERVERAPP … … 3144 3146 } 3145 3147 3146 3148 default: 3147 printf( "ServerApp %s received unhandled message code %ld\n",3148 Signature(), code);3149 printf(B_TRANSLATE("ServerApp %s received unhandled message code " 3150 "%ld\n"), Signature(), code); 3149 3151 3150 3152 if (link.NeedsReply()) { 3151 3153 // the client is now blocking and waiting for a reply! 3152 3154 fLink.StartMessage(B_ERROR); 3153 3155 fLink.Flush(); 3154 3156 } else 3155 puts( "message doesn't need a reply!");3157 puts(B_TRANSLATE("message doesn't need a reply!")); 3156 3158 break; 3157 3159 } 3158 3160 } -
src/servers/app/View.cpp
28 28 29 29 #include "drawing_support.h" 30 30 31 #include <Catalog.h> 32 #include <GradientLinear.h> 33 #include <GradientRadial.h> 34 #include <GradientRadialFocus.h> 35 #include <GradientDiamond.h> 36 #include <GradientConic.h> 31 37 #include <List.h> 32 38 #include <Message.h> 33 39 #include <PortLink.h> 34 40 #include <View.h> // for resize modes 35 41 #include <WindowPrivate.h> 36 42 37 #include <GradientLinear.h> 38 #include <GradientRadial.h> 39 #include <GradientRadialFocus.h> 40 #include <GradientDiamond.h> 41 #include <GradientConic.h> 43 #undef B_TRANSLATE_CONTEXT 44 #define B_TRANSLATE_CONTEXT "View" 42 45 43 44 46 using std::nothrow; 45 47 46 48 … … 224 226 View::AddChild(View* view) 225 227 { 226 228 if (view->fParent) { 227 printf( "View::AddChild() - View already has a parent\n");229 printf(B_TRANSLATE("View::AddChild() - View already has a parent\n")); 228 230 return; 229 231 } 230 232 … … 267 269 View::RemoveChild(View* view) 268 270 { 269 271 if (view == NULL || view->fParent != this) { 270 printf( "View::RemoveChild(%p - %s) - View is not child of "271 "this (%p) view!\n" , view, view ? view->Name() : NULL, this);272 printf(B_TRANSLATE("View::RemoveChild(%p - %s) - View is not child of " 273 "this (%p) view!\n"), view, view ? view->Name() : NULL, this); 272 274 return false; 273 275 } 274 276 … … 1266 1268 View::PopState() 1267 1269 { 1268 1270 if (fDrawState->PreviousState() == NULL) { 1269 fprintf(stderr, "WARNING: User called BView(%s)::PopState(), " 1270 "but there is NO state on stack!\n", Name()); 1271 fprintf(stderr, B_TRANSLATE("WARNING: User called " 1272 "BView(%s)::PopState(), but there is NO state on stack!\n"), 1273 Name()); 1271 1274 return; 1272 1275 } 1273 1276 … … 1625 1628 fLocalClipping.PrintToStream(); 1626 1629 printf(" fScreenClipping:\n"); 1627 1630 fScreenClipping.PrintToStream(); 1628 printf(" valid: %d\n", fScreenClippingValid); 1631 printf(B_TRANSLATE(" valid: %d\n"), 1632 fScreenClippingValid); 1629 1633 1630 1634 printf(" fUserClipping:\n"); 1631 1635 if (fUserClipping != NULL) 1632 1636 fUserClipping->PrintToStream(); 1633 1637 else 1634 printf( " none\n");1638 printf(B_TRANSLATE(" none\n")); 1635 1639 1636 1640 printf(" fScreenAndUserClipping:\n"); 1637 1641 if (fScreenAndUserClipping != NULL) 1638 1642 fScreenAndUserClipping->PrintToStream(); 1639 1643 else 1640 printf( " invalid\n");1644 printf(B_TRANSLATE(" invalid\n")); 1641 1645 1642 printf( " state:\n");1643 printf( " user clipping: %d\n", fDrawState->HasClipping());1646 printf(B_TRANSLATE(" state:\n")); 1647 printf(B_TRANSLATE(" user clipping: %d\n"), fDrawState->HasClipping()); 1644 1648 BPoint origin = fDrawState->CombinedOrigin(); 1645 printf(" origin: BPoint(%.1f, %.1f)\n", origin.x, origin.y); 1646 printf(" scale: %.2f\n", fDrawState->CombinedScale()); 1649 printf(B_TRANSLATE(" origin: BPoint(%.1f, %.1f)\n"), origin.x, 1650 origin.y); 1651 printf(B_TRANSLATE(" scale: %.2f\n"), 1652 fDrawState->CombinedScale()); 1647 1653 printf("\n"); 1648 1654 } 1649 1655 -
src/servers/app/ServerPicture.cpp
23 23 #include "View.h" 24 24 #include "Window.h" 25 25 26 #include <Bitmap.h> 27 #include <Catalog.h> 28 #include <Debug.h> 26 29 #include <LinkReceiver.h> 30 #include <List.h> 27 31 #include <OffsetFile.h> 28 32 #include <ObjectListPrivate.h> 29 33 #include <PicturePlayer.h> 30 34 #include <PictureProtocol.h> 31 35 #include <PortLink.h> 32 36 #include <ServerProtocol.h> 37 #include <Shape.h> 33 38 #include <ShapePrivate.h> 34 39 35 #include <Bitmap.h> 36 #include <Debug.h> 37 #include <List.h> 38 #include <Shape.h> 40 #undef B_TRANSLATE_CONTEXT 41 #define B_TRANSLATE_CONTEXT "ServerPicture" 39 42 40 43 41 44 using std::stack; … … 545 548 static void 546 549 clip_to_picture(View* view, BPicture* picture, BPoint pt, bool clipToInverse) 547 550 { 548 printf("ClipToPicture(picture, BPoint(%.2f, %.2f), %s)\n", 549 pt.x, pt.y, clipToInverse ? "inverse" : ""); 551 if (clipToInverse) 552 printf(B_TRANSLATE("ClipToPicture(picture, BPoint(%.2f, %.2f), \"inverse\")\n"), 553 pt.x, pt.y); 554 else 555 printf(B_TRANSLATE("ClipToPicture(picture, BPoint(%.2f, %.2f), \"\")\n"), 556 pt.x, pt.y); 550 557 } 551 558 552 559 -
src/servers/app/MessageLooper.cpp
10 10 #include "MessageLooper.h" 11 11 12 12 #include <Autolock.h> 13 #include <Catalog.h> 13 14 #include <stdio.h> 14 15 #include <string.h> 15 16 17 #undef B_TRANSLATE_CONTEXT 18 #define B_TRANSLATE_CONTEXT "MessageLooper" 16 19 20 17 21 MessageLooper::MessageLooper(const char* name) 18 22 : BLocker(name), 19 23 fThread(-1), … … 123 127 if (get_sem_info(semaphore, &info) == B_OK) 124 128 strlcpy(name, info.name, length); 125 129 else 126 strlcpy(name, "unnamed looper", length);130 strlcpy(name, B_TRANSLATE("unnamed looper"), length); 127 131 } 128 132 129 133 … … 145 149 // that shouldn't happen, it's our port 146 150 char name[256]; 147 151 _GetLooperName(name, 256); 148 printf("MessageLooper \"%s\": Someone deleted our message port %ld, %s!\n", 149 name, receiver.Port(), strerror(status)); 152 printf(B_TRANSLATE("MessageLooper \"%s\": Someone deleted our " 153 "message port %ld, %s!\n"), name, receiver.Port(), 154 strerror(status)); 150 155 break; 151 156 } 152 157 -
src/servers/app/Jamfile
68 68 : 69 69 libtranslation.so libbe.so libbnetapi.so 70 70 libasdrawing.a libasremote.a libpainter.a libagg.a libfreetype.so 71 libtextencoding.so libshared.a $(TARGET_LIBSTDC++) 71 libtextencoding.so libshared.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) 72 72 73 73 : app_server.rdef 74 74 ; 75 75 76 DoCatalogs app_server : 77 x-vnd.Haiku-app-server 78 : 79 CursorSet.cpp 80 DrawState.cpp 81 EventStream.cpp 82 FontCache.cpp 83 FontCacheEntry.cpp 84 MessageLooper.cpp 85 ProfileMessageSupport.cpp 86 RegionPool.cpp 87 ServerApp.cpp 88 ServerBitmap.cpp 89 ServerPicture.cpp 90 ServerWindow.cpp 91 View.cpp 92 Window.cpp 93 ; 94 76 95 SubInclude HAIKU_TOP src servers app drawing ; -
src/servers/app/ServerWindow.cpp
31 31 32 32 #include <AppDefs.h> 33 33 #include <Autolock.h> 34 #include <Catalog.h> 34 35 #include <Debug.h> 35 36 #include <DirectWindow.h> 36 #include <TokenSpace.h>37 #include <View.h>38 37 #include <GradientLinear.h> 39 38 #include <GradientRadial.h> 40 39 #include <GradientRadialFocus.h> 41 40 #include <GradientDiamond.h> 42 41 #include <GradientConic.h> 43 44 42 #include <MessagePrivate.h> 45 43 #include <PortLink.h> 46 44 #include <ServerProtocolStructs.h> 45 #include <TokenSpace.h> 46 #include <View.h> 47 47 #include <ViewPrivate.h> 48 48 #include <WindowInfo.h> 49 49 #include <WindowPrivate.h> … … 68 68 #include "Window.h" 69 69 #include "WorkspacesView.h" 70 70 71 #undef B_TRANSLATE_CONTEXT 72 #define B_TRANSLATE_CONTEXT "ServerWindow" 71 73 74 72 75 using std::nothrow; 73 76 74 77 … … 151 154 ServerWindow::ServerWindow(const char* title, ServerApp* app, 152 155 port_id clientPort, port_id looperPort, int32 clientToken) 153 156 : 154 MessageLooper(title && *title ? title : "Unnamed Window"),157 MessageLooper(title && *title ? title : B_TRANSLATE("Unnamed Window")), 155 158 fTitle(NULL), 156 159 fDesktop(app->GetDesktop()), 157 160 fServerApp(app), … … 326 329 { 327 330 const char *title = Title(); 328 331 if (title == NULL || !title[0]) 329 title = "Unnamed Window";332 title = B_TRANSLATE("Unnamed Window"); 330 333 331 334 snprintf(name, length, "w:%ld:%s", ClientTeam(), title); 332 335 } … … 3364 3367 status_t status = receiver.GetNextMessage(code); 3365 3368 if (status != B_OK) { 3366 3369 // that shouldn't happen, it's our port 3367 printf( "Someone deleted our message port!\n");3370 printf(B_TRANSLATE("Someone deleted our message port!\n")); 3368 3371 3369 3372 // try to let our client die happily 3370 3373 NotifyQuitRequested(); … … 3484 3487 status_t status = receiver.GetNextMessage(code); 3485 3488 if (status != B_OK) { 3486 3489 // that shouldn't happen, it's our port 3487 printf( "Someone deleted our message port!\n");3490 printf(B_TRANSLATE("Someone deleted our message port!\n")); 3488 3491 if (lockedDesktopSingleWindow) 3489 3492 fDesktop->UnlockSingleWindow(); 3490 3493 … … 3751 3754 ServerWindow::PictureToRegion(ServerPicture* picture, BRegion& region, 3752 3755 bool inverse, BPoint where) 3753 3756 { 3754 fprintf(stderr, "ServerWindow::PictureToRegion() not implemented\n"); 3757 fprintf(stderr, B_TRANSLATE("ServerWindow::PictureToRegion() not " 3758 "implemented\n")); 3755 3759 region.MakeEmpty(); 3756 3760 return B_ERROR; 3757 3761 } -
src/servers/app/ProfileMessageSupport.cpp
9 9 10 10 #include "ProfileMessageSupport.h" 11 11 12 #include <Catalog.h> 12 13 #include <ServerProtocol.h> 13 14 15 #undef B_TRANSLATE_CONTEXT 16 #define B_TRANSLATE_CONTEXT "ProfileMessageSupport" 14 17 18 15 19 void 16 20 string_for_message_code(uint32 code, BString& string) 17 21 { … … 310 314 CODE(AS_DIRECT_WINDOW_SET_FULLSCREEN); 311 315 312 316 default: 313 string << "unkown code:" << code;317 string << B_TRANSLATE("unknown code:") << " " << code; 314 318 break; 315 319 } 316 320 } -
src/servers/app/ServerBitmap.cpp
10 10 11 11 #include "ServerBitmap.h" 12 12 13 #include <Catalog.h> 13 14 #include <new> 14 15 #include <stdio.h> 15 16 #include <stdlib.h> … … 23 24 #include "Overlay.h" 24 25 #include "ServerApp.h" 25 26 27 #undef B_TRANSLATE_CONTEXT 28 #define B_TRANSLATE_CONTEXT "ServerBitmap" 26 29 30 27 31 using std::nothrow; 28 32 using namespace BPrivate; 29 33 … … 210 214 void 211 215 ServerBitmap::PrintToStream() 212 216 { 213 printf("Bitmap@%p: (%ld:%ld), space %ld, bpr %ld, buffer %p\n", 214 this, fWidth, fHeight, (int32)fSpace, fBytesPerRow, fBuffer); 217 printf(B_TRANSLATE("Bitmap@%p: (%ld:%ld), space %ld, bpr %ld, " 218 "buffer %p\n"), this, fWidth, fHeight, (int32)fSpace, 219 fBytesPerRow, fBuffer); 215 220 } 216 221 217 222 -
src/servers/app/Window.cpp
28 28 #include "Workspace.h" 29 29 #include "WorkspacesView.h" 30 30 31 #include <ViewPrivate.h> 32 #include <WindowPrivate.h> 33 31 #include <Catalog.h> 34 32 #include <Debug.h> 35 33 #include <DirectWindow.h> 36 34 #include <PortLink.h> 37 35 #include <View.h> 36 #include <ViewPrivate.h> 37 #include <WindowPrivate.h> 38 38 39 39 #include <new> 40 40 #include <stdio.h> 41 41 42 #undef B_TRANSLATE_CONTEXT 43 #define B_TRANSLATE_CONTEXT "Window" 42 44 43 45 // Toggle debug output 44 46 //#define DEBUG_WINDOW … … 1766 1768 if (!fUpdateRequested) { 1767 1769 link.StartMessage(B_ERROR); 1768 1770 link.Flush(); 1769 fprintf(stderr, "Window::BeginUpdate() - no update requested!\n"); 1771 fprintf(stderr, B_TRANSLATE("Window::BeginUpdate() - no update " 1772 "requested!\n")); 1770 1773 return; 1771 1774 } 1772 1775 -
src/servers/app/CursorSet.cpp
11 11 #include "ServerCursor.h" 12 12 13 13 #include <AppServerLink.h> 14 #include <Catalog.h> 15 #include <File.h> 16 #include <OS.h> 14 17 #include <PortLink.h> 15 18 #include <ServerProtocol.h> 16 17 #include <OS.h>18 19 #include <String.h> 19 #include <File.h>20 20 21 21 #include <new> 22 22 23 #undef B_TRANSLATE_CONTEXT 24 #define B_TRANSLATE_CONTEXT "CursorSet" 23 25 24 26 /*! 25 27 \brief Constructor … … 28 30 CursorSet::CursorSet(const char *name) 29 31 : BMessage() 30 32 { 31 AddString("name", name != NULL ? name : "Untitled"); 33 AddString("name", name != NULL ? name : 34 B_TRANSLATE_COMMENT("Untitled","Without name")); 32 35 } 33 36 34 37 … … 302 305 { 303 306 switch (which) { 304 307 case B_CURSOR_ID_SYSTEM_DEFAULT: 305 return "System default";308 return B_TRANSLATE("System default"); 306 309 case B_CURSOR_ID_CONTEXT_MENU: 307 return "Context menu";310 return B_TRANSLATE("Context menu"); 308 311 case B_CURSOR_ID_COPY: 309 return "Copy";312 return B_TRANSLATE("Copy"); 310 313 case B_CURSOR_ID_CROSS_HAIR: 311 return "Cross hair";314 return B_TRANSLATE("Cross hair"); 312 315 case B_CURSOR_ID_NO_CURSOR: 313 return "No cursor";316 return B_TRANSLATE("No cursor"); 314 317 case B_CURSOR_ID_FOLLOW_LINK: 315 return "Follow link";318 return B_TRANSLATE("Follow link"); 316 319 case B_CURSOR_ID_GRAB: 317 return "Grab";320 return B_TRANSLATE("Grab"); 318 321 case B_CURSOR_ID_GRABBING: 319 return "Grabbing";322 return B_TRANSLATE("Grabbing"); 320 323 case B_CURSOR_ID_HELP: 321 return "Help";324 return B_TRANSLATE("Help"); 322 325 case B_CURSOR_ID_I_BEAM: 323 return "I-beam";326 return B_TRANSLATE("I-beam"); 324 327 case B_CURSOR_ID_I_BEAM_HORIZONTAL: 325 return "I-beam horizontal";328 return B_TRANSLATE("I-beam horizontal"); 326 329 case B_CURSOR_ID_MOVE: 327 return "Move";330 return B_TRANSLATE("Move"); 328 331 case B_CURSOR_ID_NOT_ALLOWED: 329 return "Not allowed";332 return B_TRANSLATE("Not allowed"); 330 333 case B_CURSOR_ID_PROGRESS: 331 return "Progress";334 return B_TRANSLATE("Progress"); 332 335 case B_CURSOR_ID_RESIZE_NORTH: 333 return "Resize North";336 return B_TRANSLATE("Resize North"); 334 337 case B_CURSOR_ID_RESIZE_EAST: 335 return "Resize East";338 return B_TRANSLATE("Resize East"); 336 339 case B_CURSOR_ID_RESIZE_SOUTH: 337 return "Resize South";340 return B_TRANSLATE("Resize South"); 338 341 case B_CURSOR_ID_RESIZE_WEST: 339 return "Resize West";342 return B_TRANSLATE("Resize West"); 340 343 case B_CURSOR_ID_RESIZE_NORTH_EAST: 341 return "Resize North East";344 return B_TRANSLATE("Resize North East"); 342 345 case B_CURSOR_ID_RESIZE_NORTH_WEST: 343 return "Resize North West";346 return B_TRANSLATE("Resize North West"); 344 347 case B_CURSOR_ID_RESIZE_SOUTH_EAST: 345 return "Resize South East";348 return B_TRANSLATE("Resize South East"); 346 349 case B_CURSOR_ID_RESIZE_SOUTH_WEST: 347 return "Resize South West";350 return B_TRANSLATE("Resize South West"); 348 351 case B_CURSOR_ID_RESIZE_NORTH_SOUTH: 349 return "Resize North South";352 return B_TRANSLATE("Resize North South"); 350 353 case B_CURSOR_ID_RESIZE_EAST_WEST: 351 return "Resize East West";354 return B_TRANSLATE("Resize East West"); 352 355 case B_CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST: 353 return "Resize North East South West";356 return B_TRANSLATE("Resize North East South West"); 354 357 case B_CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST: 355 return "Resize North West South East";358 return B_TRANSLATE("Resize North West South East"); 356 359 case B_CURSOR_ID_ZOOM_IN: 357 return "Zoom in";360 return B_TRANSLATE("Zoom in"); 358 361 case B_CURSOR_ID_ZOOM_OUT: 359 return "Zoom out";362 return B_TRANSLATE("Zoom out"); 360 363 default: 361 return "Invalid";364 return B_TRANSLATE("Invalid"); 362 365 } 363 366 } 364 367