PoorMan: better labelling of button
According to the HIG, button labels should be verbs implying actions. Replace the "default" button with "create public_html", which is what will happen if you click it. Thanks to KapiX for the suggestion.
This commit is contained in:
@@ -524,18 +524,18 @@ PoorManWindow::SaveConsole(BMessage* message, bool selection)
|
|||||||
// find the selected text and write it to a file
|
// find the selected text and write it to a file
|
||||||
int32 start = 0, end = 0;
|
int32 start = 0, end = 0;
|
||||||
fLoggingView->GetSelection(&start, &end);
|
fLoggingView->GetSelection(&start, &end);
|
||||||
|
|
||||||
BString buffer;
|
BString buffer;
|
||||||
char * buffData = buffer.LockBuffer(end - start + 1);
|
char * buffData = buffer.LockBuffer(end - start + 1);
|
||||||
// copy the selected text from the TextView to the buffer
|
// copy the selected text from the TextView to the buffer
|
||||||
fLoggingView->GetText(start, end - start, buffData);
|
fLoggingView->GetText(start, end - start, buffData);
|
||||||
buffer.UnlockBuffer(end - start + 1);
|
buffer.UnlockBuffer(end - start + 1);
|
||||||
|
|
||||||
err = fwrite(buffer.String(), 1, end - start + 1, f);
|
err = fwrite(buffer.String(), 1, end - start + 1, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,12 +543,12 @@ PoorManWindow::SaveConsole(BMessage* message, bool selection)
|
|||||||
void
|
void
|
||||||
PoorManWindow::DefaultSettings()
|
PoorManWindow::DefaultSettings()
|
||||||
{
|
{
|
||||||
BAlert* serverAlert = new BAlert(B_TRANSLATE("Error Server"),
|
BAlert* serverAlert = new BAlert(B_TRANSLATE("Error Server"),
|
||||||
STR_ERR_CANT_START, B_TRANSLATE("OK"));
|
STR_ERR_CANT_START, B_TRANSLATE("OK"));
|
||||||
serverAlert->SetFlags(serverAlert->Flags() | B_CLOSE_ON_ESCAPE);
|
serverAlert->SetFlags(serverAlert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||||
BAlert* dirAlert = new BAlert(B_TRANSLATE("Error Dir"),
|
BAlert* dirAlert = new BAlert(B_TRANSLATE("Error Dir"),
|
||||||
STR_ERR_WEB_DIR, B_TRANSLATE("Cancel"), B_TRANSLATE("Select"),
|
STR_ERR_WEB_DIR, B_TRANSLATE("Cancel"), B_TRANSLATE("Select"),
|
||||||
B_TRANSLATE("Default"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING);
|
B_TRANSLATE("Create public_html"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING);
|
||||||
dirAlert->SetShortcut(0, B_ESCAPE);
|
dirAlert->SetShortcut(0, B_ESCAPE);
|
||||||
int32 buttonIndex = dirAlert->Go();
|
int32 buttonIndex = dirAlert->Go();
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ PoorManWindow::DefaultSettings()
|
|||||||
Quit();
|
Quit();
|
||||||
be_app_messenger.SendMessage(B_QUIT_REQUESTED);
|
be_app_messenger.SendMessage(B_QUIT_REQUESTED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
fPrefWindow = new PoorManPreferencesWindow(
|
fPrefWindow = new PoorManPreferencesWindow(
|
||||||
fSetwindowFrame,
|
fSetwindowFrame,
|
||||||
|
|||||||
Reference in New Issue
Block a user