9 #include "../GitCommand/Commit.h" 14 #include <LayoutBuilder.h> 24 B_DOCUMENT_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
26 BStringView* fCommitString =
new BStringView(
"commitString",
31 BScrollView* fScrollView =
new BScrollView(
"statusScrollView",
35 BButton* fCommit =
new BButton(
"commit",
"Commit",
37 BButton* fCancel =
new BButton(
"cancel",
"Cancel",
40 BLayoutBuilder::Group<>(
this, B_VERTICAL, 0)
44 .AddGroup(B_HORIZONTAL, 0)
66 const git_error* err = giterr_last();
67 printf(
"Error %d : %s\n", err->klass, err->message);
69 BString buffer(
"Error : %s");
70 buffer.ReplaceFirst(
"%s", err->message);
71 alert =
new BAlert(
"", buffer.String(),
"Cancel",
72 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
74 BString buffer(
"Change commited successfully.");
75 alert =
new BAlert(
"", buffer.String(),
"OK",
76 0, 0, B_WIDTH_AS_USUAL);
85 BWindow::MessageReceived(msg);
virtual void MessageReceived(BMessage *)
Handler to received messages.
virtual void Quit()
The function to Quit the window.
CommitWindow(BString)
CommitWindow Constructor.
static int DoCommit(BString, BString)
This function commits to given repo with given message.
Header file of Commit window.
BTextView * fCommitTextView
The Commit Text View.
The TrackGit Window class.
BString fRepo
The repo/directory where the command is called.