First, source files are in the Gtk4-tutorila repository. How to download them is written at the end of the previous section.
The following is the instruction of compilation and execution.
src/tfe5
directory.meson _build
for configuration.ninja -C _build
for compilation. Then the
application tfe
is built under the _build
directory._build/tfe
to execute it.Then the window appears. There are four buttons, New
,
Open
, Save
and Close
.
Open
button, then a FileChooserDialog appears.
Choose a file in the list and click on Open
button. Then
the file is read and a new Notebook Page appears.Save
button, then the text
is saved to the original file.Close
, then the Notebook Page disappears.Close
again, then the Untitled
Notebook Page disappears and at the same time the application
quits.This is a very simple editor. It is a good practice for you to add more features.
@@@shell LANG=C wc tfe5/meson.build tfe5/tfeapplication.c tfe5/tfe.gresource.xml tfe5/tfenotebook.c tfe5/tfenotebook.h tfetextview/tfetextview.c tfetextview/tfetextview.h tfe5/tfe.ui @@@