diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec b/Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec index 3b960f935..d7993ef42 100755 --- a/Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/GtkSharp.Template.CSharp.nuspec @@ -4,8 +4,8 @@ GtkSharp.Template.CSharp 3.0.0 Gtk template for CSharp - A simple C# template for your .Net Core Gtk Application. - A simple C# template for your .Net Core Gtk Application. + A set of C# templates for your .Net Core Gtk Application. + A set of C# templates for your .Net Core Gtk Application. GtkSharp Contributors GtkSharp Contributors https://github.com/GtkSharp/GtkSharp diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/.template.config/template.json b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json similarity index 72% rename from Source/Templates/NetCore/GtkSharp.Template.CSharp/content/.template.config/template.json rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json index be14f43a6..eed8e6c92 100755 --- a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/.template.config/template.json +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/.template.config/template.json @@ -2,11 +2,12 @@ "$schema": "http://json.schemastore.org/template", "author": "GtkSharp Contributors", "classifications": [ - "Console" + "Gtk", + "GUI App" ], "name": "Gtk Application", - "identity": "GtkSharp.Template.CSharp", - "groupIdentity": "GtkSharp.Template", + "identity": "GtkSharp.Application.CSharp", + "groupIdentity": "GtkSharp.Application", "shortName": "gtkapp", "tags": { "language": "C#", diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkNamespace.csproj b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj similarity index 75% rename from Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkNamespace.csproj rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj index 610f1d295..0db25f31a 100755 --- a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkNamespace.csproj +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj @@ -4,8 +4,8 @@ netcoreapp2.0 - - MainWindow.glade + + %(Filename)%(Extension) diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/MainWindow.cs similarity index 100% rename from Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.cs rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/MainWindow.cs diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.glade b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/MainWindow.glade similarity index 100% rename from Source/Templates/NetCore/GtkSharp.Template.CSharp/content/MainWindow.glade rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/MainWindow.glade diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/Program.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/Program.cs similarity index 100% rename from Source/Templates/NetCore/GtkSharp.Template.CSharp/content/Program.cs rename to Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/Program.cs diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/.template.config/template.json b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/.template.config/template.json new file mode 100755 index 000000000..494b4f7fe --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/.template.config/template.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "GtkSharp Contributors", + "classifications": [ + "Gtk", + "UI" + ], + "name": "Gtk Dialog", + "identity": "GtkSharp.Dialog.CSharp", + "groupIdentity": "GtkSharp.Dialog", + "shortName": "gtkdialog", + "tags": { + "language": "C#" + }, + "sourceName": "Gtk_Dialog", + "primaryOutputs": [ + { + "path": "Gtk_Dialog.cs" + }, + { + "path": "Gtk_Dialog.glade" + } + ], + "defaultName": "Gtk_Dialog", + "symbols": { + "namespace": { + "description": "Namespace for the generated files", + "replaces": "GtkNamespace", + "type": "parameter" + } + } +} \ No newline at end of file diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.cs new file mode 100755 index 000000000..7d0fcd7e7 --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.cs @@ -0,0 +1,23 @@ +using System; +using Gtk; +using UI = Gtk.Builder.ObjectAttribute; + +namespace GtkNamespace +{ + class Gtk_Dialog : Dialog + { + public Gtk_Dialog() : this(new Builder("Gtk_Dialog.glade")) { } + + private Gtk_Dialog(Builder builder) : base(builder.GetObject("Gtk_Dialog").Handle) + { + DefaultResponse = ResponseType.Cancel; + + Response += OnResponse; + } + + private void OnResponse(object o, ResponseArgs args) + { + Hide(); + } + } +} diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.glade b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.glade new file mode 100755 index 000000000..8cc7c549a --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.glade @@ -0,0 +1,51 @@ + + + + + False + 320 + 260 + dialog + + + False + vertical + 2 + + + False + end + + + + + + gtk-close + True + True + True + True + + + True + True + 1 + + + + + False + False + 0 + + + + + + + + + button1 + + + diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/.template.config/template.json b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/.template.config/template.json new file mode 100755 index 000000000..d1a20cf21 --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/.template.config/template.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "GtkSharp Contributors", + "classifications": [ + "Gtk", + "UI" + ], + "name": "Gtk Widget", + "identity": "GtkSharp.Widget.CSharp", + "groupIdentity": "GtkSharp.Widget", + "shortName": "gtkwidget", + "tags": { + "language": "C#" + }, + "sourceName": "Gtk_Widget", + "primaryOutputs": [ + { + "path": "Gtk_Widget.cs" + }, + { + "path": "Gtk_Widget.glade" + } + ], + "defaultName": "Gtk_Widget", + "symbols": { + "namespace": { + "description": "Namespace for the generated files", + "replaces": "GtkNamespace", + "type": "parameter" + } + } +} \ No newline at end of file diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/Gtk_Widget.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/Gtk_Widget.cs new file mode 100755 index 000000000..e64f3eb33 --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/Gtk_Widget.cs @@ -0,0 +1,16 @@ +using System; +using Gtk; +using UI = Gtk.Builder.ObjectAttribute; + +namespace GtkNamespace +{ + public class Gtk_Widget : Box + { + public Gtk_Widget() : this(new Builder("Gtk_Widget.glade")) { } + + private Gtk_Widget(Builder builder) : base(builder.GetObject("Gtk_Widget").Handle) + { + + } + } +} diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/Gtk_Widget.glade b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/Gtk_Widget.glade new file mode 100755 index 000000000..7a1be14d1 --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Widget.CSharp/Gtk_Widget.glade @@ -0,0 +1,11 @@ + + + + + True + False + + + + + diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/.template.config/template.json b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/.template.config/template.json new file mode 100755 index 000000000..d15b4e48e --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/.template.config/template.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "GtkSharp Contributors", + "classifications": [ + "Gtk", + "UI" + ], + "name": "Gtk Window", + "identity": "GtkSharp.Window.CSharp", + "groupIdentity": "GtkSharp.Window", + "shortName": "gtkwindow", + "tags": { + "language": "C#" + }, + "sourceName": "Gtk_Window", + "primaryOutputs": [ + { + "path": "Gtk_Window.cs" + }, + { + "path": "Gtk_Window.glade" + } + ], + "defaultName": "Gtk_Window", + "symbols": { + "namespace": { + "description": "Namespace for the generated files", + "replaces": "GtkNamespace", + "type": "parameter" + } + } +} \ No newline at end of file diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/Gtk_Window.cs b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/Gtk_Window.cs new file mode 100755 index 000000000..95a6ba5ac --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/Gtk_Window.cs @@ -0,0 +1,23 @@ +using System; +using Gtk; +using UI = Gtk.Builder.ObjectAttribute; + +namespace GtkNamespace +{ + class Gtk_Window : Window + { + public Gtk_Window() : this(new Builder("Gtk_Window.glade")) { } + + private Gtk_Window(Builder builder) : base(builder.GetObject("Gtk_Window").Handle) + { + builder.Autoconnect(this); + + DeleteEvent += OnDeleteEvent; + } + + private void OnDeleteEvent(object sender, DeleteEventArgs a) + { + Application.Quit(); + } + } +} diff --git a/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/Gtk_Window.glade b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/Gtk_Window.glade new file mode 100755 index 000000000..44e554e80 --- /dev/null +++ b/Source/Templates/NetCore/GtkSharp.Template.CSharp/content/GtkSharp.Window.CSharp/Gtk_Window.glade @@ -0,0 +1,11 @@ + + + + + False + Gtk_Window + + + + + diff --git a/build.cake b/build.cake index 548f5e1f4..41ae54ed5 100755 --- a/build.cake +++ b/build.cake @@ -6,7 +6,7 @@ // VARS Settings.Cake = Context; -Settings.Version = "3.22.24.11"; +Settings.Version = "3.22.24.12"; Settings.BuildTarget = Argument("BuildTarget", "Default"); Settings.Assembly = Argument("Assembly", "");