Ticket #7622: debugserver.diff

File debugserver.diff, 1.9 KB (added by mt, 13 years ago)
  • src/servers/debug/Jamfile

     
    1515    libbe.so    # Haiku libbe
    1616    libdebug.so
    1717    $(TARGET_LIBSTDC++)
     18    $(HAIKU_LOCALE_LIBS)
    1819;
     20
     21DoCatalogs debug_server :
     22    x-vnd.Haiku-debug_server
     23    :
     24    DebugServer.cpp
     25;
     26
  • src/servers/debug/DebugServer.cpp

     
    1616#include <AppMisc.h>
    1717#include <AutoDeleter.h>
    1818#include <Autolock.h>
     19#include <Catalog.h>
    1920#include <debug_support.h>
    2021#include <Entry.h>
    2122#include <Invoker.h>
     23#include <Locale.h>
    2224
    2325#include <RegistrarDefs.h>
    2426#include <RosterPrivate.h>
     
    2729#include <util/DoublyLinkedList.h>
    2830
    2931
     32#undef B_TRANSLATE_CONTEXT
     33#define B_TRANSLATE_CONTEXT "DebugServer"
     34
    3035#define USE_GUI true
    3136    // define to false if the debug server shouldn't use GUI (i.e. an alert)
    3237
     
    569574        _NotifyAppServer(fTeam);
    570575        _NotifyRegistrar(fTeam, true, false);
    571576
    572         char buffer[1024];
    573         snprintf(buffer, sizeof(buffer), "The application:\n\n      %s\n\n"
     577        BString buffer(
     578            B_TRANSLATE("The application:\n\n      %app\n\n"
    574579            "has encountered an error which prevents it from continuing. Haiku "
    575             "will terminate the application and clean up.", fTeamInfo.args);
     580            "will terminate the application and clean up."));
     581        buffer.ReplaceFirst("%app", fTeamInfo.args);
    576582
    577583        // TODO: It would be nice if the alert would go away automatically
    578584        // if someone else kills our teams.
    579         BAlert *alert = new BAlert(NULL, buffer, "Debug", "OK", NULL,
     585        BAlert *alert = new BAlert(NULL, buffer.String(),
     586            B_TRANSLATE("Debug"), B_TRANSLATE("OK"), NULL,
    580587            B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    581588        int32 result = alert->Go();
    582589        kill = (result == 1);