Bug (same as the previous one) fixed.

This commit is contained in:
Toshio Sekiya 2020-12-21 21:30:45 +09:00
parent 456391e48a
commit 9a495b0383
18 changed files with 38 additions and 38 deletions

View file

@ -24,13 +24,13 @@ task md: mdfilenames
file srcfiles[i].to_md => (srcfiles[i].c_files << srcfiles[i].path) do
src2md srcfiles[i].path, srcfiles[i].to_md
if srcfiles.size == 1
nav = "Up: [Readme.md](#{srcfiles[i].dirname}/Readme.md)\n"
nav = "Up: [Readme.md](Readme.md)\n"
elsif i == 0
nav = "Up: [Readme.md](#{srcfiles[i].dirname}/Readme.md), Next: [Section 2](#{srcfiles[1].path})\n"
nav = "Up: [Readme.md](Readme.md), Next: [Section 2](#{srcfiles[1].to_md})\n"
elsif i == srcfiles.size - 1
nav = "Up: [Readme.md](#{srcfiles[i].dirname}/Readme.md), Prev: [Section #{i}](#{srcfiles[i-1].path})\n"
nav = "Up: [Readme.md](Readme.md), Prev: [Section #{i}](#{srcfiles[i-1].to_md})\n"
else
nav = "Up: [Readme.md](#{srcfiles[i].dirname}/Readme.md), Prev: [Section #{i}](#{srcfiles[i-1].path}), Next: [Section #{i+2}](#{srcfiles[i+1].path})\n"
nav = "Up: [Readme.md](Readme.md), Prev: [Section #{i}](#{srcfiles[i-1].to_md}), Next: [Section #{i+2}](#{srcfiles[i+1].to_md})\n"
end
buf = IO.readlines srcfiles[i].to_md
buf.insert(0, nav, "")

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Next: [Section 2](src/sec2.src.md)
Up: [Readme.md](Readme.md), Next: [Section 2](sec2.md)
# GtkApplication and GtkApplicationWindow
## GtkApplication
@ -282,4 +282,4 @@ Compile it and run `a.out`, then you will see a bigger window with its title "pr
![Screenshot of the window](screenshot_pr4.png)
Up: [Readme.md](src/Readme.md), Next: [Section 2](src/sec2.src.md)
Up: [Readme.md](Readme.md), Next: [Section 2](sec2.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 9](src/sec9.src.md), Next: [Section 11](src/sec11.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 9](sec9.md), Next: [Section 11](sec11.md)
# Functions in TfeTextView
In this section I will explain each function in TfeTextView object.
@ -343,4 +343,4 @@ Otherwise, if the caller free the GFile object, `tv->file` is no more guaranteed
## Source file of tfetextview.c
All the source files are listed in [Section 13](ch13.html).
Up: [Readme.md](src/Readme.md), Prev: [Section 9](src/sec9.src.md), Next: [Section 11](src/sec11.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 9](sec9.md), Next: [Section 11](sec11.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 10](src/sec10.src.md), Next: [Section 12](src/sec12.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 10](sec10.md), Next: [Section 12](sec12.md)
# Functions with GtkNotebook
GtkNotebook is a very important object in the text file editor `tfe`.
@ -202,4 +202,4 @@ Otherwise (this is the case file is NULL), assign untitled string to `filename`.
- 16-17: Free `filename and unref `file`.
Up: [Readme.md](src/Readme.md), Prev: [Section 10](src/sec10.src.md), Next: [Section 12](src/sec12.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 10](sec10.md), Next: [Section 12](sec12.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 11](src/sec11.src.md), Next: [Section 13](src/sec13.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 11](sec11.md), Next: [Section 13](sec13.md)
# tfeapplication.c
`tfeapplication.c` includes all the code other than `tfetxtview.c` and `tfenotebook.c`.
@ -267,4 +267,4 @@ Therefore, it gets the top level window and call `gtk_window_destroy`.
This file is just modified the source file names.
Up: [Readme.md](src/Readme.md), Prev: [Section 11](src/sec11.src.md), Next: [Section 13](src/sec13.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 11](sec11.md), Next: [Section 13](sec13.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 12](src/sec12.src.md), Next: [Section 14](src/sec14.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 12](sec12.md), Next: [Section 14](sec14.md)
# tfe5 source files
The followings are the source files of tfe5.
@ -617,4 +617,4 @@ The followings are the source files of tfe5.
29 47 545 tfe5/tfetextview.h
64 105 2266 tfe5/tfe.ui
574 1482 17411 合計
Up: [Readme.md](src/Readme.md), Prev: [Section 12](src/sec12.src.md), Next: [Section 14](src/sec14.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 12](sec12.md), Next: [Section 14](sec14.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 13](src/sec13.src.md), Next: [Section 15](src/sec15.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 13](sec13.md), Next: [Section 15](sec15.md)
# Menu and action
## Menu
@ -213,4 +213,4 @@ The structure of the menu is shown in the diagram below.
![Screenshot of menu1](menu1_screenshot.png)
Up: [Readme.md](src/Readme.md), Prev: [Section 13](src/sec13.src.md), Next: [Section 15](src/sec15.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 13](sec13.md), Next: [Section 15](sec15.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 14](src/sec14.src.md), Next: [Section 16](src/sec16.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 14](sec14.md), Next: [Section 16](sec16.md)
# Stateful action
Some actions have states.
@ -367,4 +367,4 @@ Other GtkLabel have no effect from this.
The provider is added to GdkDisplay.
- 90: Show the window.
Up: [Readme.md](src/Readme.md), Prev: [Section 14](src/sec14.src.md), Next: [Section 16](src/sec16.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 14](sec14.md), Next: [Section 16](sec16.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 15](src/sec15.src.md), Next: [Section 17](src/sec17.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 15](sec15.md), Next: [Section 17](sec17.md)
# Ui file for menu and action entries
## Ui file for menu
@ -334,4 +334,4 @@ meson.build
8 sourcefiles=files('menu3.c')
9
10 executable('menu3', sourcefiles, resources, dependencies: gtkdep)
Up: [Readme.md](src/Readme.md), Prev: [Section 15](src/sec15.src.md), Next: [Section 17](src/sec17.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 15](sec15.md), Next: [Section 17](sec17.md)

View file

@ -1,6 +1,6 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 16](src/sec16.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 16](sec16.md)
# GtkMenuButton
before close
Up: [Readme.md](src/Readme.md), Prev: [Section 16](src/sec16.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 16](sec16.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 1](src/sec1.src.md), Next: [Section 3](src/sec3.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 1](sec1.md), Next: [Section 3](sec3.md)
# Widgets (1)
## GtkLabel, GtkButton and Gtkbox
@ -307,4 +307,4 @@ Then, these two buttons are appended to the box.
The handler corresponds to `btn1` changes its label.
The handler corresponds to `btn2` destroys the top-level window and the application quits.
Up: [Readme.md](src/Readme.md), Prev: [Section 1](src/sec1.src.md), Next: [Section 3](src/sec3.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 1](sec1.md), Next: [Section 3](sec3.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 2](src/sec2.src.md), Next: [Section 4](src/sec4.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 2](sec2.md), Next: [Section 4](sec4.md)
# Widgets (2)
## GtkTextView, GtkTextbuffer and GtkScrolledWindow
@ -162,4 +162,4 @@ Now compile and run it.
This time the window doesn't extend even if you type a lot of characters.
It just scrolls.
Up: [Readme.md](src/Readme.md), Prev: [Section 2](src/sec2.src.md), Next: [Section 4](src/sec4.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 2](sec2.md), Next: [Section 4](sec4.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 3](src/sec3.src.md), Next: [Section 5](src/sec5.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 3](sec3.md), Next: [Section 5](sec5.md)
# Widgets (3)
## Open signal
@ -302,4 +302,4 @@ The numbers at the left of the following items are line numbers in the source co
- 46: free the memory pointed by `filename`
- 53-56: If at least one file was read, then the number of GtkNotebookPage is greater than zero. If it's true, then show the window. If it's false, then destroy the window.
Up: [Readme.md](src/Readme.md), Prev: [Section 3](src/sec3.src.md), Next: [Section 5](src/sec5.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 3](sec3.md), Next: [Section 5](sec5.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 4](src/sec4.src.md), Next: [Section 6](src/sec6.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 4](sec4.md), Next: [Section 6](sec6.md)
# Define Child object
## Very simple editor
@ -345,4 +345,4 @@ Now we got a very simple editor.
It's not smart.
We need more features like open, save, saveas, change font and so on.
We will add them in the next section and after.
Up: [Readme.md](src/Readme.md), Prev: [Section 4](src/sec4.src.md), Next: [Section 6](src/sec6.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 4](sec4.md), Next: [Section 6](sec6.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 5](src/sec5.src.md), Next: [Section 7](src/sec7.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 5](sec5.md), Next: [Section 7](sec7.md)
# Ui file and GtkBuiler
## New, open and save button
@ -448,4 +448,4 @@ Modify tfe3.c and save it as tfe3_r.c
Then, compile and run it.
The window appears and it is the same as the screenshot at the beginning of this page.
Up: [Readme.md](src/Readme.md), Prev: [Section 5](src/sec5.src.md), Next: [Section 7](src/sec7.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 5](sec5.md), Next: [Section 7](sec7.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 6](src/sec6.src.md), Next: [Section 8](src/sec8.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 6](sec6.md), Next: [Section 8](sec8.md)
# Build system
## What do we need to think about building?
@ -419,4 +419,4 @@ I think meson and ninja is the best choice for the present.
We divided a file into some categorized files and used a build tool.
This method is used by many developers.
Up: [Readme.md](src/Readme.md), Prev: [Section 6](src/sec6.src.md), Next: [Section 8](src/sec8.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 6](sec6.md), Next: [Section 8](sec8.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 7](src/sec7.src.md), Next: [Section 9](src/sec9.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 7](sec7.md), Next: [Section 9](sec9.md)
# Instance and class
This section and the following four sections are descriptions about next version of the text file editor (tfe).
@ -424,4 +424,4 @@ And `gobject` is a pointer to TfeTextView object which is casted as a GObject in
After that, `dh3` calls `dh2`, and `dh2` calls `dh1`.
Finally all the references are released.
Up: [Readme.md](src/Readme.md), Prev: [Section 7](src/sec7.src.md), Next: [Section 9](src/sec9.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 7](sec7.md), Next: [Section 9](sec9.md)

View file

@ -1,4 +1,4 @@
Up: [Readme.md](src/Readme.md), Prev: [Section 8](src/sec8.src.md), Next: [Section 10](src/sec10.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 8](sec8.md), Next: [Section 10](sec10.md)
# Signals
## Signals
@ -160,4 +160,4 @@ The following is extract from `tfetexties.c`.
- "open-response" signal has one parameter.
The fourth parameter is the parameter.
Up: [Readme.md](src/Readme.md), Prev: [Section 8](src/sec8.src.md), Next: [Section 10](src/sec10.src.md)
Up: [Readme.md](Readme.md), Prev: [Section 8](sec8.md), Next: [Section 10](sec10.md)