added shortcuts
This commit is contained in:
parent
de3dc540c4
commit
392dc320b9
5 changed files with 19 additions and 11 deletions
|
|
@ -44,7 +44,7 @@ MainWindow::MainWindow()
|
|||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0).Add(menuBar).AddGlue().End();
|
||||
|
||||
_inputField = new BTextView("input_view", B_WILL_DRAW | B_FOLLOW_ALL);
|
||||
_inputField->SetText("What is the matrix... printer ?");
|
||||
_inputField->SetText("What is the matrix... printer, Neo ?");
|
||||
_inputField->MakeEditable(true);
|
||||
_inputField->MakeSelectable(true);
|
||||
_inputField->SetWordWrap(true);
|
||||
|
|
@ -90,6 +90,7 @@ MainWindow::MainWindow()
|
|||
|
||||
_sendButton->MakeDefault(true);
|
||||
|
||||
|
||||
_answerView = new BTextView("answer", B_WILL_DRAW | B_FOLLOW_ALL);
|
||||
_answerView->MakeEditable(false); // Disable editing
|
||||
_answerView->MakeSelectable(true); // Enable text selection
|
||||
|
|
@ -430,14 +431,23 @@ BMenuBar *MainWindow::_BuildMenu() {
|
|||
|
||||
//-------------------------
|
||||
|
||||
menu = new BMenu(B_TRANSLATE("History"));
|
||||
menu = new BMenu(B_TRANSLATE("Conversation"));
|
||||
|
||||
item = new BMenuItem(B_TRANSLATE("Send Prompt" B_UTF8_ELLIPSIS),
|
||||
new BMessage(kSendPrompt));
|
||||
item->SetShortcut('S', B_COMMAND_KEY);
|
||||
item->SetTarget(this);
|
||||
menu->AddItem(item);
|
||||
|
||||
item = new BMenuItem(B_TRANSLATE("Clear History" B_UTF8_ELLIPSIS),
|
||||
new BMessage(kClearHistory));
|
||||
item->SetTarget(this);
|
||||
item->SetShortcut('K', B_COMMAND_KEY | B_SHIFT_KEY);
|
||||
|
||||
menu->AddItem(item);
|
||||
|
||||
menuBar->AddItem(menu);
|
||||
|
||||
|
||||
return menuBar;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue