diff --git a/README.md b/README.md index b4e1f9a..b4f2e87 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,16 @@ The table of contents is at the end of this abstract. - Section 26 to 29 describes the list model and the list view (GtkListView, GtkGridView and GtkColumnView). It also describes GtkExpression. -The latest version of the tutorial is located at [Gtk4-tutorial github repository](https://github.com/ToshioCP/Gtk4-tutorial). +The latest version of the tutorial is located at [Gtk4-tutorial GitHub repository](https://github.com/ToshioCP/Gtk4-tutorial). You can read it from there directly without having to download anything. -#### Gtk4 Documentation +#### GTK 4 Documentation Please refer to [GTK API Reference](https://docs.gtk.org/gtk4/index.html) and [GNOME Developer Documentation Website](https://developer.gnome.org/) for further information. These websites are newly opened lately (Aug/2021). -The old documentation is located at [Gtk Reference Manual](https://developer-old.gnome.org/gtk4/stable/) and [Gnome Developer Center](https://developer-old.gnome.org/). +The old documentation is located at [GTK Reference Manual](https://developer-old.gnome.org/gtk4/stable/) and [GNOME Developer Center](https://developer-old.gnome.org/). The new website is in progress at present, so you might need to refer to the old version. If you want to know about GObject and the type system, please refer to [GObject tutorial](https://github.com/ToshioCP/Gobject-tutorial). @@ -31,9 +31,9 @@ The GObject details are easy to understand and also necessary to know when writi #### Contribution This tutorial is under development and unstable. -Even though the codes of the examples have been tested on GTK version 4.0, bugs may still exist. +Even though the codes of the examples have been tested on GTK 4 (version 4.0), bugs may still exist. If you find any bugs, errors or mistakes in the tutorial and C examples, please let me know. -You can post it to [github issues](https://github.com/ToshioCP/Gtk4-tutorial/issues). +You can post it to [GitHub issues](https://github.com/ToshioCP/Gtk4-tutorial/issues). You can also post corrected files as a commit to [pull request](https://github.com/ToshioCP/Gtk4-tutorial/pulls). When you make corrections, correct the source files, which are under the 'src' directory, then run `rake` to create to create the output file. The GFM files under the 'gfm' directory are automatically updated. @@ -46,18 +46,18 @@ All questions are helpful and will make this tutorial get better. If you want to get a HTML or PDF version, you can make them with `rake`, which is a ruby version of make. Type `rake html` for HTML. Type `rake pdf` for PDF. -There is a documentation \("[How to build Gtk4 Tutorial](gfm/Readme_for_developers.md)"\) that describes how to make them. +There is a documentation \("[How to build GTK 4 Tutorial](gfm/Readme_for_developers.md)"\) that describes how to make them. ## Table of contents 1. [Prerequisite and License](gfm/sec1.md) -1. [Installing Gtk4 into Linux distributions](gfm/sec2.md) +1. [Installing GTK 4 into Linux distributions](gfm/sec2.md) 1. [GtkApplication and GtkApplicationWindow](gfm/sec3.md) 1. [Widgets (1)](gfm/sec4.md) 1. [Widgets (2)](gfm/sec5.md) 1. [String and memory management](gfm/sec6.md) 1. [Widgets (3)](gfm/sec7.md) -1. [Defining a Child object](gfm/sec8.md) +1. [Defining a child object](gfm/sec8.md) 1. [The User Interface (UI) file and GtkBuilder](gfm/sec9.md) 1. [Build system](gfm/sec10.md) 1. [Initialization and destruction of instances](gfm/sec11.md) diff --git a/Rakefile b/Rakefile index bb0c19b..3758312 100644 --- a/Rakefile +++ b/Rakefile @@ -59,7 +59,7 @@ imagefiles = srcfiles.map do |file| imagefiles = FileList[*imagefiles] CLEAN.append(FileList["latex/*.tex", "latex/*.aux", "latex/*.log", "latex/*.toc"]) -CLOBBER.append("Readme.md").append(FileList["gfm/*.md"]) +CLOBBER.append("README.md").append(FileList["gfm/*.md"]) CLOBBER.append(FileList["docs/*.html"]) CLOBBER.append(FileList["docs/image/*"]) CLOBBER.append(FileList["latex/*.pdf"]) @@ -70,12 +70,12 @@ task default: :md task all: [:md, :html, :pdf] mdfiles = srcfiles.pathmap("%f").ext(".md").map{|f| "gfm/#{f}"} -task md: %w[Readme.md] + mdfiles +task md: %w[README.md] + mdfiles -file "Readme.md" => [abstract] + secfiles do |t| +file "README.md" => [abstract] + secfiles do |t| abstract_md = "gfm/"+abstract.pathmap("%f").ext(".md") src2md(abstract, "gfm") - buf = ["# Gtk4 Tutorial for beginners\n\nThe github page of this tutorial is also available. Click [here](https://toshiocp.github.io/Gtk4-tutorial/).\n\n"]\ + buf = ["# GTK 4 Tutorial for beginners\n\nThe GitHub page of this tutorial is also available. Click [here](https://toshiocp.github.io/Gtk4-tutorial/).\n\n"]\ + File.readlines(abstract_md)\ + ["\n## Table of contents\n\n"] File.delete(abstract_md) @@ -96,13 +96,13 @@ srcfiles.each do |src| if secfiles.include?(t.source) i = get_sec_num(src) if secfiles.size == 1 - nav = "Up: [Readme.md](../Readme.md)\n" + nav = "Up: [README.md](../README.md)\n" elsif i == 1 - nav = "Up: [Readme.md](../Readme.md), Next: [Section 2](sec2.md)\n" + nav = "Up: [README.md](../README.md), Next: [Section 2](sec2.md)\n" elsif i == secfiles.size - nav = "Up: [Readme.md](../Readme.md), Prev: [Section #{i-1}](sec#{i-1}.md)\n" + nav = "Up: [README.md](../README.md), Prev: [Section #{i-1}](sec#{i-1}.md)\n" else - nav = "Up: [Readme.md](../Readme.md), Prev: [Section #{i-1}](sec#{i-1}.md), Next: [Section #{i+1}](sec#{i+1}.md)\n" + nav = "Up: [README.md](../README.md), Prev: [Section #{i-1}](sec#{i-1}.md), Next: [Section #{i+1}](sec#{i+1}.md)\n" end File.write(t.name, nav + "\n" + File.read(t.name) + "\n" + nav) end @@ -117,7 +117,7 @@ task html: %W[docs/index.html docs/.nojekyll] + htmlfiles + htmlimagefiles file "docs/index.html" => [abstract, "docs"] + secfiles do abstract_md = "docs/"+abstract.pathmap("%f").ext(".md") src2md(abstract, "html") - buf = [ "# Gtk4 Tutorial for beginners\n\n" ]\ + buf = [ "# GTK 4 Tutorial for beginners\n\n" ]\ + File.readlines(abstract_md)\ + ["\n## Table of contents\n\n"] File.delete(abstract_md) @@ -128,7 +128,7 @@ file "docs/index.html" => [abstract, "docs"] + secfiles do buf << "\nThis website uses [Bootstrap](https://getbootstrap.jp/)." File.write("docs/index.md", buf.join) mk_html_template(nil, nil, nil) - sh "pandoc -s --template=docs/template.html --metadata=title:\"Gtk4 tutorial\" -o docs/index.html docs/index.md" + sh "pandoc -s --template=docs/template.html --metadata=title:\"GTK 4 tutorial\" -o docs/index.html docs/index.md" File.delete "docs/index.md" File.delete "docs/template.html" end @@ -156,7 +156,7 @@ srcfiles.each do |src| else mk_html_template("index.html", nil, nil) end - sh "pandoc -s --template=docs/template.html --metadata=title:\"Gtk4 tutorial\" -o #{t.name} #{html_md}" + sh "pandoc -s --template=docs/template.html --metadata=title:\"GTK 4 tutorial\" -o #{t.name} #{html_md}" File.delete(html_md) File.delete "docs/template.html" end @@ -212,7 +212,7 @@ end task :clean task :clobber task :cleangfm do - rm 'Readme.md' + rm 'README.md' remove_entry_secure("gfm") end task :cleanhtml do diff --git a/docs/Readme_for_developers.html b/docs/Readme_for_developers.html index 7762106..09f748d 100644 --- a/docs/Readme_for_developers.html +++ b/docs/Readme_for_developers.html @@ -5,7 +5,7 @@ -