Skip to content

Commit 3fbab50

Browse files
committed
Merge branch 'v1_develop' into v1_release
2 parents d774f62 + 2ba37d6 commit 3fbab50

22 files changed

+213
-129
lines changed

.github/workflows/api-docs.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Build and publish API docs
33
on:
44
push:
55
# only publish v2 (main or develop); v2 is published via the Terminal.GuiV2Docs repo
6-
branches: [main, develop]
6+
branches: [v1_release, v1_develop]
7+
paths:
8+
- docfx/**
79

810
permissions:
911
id-token: write

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525

2626
jobs:
2727
CodeQL-Build:
28-
28+
if: github.repository == 'gui-cs/Terminal.Gui'|| github.event_name == 'schedule'
2929
runs-on: ubuntu-latest
3030

3131
steps:

.github/workflows/codeql.yml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
# Consider using larger runners for possible analysis time improvements.
3030
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
3131
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
if: github.repository == 'gui-cs/Terminal.Gui'|| github.event_name == 'schedule'
3233
permissions:
3334
actions: read
3435
contents: read

.github/workflows/dotnet-core.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ name: .NET Core
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [ v1_release, v1_develop ]
66
paths-ignore:
77
- '**.md'
88
pull_request:
9-
branches: [ main, develop ]
9+
branches: [ v1_release, v1_develop ]
1010
paths-ignore:
1111
- '**.md'
1212

1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16-
16+
timeout-minutes: 10
1717
steps:
1818
- uses: actions/checkout@v4
1919

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish Terminal.Gui
22

33
on:
44
push:
5-
branches: [ main, develop, v2_release, v2_develop ]
5+
branches: [ v1_release, v1_develop, v2_release, v2_develop ]
66
tags:
77
- v*
88
paths-ignore:

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ We welcome contributions from the community. See [Issues](https://github.com/gui
1212

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

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

1919
### Forking Terminal.Gui

Example/Example.cs

+8-6
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@
77

88
Application.Run<ExampleWindow> ();
99

10-
System.Console.WriteLine ($"Username: {((ExampleWindow)Application.Top).usernameText.Text}");
11-
1210
// Before the application exits, reset Terminal.Gui for clean shutdown
1311
Application.Shutdown ();
1412

13+
System.Console.WriteLine ($@"Username: {ExampleWindow.Username}");
14+
1515
// Defines a top-level window with border and title
1616
public class ExampleWindow : Window {
17+
public static string Username { get; internal set; }
1718
public TextField usernameText;
18-
19+
1920
public ExampleWindow ()
2021
{
2122
Title = "Example App (Ctrl+Q to quit)";
2223

2324
// Create input components and labels
24-
var usernameLabel = new Label () {
25-
Text = "Username:"
25+
var usernameLabel = new Label () {
26+
Text = "Username:"
2627
};
2728

2829
usernameText = new TextField ("") {
@@ -50,7 +51,7 @@ public ExampleWindow ()
5051
// Create login button
5152
var btnLogin = new Button () {
5253
Text = "Login",
53-
Y = Pos.Bottom(passwordLabel) + 1,
54+
Y = Pos.Bottom (passwordLabel) + 1,
5455
// center the login button horizontally
5556
X = Pos.Center (),
5657
IsDefault = true,
@@ -60,6 +61,7 @@ public ExampleWindow ()
6061
btnLogin.Clicked += () => {
6162
if (usernameText.Text == "admin" && passwordText.Text == "password") {
6263
MessageBox.Query ("Logging In", "Login Successful", "Ok");
64+
Username = usernameText.Text.ToString ();
6365
Application.RequestStop ();
6466
} else {
6567
MessageBox.ErrorQuery ("Logging In", "Incorrect username or password", "Ok");

GitVersion.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@ mode: ContinuousDeployment
22
tag-prefix: '[vV]'
33
continuous-delivery-fallback-tag: pre
44
branches:
5-
develop:
5+
v1_develop:
66
mode: ContinuousDeployment
77
tag: pre
8-
regex: develop
8+
regex: v1_develop
99
source-branches:
10-
- main
10+
- v1_release
1111
pre-release-weight: 100
12-
main:
12+
v1_release:
1313
tag: rc
1414
increment: Patch
15+
regex: v1_release
1516
source-branches:
16-
- develop
17-
- main
18-
feature:
17+
- v1_develop
18+
- v1_release
19+
v1_feature:
1920
tag: useBranchName
2021
regex: ^features?[/-]
2122
source-branches:
22-
- develop
23-
- main
23+
- v1_develop
24+
- v1_release
2425
pull-request:
2526
tag: PullRequest.{BranchName}
2627
increment: Inherit

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dotnet run
3838
* [Conceptual Documentation](https://gui-cs.github.io/Terminal.Gui/docs/index.html)
3939
* [API Documentation](https://gui-cs.github.io/Terminal.Gui/api/Terminal.Gui)
4040

41-
_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))_
41+
_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))_
4242

4343
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.
4444

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

6666
```csharp
67+
// This is a simple example application. For the full range of functionality
68+
// see the UICatalog project
69+
6770
// A simple Terminal.Gui example in C# - using C# 9.0 Top-level statements
6871
6972
using Terminal.Gui;
7073

7174
Application.Run<ExampleWindow> ();
7275

73-
System.Console.WriteLine ($"Username: {((ExampleWindow)Application.Top).usernameText.Text}");
74-
7576
// Before the application exits, reset Terminal.Gui for clean shutdown
7677
Application.Shutdown ();
7778

79+
System.Console.WriteLine ($@"Username: {ExampleWindow.Username}");
80+
7881
// Defines a top-level window with border and title
7982
public class ExampleWindow : Window {
83+
public static string Username { get; internal set; }
8084
public TextField usernameText;
81-
85+
8286
public ExampleWindow ()
8387
{
8488
Title = "Example App (Ctrl+Q to quit)";
8589

8690
// Create input components and labels
87-
var usernameLabel = new Label () {
88-
Text = "Username:"
91+
var usernameLabel = new Label () {
92+
Text = "Username:"
8993
};
9094

9195
usernameText = new TextField ("") {
@@ -113,7 +117,7 @@ public class ExampleWindow : Window {
113117
// Create login button
114118
var btnLogin = new Button () {
115119
Text = "Login",
116-
Y = Pos.Bottom(passwordLabel) + 1,
120+
Y = Pos.Bottom (passwordLabel) + 1,
117121
// center the login button horizontally
118122
X = Pos.Center (),
119123
IsDefault = true,
@@ -123,6 +127,7 @@ public class ExampleWindow : Window {
123127
btnLogin.Clicked += () => {
124128
if (usernameText.Text == "admin" && passwordText.Text == "password") {
125129
MessageBox.Query ("Logging In", "Login Successful", "Ok");
130+
Username = usernameText.Text.ToString ();
126131
Application.RequestStop ();
127132
} else {
128133
MessageBox.ErrorQuery ("Logging In", "Incorrect username or password", "Ok");

Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,9 @@ public override void UpdateOffScreen ()
752752
contents = new int [Rows, Cols, 3];
753753
for (int row = 0; row < Rows; row++) {
754754
for (int col = 0; col < Cols; col++) {
755-
//Curses.move (row, col);
756-
//Curses.attrset (Colors.TopLevel.Normal);
757-
//Curses.addch ((int)(uint)' ');
755+
Curses.move (row, col);
756+
Curses.attrset (Colors.TopLevel.Normal);
757+
Curses.addch ((int)(uint)' ');
758758
contents [row, col, 0] = ' ';
759759
contents [row, col, 1] = Colors.TopLevel.Normal;
760760
contents [row, col, 2] = 0;

Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static class Mono {
256256
/// to avoid the dependency on libc-dev Linux.
257257
/// </summary>
258258
static class CoreCLR {
259-
#if NET7_0
259+
#if NET6_0_OR_GREATER
260260
// Custom resolver to support true single-file apps
261261
// (those which run directly from bundle; in-memory).
262262
// -1 on Unix means self-referencing binary (libcoreclr.so)

0 commit comments

Comments
 (0)