Skip to content

Commit

Permalink
Merge branch 'v1_develop' into v1_release
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Jul 11, 2024
2 parents d774f62 + 2ba37d6 commit 3fbab50
Show file tree
Hide file tree
Showing 22 changed files with 213 additions and 129 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Build and publish API docs
on:
push:
# only publish v2 (main or develop); v2 is published via the Terminal.GuiV2Docs repo
branches: [main, develop]
branches: [v1_release, v1_develop]
paths:
- docfx/**

permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

jobs:
CodeQL-Build:

if: github.repository == 'gui-cs/Terminal.Gui'|| github.event_name == 'schedule'
runs-on: ubuntu-latest

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
if: github.repository == 'gui-cs/Terminal.Gui'|| github.event_name == 'schedule'
permissions:
actions: read
contents: read
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: .NET Core

on:
push:
branches: [ main, develop ]
branches: [ v1_release, v1_develop ]
paths-ignore:
- '**.md'
pull_request:
branches: [ main, develop ]
branches: [ v1_release, v1_develop ]
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest

timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Terminal.Gui

on:
push:
branches: [ main, develop, v2_release, v2_develop ]
branches: [ v1_release, v1_develop, v2_release, v2_develop ]
tags:
- v*
paths-ignore:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ We welcome contributions from the community. See [Issues](https://github.com/gui

Terminal.Gui uses the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branching model.

* The `main` branch is always stable, and always matches the most recently released Nuget package.
* The `develop` branch is where bug-fixes to v1.x happens. It is the default branch.
* The `v1_release` branch is always stable, and always matches the most recently released Nuget package.
* The `v1__develop` branch is where bug-fixes to v1.x happens. It is the default branch.
* The `v2_develop` branch is where development on v2.x happens.

### Forking Terminal.Gui
Expand Down
14 changes: 8 additions & 6 deletions Example/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@

Application.Run<ExampleWindow> ();

System.Console.WriteLine ($"Username: {((ExampleWindow)Application.Top).usernameText.Text}");

// Before the application exits, reset Terminal.Gui for clean shutdown
Application.Shutdown ();

System.Console.WriteLine ($@"Username: {ExampleWindow.Username}");

// Defines a top-level window with border and title
public class ExampleWindow : Window {
public static string Username { get; internal set; }
public TextField usernameText;

public ExampleWindow ()
{
Title = "Example App (Ctrl+Q to quit)";

// Create input components and labels
var usernameLabel = new Label () {
Text = "Username:"
var usernameLabel = new Label () {
Text = "Username:"
};

usernameText = new TextField ("") {
Expand Down Expand Up @@ -50,7 +51,7 @@ public ExampleWindow ()
// Create login button
var btnLogin = new Button () {
Text = "Login",
Y = Pos.Bottom(passwordLabel) + 1,
Y = Pos.Bottom (passwordLabel) + 1,
// center the login button horizontally
X = Pos.Center (),
IsDefault = true,
Expand All @@ -60,6 +61,7 @@ public ExampleWindow ()
btnLogin.Clicked += () => {
if (usernameText.Text == "admin" && passwordText.Text == "password") {
MessageBox.Query ("Logging In", "Login Successful", "Ok");
Username = usernameText.Text.ToString ();
Application.RequestStop ();
} else {
MessageBox.ErrorQuery ("Logging In", "Incorrect username or password", "Ok");
Expand Down
19 changes: 10 additions & 9 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@ mode: ContinuousDeployment
tag-prefix: '[vV]'
continuous-delivery-fallback-tag: pre
branches:
develop:
v1_develop:
mode: ContinuousDeployment
tag: pre
regex: develop
regex: v1_develop
source-branches:
- main
- v1_release
pre-release-weight: 100
main:
v1_release:
tag: rc
increment: Patch
regex: v1_release
source-branches:
- develop
- main
feature:
- v1_develop
- v1_release
v1_feature:
tag: useBranchName
regex: ^features?[/-]
source-branches:
- develop
- main
- v1_develop
- v1_release
pull-request:
tag: PullRequest.{BranchName}
increment: Inherit
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dotnet run
* [Conceptual Documentation](https://gui-cs.github.io/Terminal.Gui/docs/index.html)
* [API Documentation](https://gui-cs.github.io/Terminal.Gui/api/Terminal.Gui)

_The Documentation matches the most recent Nuget release from the `main` branch ([![Version](https://img.shields.io/nuget/v/Terminal.Gui.svg)](https://www.nuget.org/packages/Terminal.Gui))_
_The Documentation matches the most recent Nuget release from the `v1_release_` branch ([![Version](https://img.shields.io/nuget/v/Terminal.Gui.svg)](https://www.nuget.org/packages/Terminal.Gui))_

See the [`Terminal.Gui/` README](https://github.com/gui-cs/Terminal.Gui/tree/master/Terminal.Gui) for an overview of how the library is structured. The [Conceptual Documentation](https://gui-cs.github.io/Terminal.Gui/docs/index.html) provides insight into core concepts.

Expand All @@ -64,28 +64,32 @@ The team is looking forward to seeing new amazing projects made by the community
The following example shows a basic Terminal.Gui application in C#:

```csharp
// This is a simple example application. For the full range of functionality
// see the UICatalog project
// A simple Terminal.Gui example in C# - using C# 9.0 Top-level statements
using Terminal.Gui;

Application.Run<ExampleWindow> ();

System.Console.WriteLine ($"Username: {((ExampleWindow)Application.Top).usernameText.Text}");

// Before the application exits, reset Terminal.Gui for clean shutdown
Application.Shutdown ();

System.Console.WriteLine ($@"Username: {ExampleWindow.Username}");

// Defines a top-level window with border and title
public class ExampleWindow : Window {
public static string Username { get; internal set; }
public TextField usernameText;

public ExampleWindow ()
{
Title = "Example App (Ctrl+Q to quit)";

// Create input components and labels
var usernameLabel = new Label () {
Text = "Username:"
var usernameLabel = new Label () {
Text = "Username:"
};

usernameText = new TextField ("") {
Expand Down Expand Up @@ -113,7 +117,7 @@ public class ExampleWindow : Window {
// Create login button
var btnLogin = new Button () {
Text = "Login",
Y = Pos.Bottom(passwordLabel) + 1,
Y = Pos.Bottom (passwordLabel) + 1,
// center the login button horizontally
X = Pos.Center (),
IsDefault = true,
Expand All @@ -123,6 +127,7 @@ public class ExampleWindow : Window {
btnLogin.Clicked += () => {
if (usernameText.Text == "admin" && passwordText.Text == "password") {
MessageBox.Query ("Logging In", "Login Successful", "Ok");
Username = usernameText.Text.ToString ();
Application.RequestStop ();
} else {
MessageBox.ErrorQuery ("Logging In", "Incorrect username or password", "Ok");
Expand Down
6 changes: 3 additions & 3 deletions Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ public override void UpdateOffScreen ()
contents = new int [Rows, Cols, 3];
for (int row = 0; row < Rows; row++) {
for (int col = 0; col < Cols; col++) {
//Curses.move (row, col);
//Curses.attrset (Colors.TopLevel.Normal);
//Curses.addch ((int)(uint)' ');
Curses.move (row, col);
Curses.attrset (Colors.TopLevel.Normal);
Curses.addch ((int)(uint)' ');
contents [row, col, 0] = ' ';
contents [row, col, 1] = Colors.TopLevel.Normal;
contents [row, col, 2] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static class Mono {
/// to avoid the dependency on libc-dev Linux.
/// </summary>
static class CoreCLR {
#if NET7_0
#if NET6_0_OR_GREATER
// Custom resolver to support true single-file apps
// (those which run directly from bundle; in-memory).
// -1 on Unix means self-referencing binary (libcoreclr.so)
Expand Down
Loading

0 comments on commit 3fbab50

Please sign in to comment.