diff --git a/src/apps/processcontroller/Preferences.cpp b/src/apps/processcontroller/Preferences.cpp index b8a3dfc5d7..90cc7e8c92 100644 --- a/src/apps/processcontroller/Preferences.cpp +++ b/src/apps/processcontroller/Preferences.cpp @@ -38,7 +38,7 @@ #define B_TRANSLATE_CONTEXT "ProcessController" Preferences::Preferences(const char* name, const char* signature, bool doSave) - : BMessage('Pref'), BLocker(B_TRANSLATE("Preferences"), true), + : BMessage('Pref'), BLocker("Preferences", true), fSavePreferences(doSave) { fNewPreferences = false; @@ -65,7 +65,7 @@ Preferences::Preferences(const char* name, const char* signature, bool doSave) Preferences::Preferences(const entry_ref &ref, const char* signature, bool doSave) - : BMessage('Pref'), BLocker(B_TRANSLATE("Preferences"), true), + : BMessage('Pref'), BLocker("Preferences", true), fSavePreferences(doSave) { fSettingsFile = new entry_ref(ref); @@ -108,13 +108,14 @@ Preferences::~Preferences() } } else { // implement saving somewhere else! - char error[1024]; - sprintf(error, B_TRANSLATE("Your setting file" - "could not be saved!\n(%s)"), + BString error; + snprintf(error.LockBuffer(256), 256, + B_TRANSLATE("Your setting file could not be saved!\n(%s)"), strerror(file.InitCheck())); - BAlert *alert = new BAlert(B_TRANSLATE("Error saving file"), error, - B_TRANSLATE("Damned!"), NULL, NULL, B_WIDTH_AS_USUAL, - B_STOP_ALERT); + error.UnlockBuffer(); + BAlert *alert = new BAlert(B_TRANSLATE("Error saving file"), + error.String(), B_TRANSLATE("Damned!"), NULL, NULL, + B_WIDTH_AS_USUAL, B_STOP_ALERT); alert->Go(); } } diff --git a/src/apps/processcontroller/PriorityMenu.cpp b/src/apps/processcontroller/PriorityMenu.cpp index 5fcd5db802..34d257eeed 100644 --- a/src/apps/processcontroller/PriorityMenu.cpp +++ b/src/apps/processcontroller/PriorityMenu.cpp @@ -89,8 +89,8 @@ PriorityMenu::BuildMenu() index--; } message = new BMessage('PrTh'); - message->AddInt32(B_TRANSLATE("thread"), fThreadID); - message->AddInt32(B_TRANSLATE("priority"), priority->priority); + message->AddInt32("thread", fThreadID); + message->AddInt32("priority", priority->priority); sprintf(name, B_TRANSLATE("%s priority [%d]"), priority->name, (int)priority->priority); item = new BMenuItem(name, message); item->SetTarget(gPCView); diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp index d43e1af89f..3ffc6e9bbf 100644 --- a/src/apps/processcontroller/ProcessController.cpp +++ b/src/apps/processcontroller/ProcessController.cpp @@ -398,7 +398,7 @@ ProcessController::MessageReceived(BMessage *message) void ProcessController::AboutRequested() { - BAlert *alert = new BAlert(B_TRANSLATE("about"), + BAlert *alert = new BAlert(B_TRANSLATE("About"), B_TRANSLATE("ProcessController\n\n" "Copyright 1997-2001,\n" "Georges-Edouard Berenger.\n\n" @@ -412,7 +412,7 @@ ProcessController::AboutRequested() view->GetFont(&font); font.SetSize(font.Size() * 1.5); font.SetFace(B_BOLD_FACE); - view->SetFontAndColor(0, 17, &font); + view->SetFontAndColor(0, strlen(B_TRANSLATE("ProcessController"))-1, &font); alert->Go(); } @@ -803,7 +803,7 @@ thread_debug_thread(void *arg) thread_info thinfo; get_thread_info(param->thread, &thinfo); char text[4096]; - sprintf(text, B_TRANSLATE("db %d"), int(param->thread)); + sprintf(text, "gdb -pid=%d", int(param->thread)); system(text); if (param->sem >= 0 && thinfo.state == B_THREAD_WAITING && param->sem == thinfo.sem) {