going to bed
This commit is contained in:
parent
5353340f57
commit
9cdab6a5c4
4 changed files with 8 additions and 5 deletions
BIN
.genio
BIN
.genio
Binary file not shown.
|
@ -199,7 +199,7 @@ void Conversation::MessageReceived(BMessage *message) {
|
||||||
}
|
}
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
fprintf(stderr, "Error parsing JSON: %s\n", e.what());
|
fprintf(stderr, "Error parsing JSON: %s\n", e.what());
|
||||||
std::string content = "Error parsing JSON, wrong model ?";
|
std::string content = "Error parsing JSON, wrong model or server down ? (Check logs in console).";
|
||||||
BMessage message(kSendReply);
|
BMessage message(kSendReply);
|
||||||
message.AddString("text", BString(content.c_str()));
|
message.AddString("text", BString(content.c_str()));
|
||||||
sendReply(message);
|
sendReply(message);
|
||||||
|
|
|
@ -37,7 +37,7 @@ static bool progressColorUp = false;
|
||||||
#define B_TRANSLATION_CONTEXT "Window"
|
#define B_TRANSLATION_CONTEXT "Window"
|
||||||
|
|
||||||
MainWindow::MainWindow()
|
MainWindow::MainWindow()
|
||||||
: BWindow(BRect(50, 50, 600, 400), B_TRANSLATE("DumBer"), B_DOCUMENT_WINDOW,
|
: BWindow(BRect(50, 50, 600, 600), B_TRANSLATE("DumBer"), B_DOCUMENT_WINDOW,
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE) {
|
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE) {
|
||||||
|
|
||||||
// Without this conversation would never get bmessages from HttpRequest
|
// Without this conversation would never get bmessages from HttpRequest
|
||||||
|
@ -152,7 +152,7 @@ MainWindow::MainWindow()
|
||||||
// delete bitmap; // Clean up when done
|
// delete bitmap; // Clean up when done
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BStringView *headerQuestion =
|
_headerQuestion =
|
||||||
new BStringView("questionLabel", "Your question: ");
|
new BStringView("questionLabel", "Your question: ");
|
||||||
BStringView *headerAnswer = new BStringView("questionAnswer", "Answer: ");
|
BStringView *headerAnswer = new BStringView("questionAnswer", "Answer: ");
|
||||||
|
|
||||||
|
@ -160,13 +160,13 @@ MainWindow::MainWindow()
|
||||||
// rgb_color colorAnswer = {100, 100,150, 255};
|
// rgb_color colorAnswer = {100, 100,150, 255};
|
||||||
|
|
||||||
// high color = txt
|
// high color = txt
|
||||||
headerQuestion->SetHighColor(colorQuestion);
|
_headerQuestion->SetHighColor(colorQuestion);
|
||||||
headerAnswer->SetHighColor(colorQuestion);
|
headerAnswer->SetHighColor(colorQuestion);
|
||||||
|
|
||||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||||
|
|
||||||
.AddGlue(0.1)
|
.AddGlue(0.1)
|
||||||
.Add(headerQuestion)
|
.Add(_headerQuestion)
|
||||||
.AddGroup(B_HORIZONTAL, 0, 1)
|
.AddGroup(B_HORIZONTAL, 0, 1)
|
||||||
|
|
||||||
.Add(_inputField)
|
.Add(_inputField)
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <StatusBar.h>
|
#include <StatusBar.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <TextControl.h>
|
#include <TextControl.h>
|
||||||
|
#include <StringView.h>
|
||||||
#include <TextView.h>
|
#include <TextView.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
|
@ -57,6 +58,8 @@ private:
|
||||||
BTextView *_inputField;
|
BTextView *_inputField;
|
||||||
BStatusBar *_progress;
|
BStatusBar *_progress;
|
||||||
BMenuField *_modelField;
|
BMenuField *_modelField;
|
||||||
|
BStringView *_headerQuestion;
|
||||||
|
|
||||||
BPopUpMenu *_modelMenu;
|
BPopUpMenu *_modelMenu;
|
||||||
BButton *_sendButton;
|
BButton *_sendButton;
|
||||||
BMessage *settings;
|
BMessage *settings;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue