From 9a495b03837297bcfe4365a200192c71d7c5f4ba Mon Sep 17 00:00:00 2001 From: Toshio Sekiya Date: Mon, 21 Dec 2020 21:30:45 +0900 Subject: [PATCH] Bug (same as the previous one) fixed. --- Rakefile | 8 ++++---- sec1.md | 4 ++-- sec10.md | 4 ++-- sec11.md | 4 ++-- sec12.md | 4 ++-- sec13.md | 4 ++-- sec14.md | 4 ++-- sec15.md | 4 ++-- sec16.md | 4 ++-- sec17.md | 4 ++-- sec2.md | 4 ++-- sec3.md | 4 ++-- sec4.md | 4 ++-- sec5.md | 4 ++-- sec6.md | 4 ++-- sec7.md | 4 ++-- sec8.md | 4 ++-- sec9.md | 4 ++-- 18 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Rakefile b/Rakefile index 0e45f6f..6249b1d 100755 --- a/Rakefile +++ b/Rakefile @@ -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, "") diff --git a/sec1.md b/sec1.md index f6850c8..adf4df6 100644 --- a/sec1.md +++ b/sec1.md @@ -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) diff --git a/sec10.md b/sec10.md index ea07c07..d5a9673 100644 --- a/sec10.md +++ b/sec10.md @@ -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) diff --git a/sec11.md b/sec11.md index e06e2f1..d403039 100644 --- a/sec11.md +++ b/sec11.md @@ -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) diff --git a/sec12.md b/sec12.md index 2fb6695..cfddf5b 100644 --- a/sec12.md +++ b/sec12.md @@ -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) diff --git a/sec13.md b/sec13.md index 3cd8718..c3559d8 100644 --- a/sec13.md +++ b/sec13.md @@ -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) diff --git a/sec14.md b/sec14.md index 5301ea9..b97aaa7 100644 --- a/sec14.md +++ b/sec14.md @@ -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) diff --git a/sec15.md b/sec15.md index 275f85d..b9c5952 100644 --- a/sec15.md +++ b/sec15.md @@ -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) diff --git a/sec16.md b/sec16.md index a65cd3a..226a184 100644 --- a/sec16.md +++ b/sec16.md @@ -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) diff --git a/sec17.md b/sec17.md index 38e9b3b..b136702 100644 --- a/sec17.md +++ b/sec17.md @@ -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) diff --git a/sec2.md b/sec2.md index b007919..c4f921e 100644 --- a/sec2.md +++ b/sec2.md @@ -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) diff --git a/sec3.md b/sec3.md index 4b1cf62..32b7ab8 100644 --- a/sec3.md +++ b/sec3.md @@ -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) diff --git a/sec4.md b/sec4.md index 7197fa6..7f3b111 100644 --- a/sec4.md +++ b/sec4.md @@ -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) diff --git a/sec5.md b/sec5.md index 3067035..2cb40e9 100644 --- a/sec5.md +++ b/sec5.md @@ -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) diff --git a/sec6.md b/sec6.md index 9316eaa..9026137 100644 --- a/sec6.md +++ b/sec6.md @@ -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) diff --git a/sec7.md b/sec7.md index 9b162bb..8307afd 100644 --- a/sec7.md +++ b/sec7.md @@ -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) diff --git a/sec8.md b/sec8.md index bad6b87..69a3821 100644 --- a/sec8.md +++ b/sec8.md @@ -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) diff --git a/sec9.md b/sec9.md index 059ccbe..a620efb 100644 --- a/sec9.md +++ b/sec9.md @@ -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)