Skip to content

Commit e103a84

Browse files
committed
Code cleanup: removes trailing spaces
1 parent a563fea commit e103a84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+249
-249
lines changed

CHANGELOG.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ The gtk-4-fortran library has been generated from GTK 4.4.0 and GLib 2.70.0 unde
3131

3232

3333
## [gtk-fortran 3.24.30] 2021-09-08
34-
- The gtk-3-fortran library has been generated from GTK 3.24.30 and GLib 2.68.4 under Fedora 34.
34+
- The gtk-3-fortran library has been generated from GTK 3.24.30 and GLib 2.68.4 under Fedora 34.
3535

3636
### Added
3737
- The cfwrapper has a new required parameter `-v` to set the gtk-fortran semantic version (major.minor.patch). It is written in the `VERSIONS` file (used by CMake, `src/extract_events.pl`, `src/alt_build_test.sh`) and `codemeta.json`.
3838
- A `tutorials/` directory contains the sources and screenshots used in the Wiki new tutorials.
39-
39+
4040
### Changed
4141
- The compiler flags for release is now `-O3` instead of `-O3 -mtune=native -march=native`.
4242
- The Fortran / C interfaces now use the `import ::` statement instead of `use, intrinsic :: iso_c_binding, only:`.
4343

4444

4545
## [gtk-fortran 4.0] 2021-04-28
46-
- The gtk-4-fortran library has been generated from GTK 4.2.0 and GLib 2.68.1 under Fedora 34.
46+
- The gtk-4-fortran library has been generated from GTK 4.2.0 and GLib 2.68.1 under Fedora 34.
4747
- Starting from this 4.0 release, the project will adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4848
- All the improvements included in the simultaneously released gtk-fortran 3.24.28 (gtk3 branch) are also in the gtk4 branch.
4949

@@ -110,7 +110,7 @@ The main objective of this release was to clean up the code and prepare it for t
110110
### Added
111111
- Experimental and uncomplete `meson.build` files have been added. Meson>=0.53 is needed. Commands are `meson buildmeson` and `ninja -C buildmeson`. The gtk-fortran library can be inst alled using `sudo ninja -C buildmeson install`, but there is still some problems for installing the `.mod` files (see https://github.com/mesonbuild/meson/issues/5374). Please use CMake for production !
112112
- examples/menu2.f90: the menu.f90 example is based on deprecated functions.
113-
- examples/gtkzero_gapp.f90: an empty GTK window based on GtkApplication and GApplication.
113+
- examples/gtkzero_gapp.f90: an empty GTK window based on GtkApplication and GApplication.
114114
- CMake -D NO_BUILD_HL=true option to disable building the High Level sub-library (which includes PLplot and sketcher).
115115
- VERSIONS: a CSV file with the gtk-fortran, GTK, GLib and Ubuntu versions. Automatically created by the cfwrapper.py script. It will be used by the building system of the project.
116116

@@ -181,7 +181,7 @@ in several modules to ease maintenance.
181181
### Changed
182182
- GTK 3.20.9, GLib 2.50.2
183183
- GTK 2.24.30, GLib 2.50.2
184-
- The code of the heart of gtk-fortran, the `cfwrapper.py` script, has been refactored and improved in order to ease maintenance.
184+
- The code of the heart of gtk-fortran, the `cfwrapper.py` script, has been refactored and improved in order to ease maintenance.
185185
- CMake files have been unified in master (gtk2) and gtk3 branches.
186186

187187
## [gtk-fortran 16.04] - 2016-06-15

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# If not, see <http://www.gnu.org/licenses/>.
2323
#===============================================================================
2424
# Contributed by Kyle Horne: 05.11.2011
25-
# Last modifications: James Tappin 8/17/2012, Jens Hunger 01/07/2018,
25+
# Last modifications: James Tappin 8/17/2012, Jens Hunger 01/07/2018,
2626
# vmagnin 2021-10-21
2727
#
2828
# CMAKE build file for gtk-fortran
@@ -105,7 +105,7 @@ set(CPACK_SOURCE_GENERATOR "TGZ")
105105
include(CPack)
106106

107107
#===============================================================================
108-
# "Path for CMake modules to be loaded by the include() or find_package()
108+
# "Path for CMake modules to be loaded by the include() or find_package()
109109
# commands before checking the default modules that come with CMake"
110110
#===============================================================================
111111
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
@@ -146,8 +146,8 @@ add_definitions(${GTK_CFLAGS_OTHER})
146146
#===============================================================================
147147
# PLplot integration (>=5.13 needed)
148148
# ----------------------------------
149-
# A lot of changes have occured in PLplot 5.11, 5.12 and 5.13: the libraries
150-
# have been renamed (plplot and plplot-fortran) and the ISO_C_BINDING has been
149+
# A lot of changes have occured in PLplot 5.11, 5.12 and 5.13: the libraries
150+
# have been renamed (plplot and plplot-fortran) and the ISO_C_BINDING has been
151151
# adopted.
152152
# By now (March 2019), the find_package(plplot) command gives a lot of errors
153153
# in Debian/Ubuntu distributions because of some renaming in Debian packages.

INSTALL.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Useful variables that are specific to gtk-fortran are:
2929

3030
EXCLUDE_PLPLOT -- set this to disable building the plplot
3131
integration even if PLplot is found.
32-
NO_BUILD_HL -- set this to disable building the High Level sub-library
32+
NO_BUILD_HL -- set this to disable building the High Level sub-library
3333
(includes PLplot and sketcher).
3434
NO_BUILD_EXAMPLES -- set this to prevent compiling the example
3535
programs, also mostly useful for packagers.

README-high-level.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The high level interface for gtk-fortran is in the source file
44
gtk-hl.f90. This provides a number of higher level interfaces to the
55
GTK widget system, with the intent of making GUI construction more
66
accessible to scientific programmers (the feel should not be too alien
7-
to anyone who has developed GUIs in IDL). The routines make use of the
7+
to anyone who has developed GUIs in IDL). The routines make use of the
88
optional arguments in Fortran>=90 to simplify creating and initializing widgets.
99

1010
## Modules list:
@@ -16,7 +16,7 @@ optional arguments in Fortran>=90 to simplify creating and initializing widgets.
1616
* gtk_hl_button: Implements interfaces to various kinds of button.
1717

1818
* gtk_hl_chooser: Implements file choosers that do not need variadic
19-
arguments.
19+
arguments.
2020

2121
* gtk_hl_combobox: Implements interfaces to text comboboxes.
2222

@@ -39,7 +39,7 @@ optional arguments in Fortran>=90 to simplify creating and initializing widgets.
3939
* gtk_hl_spin_slider: Implements spin boxes and sliders (including
4040
convenient integer interfaces).
4141

42-
* gtk_hl_tree: Implements interfaces to the list & tree widgets.
42+
* gtk_hl_tree: Implements interfaces to the list & tree widgets.
4343

4444

4545
In addition two graphics modules are available, but are not automatically
@@ -52,7 +52,7 @@ included with the gtk_hl module:
5252
plplot.
5353

5454
* gdk_pixbuf_hl: Implements convenient interfaces to GDK pixbufs and
55-
formats.
55+
formats.
5656

5757
Several demos are provided in the examples/ directory: they have the
5858
prefix hl_.

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"isAccessibleForFree": true,
4444
"keywords": "GTK, Fortran, Graphical User Interface",
4545
"license": "GPL v3.0",
46-
"name": "gtk-fortran",
46+
"name": "gtk-fortran",
4747
"version": "4.1.0",
4848
"operatingSystem": "Linux, MacOS, MSYS2/Windows, BSD...",
4949
"programmingLanguage": "Fortran",

examples/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ if (NOT NO_BUILD_EXAMPLES)
3333
# Build the main examples:
3434
#==========================
3535
set(examples_list gtkzero_gapp gtkhello list_demo gio_demo tests
36-
notebooks julia_pixbuf mandelbrot_pixbuf mandelbrot_pixbuf_zoom
37-
menubar cairo-tests cairo-basics cairo-basics-click bazaar
36+
notebooks julia_pixbuf mandelbrot_pixbuf mandelbrot_pixbuf_zoom
37+
menubar cairo-tests cairo-basics cairo-basics-click bazaar
3838
pixbuf_without_gui regex
3939
)
4040

4141
if(NOT NO_BUILD_HL)
42-
set(examples_list ${examples_list}
42+
set(examples_list ${examples_list}
4343
hl_assistant hl_choosers hl_combo hl_containers hl_dialog hl_list1
4444
hl_list_n hl_list_renderers hl_pbar
4545
hl_sliders hl_sliders2 hl_textview hl_tree hl_cairo1 hl_cairo_clock

examples/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Gtk-fortran Example Programs
22

33
This directory contains example programs for the GTK 4 version of gtk-fortran.
4-
They are automatically built by CMake but any example may also be individually
4+
They are automatically built by CMake but any example may also be individually
55
built on a system with `gtk-4-fortran` installed with the command:
66

77
```bash
@@ -10,23 +10,23 @@ $ gfortran <name>.f90 -o <name> $(pkg-config --cflags --libs gtk-4-fortran)
1010

1111
Among those examples:
1212

13-
- gtkzero_gapp.f90 just opens an empty GTK window. Based on GtkApplication and GApplication.
13+
- gtkzero_gapp.f90 just opens an empty GTK window. Based on GtkApplication and GApplication.
1414
- gtkhello.f90 opens a window with two buttons.
1515
- The \*pixbuf\*.f90 examples demonstrate pixel drawing (bitmap drawing). The pixbuf\_without\_gui.f90 example draws a Sierpinski triangle in a PNG file, without using a GUI.
1616
- The cairo*.f90 examples desmonstrate vectorial drawing using Cairo.
1717
- bazaar.f90 is used for testing various widgets and functions.
18-
- gio_demo.f90: this is a very basic demo to get started with GIO. It uses
18+
- gio_demo.f90: this is a very basic demo to get started with GIO. It uses
1919
Fortran I/O to read text from the keyboard & writes it to the file `gio_demo.dat`
2020
in the current directory.
2121
- gtkbuilder2.f90 demonstrates how you can use an UI XML file to create your
2222
graphical user interface.
23-
- list_demo.f90 demonstrates how to use GtkTreeView for displaying trees and
23+
- list_demo.f90 demonstrates how to use GtkTreeView for displaying trees and
2424
lists.
2525
- menubar.f90 demonstrates a menubar based on GMenu and GAction. It also uses CSS styles.
2626
- notebooks.f90 demonstrates how to use GtkNotebook, a tabbed notebook container.
2727
- regex.f90 demonstrates how to use GLib regular expressions functions.
2828
- hl_* examples uses the "high-level" interface.
2929
- hl_pbar.f90: a progress bar.
3030
- ...
31-
- tests.f90 is testing things about ISO_C_BINDING and the relations between
31+
- tests.f90 is testing things about ISO_C_BINDING and the relations between
3232
Fortran types and GLib types.

examples/bazaar.f90

+2-2
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ end subroutine aboutbutton
376376
end module handlers
377377

378378
!*******************************************************************************
379-
! In the main program, we declare the GTK application, connect it to its
380-
! "activate" function where we will create the GUI,
379+
! In the main program, we declare the GTK application, connect it to its
380+
! "activate" function where we will create the GUI,
381381
! and finally call the GLib main loop.
382382
!*******************************************************************************
383383
program bazaar

examples/cairo-basics-click.f90

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ subroutine activate(app, gdata) bind(c)
5454
type(c_ptr) :: window
5555
type(c_ptr) :: my_drawing_area, controller, controller2
5656
integer(c_int) :: width, height
57-
57+
5858
window = gtk_application_window_new(app)
5959
width = 700
6060
height = 700
@@ -67,7 +67,7 @@ subroutine activate(app, gdata) bind(c)
6767
call gtk_drawing_area_set_draw_func(my_drawing_area, &
6868
& c_funloc(my_draw_function), c_null_ptr, c_null_funptr)
6969

70-
! We need a gesture controller to detect mouse clicks:
70+
! We need a gesture controller to detect mouse clicks:
7171
! https://developer.gnome.org/gtk4/stable/GtkGestureClick.html
7272
! https://developer.gnome.org/gtk4/stable/GtkWidget.html#gtk-widget-add-controller
7373
controller = gtk_gesture_click_new()
@@ -126,7 +126,7 @@ end subroutine scroll_cb
126126
! https://developer.gnome.org/gtk4/stable/GtkDrawingArea.html#gtk-drawing-area-set-draw-func
127127
subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind(c)
128128
type(c_ptr), value, intent(in) :: widget, my_cairo_context, gdata
129-
integer(c_int), value, intent(in) :: width, height
129+
integer(c_int), value, intent(in) :: width, height
130130
integer(c_int) :: cstatus
131131
integer :: t
132132
real(8), parameter :: pi = 3.14159265358979323846d0
@@ -137,25 +137,25 @@ subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind
137137
! Horizontal and vertical thin blue lines:
138138
call cairo_set_source_rgb(my_cairo_context, 0d0, 0d0, 1d0)
139139
call cairo_set_line_width(my_cairo_context, 1d0)
140-
140+
141141
do t = 0, height, +100
142142
! https://cairographics.org/manual/cairo-Paths.html#cairo-move-to
143143
call cairo_move_to(my_cairo_context, 0d0, t*1d0)
144144
call cairo_line_to(my_cairo_context, width*1d0, t*1d0)
145-
call cairo_stroke(my_cairo_context)
145+
call cairo_stroke(my_cairo_context)
146146
end do
147-
147+
148148
do t = 0, width, +100
149149
call cairo_move_to(my_cairo_context, t*1d0, 0d0)
150150
call cairo_line_to(my_cairo_context, t*1d0, height*1d0)
151-
call cairo_stroke(my_cairo_context)
151+
call cairo_stroke(my_cairo_context)
152152
end do
153153

154154
! A thick red circle at the centre:
155155
call cairo_set_source_rgb(my_cairo_context, 1d0, 0d0, 0d0)
156156
call cairo_set_line_width(my_cairo_context, 5d0)
157157
call cairo_arc(my_cairo_context, width/2d0, height/2d0, radius, 0d0, 2*pi)
158-
call cairo_stroke(my_cairo_context)
158+
call cairo_stroke(my_cairo_context)
159159

160160
! Save the image as a PNG
161161
! https://cairographics.org/manual/cairo-PNG-Support.html#cairo-surface-write-to-png

examples/cairo-basics.f90

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ end subroutine activate
7171
! https://developer.gnome.org/gtk4/stable/GtkDrawingArea.html#gtk-drawing-area-set-draw-func
7272
subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind(c)
7373
type(c_ptr), value, intent(in) :: widget, my_cairo_context, gdata
74-
integer(c_int), value, intent(in) :: width, height
74+
integer(c_int), value, intent(in) :: width, height
7575
integer :: cstatus
7676
integer :: t
7777
real(8), parameter :: pi = 3.14159265358979323846d0
@@ -82,15 +82,15 @@ subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind
8282
call cairo_move_to(my_cairo_context, 0d0, 0d0)
8383
call cairo_curve_to(my_cairo_context, 600d0, 50d0, 115d0, 545d0, &
8484
& width*1d0, height*1d0)
85-
call cairo_stroke(my_cairo_context)
85+
call cairo_stroke(my_cairo_context)
8686

8787
! Lines:
8888
call cairo_set_source_rgb(my_cairo_context, 0d0, 0.5d0, 0.5d0)
8989
call cairo_set_line_width(my_cairo_context, 2d0)
9090
do t = 0, int(height), +20
9191
call cairo_move_to(my_cairo_context, 0d0, t*1d0)
9292
call cairo_line_to(my_cairo_context, t*1d0, height*1d0)
93-
call cairo_stroke(my_cairo_context)
93+
call cairo_stroke(my_cairo_context)
9494
end do
9595

9696
! Text:
@@ -111,7 +111,7 @@ subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind
111111
call cairo_set_line_width(my_cairo_context, 5d0*t/50d0)
112112
call cairo_arc(my_cairo_context, 353d0 + 200d0*cos(t*2d0*pi/50), &
113113
& 350d0 + 200d0*sin(t*2d0*pi/50), 50d0, 0d0, 2*pi)
114-
call cairo_stroke(my_cairo_context)
114+
call cairo_stroke(my_cairo_context)
115115
end do
116116

117117
! Save the image as a PNG:

examples/cairo-tests.f90

+11-11
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,29 @@ subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind
8080

8181
! We redraw the Mandelbrot set pixbuf:
8282
call gdk_cairo_set_source_pixbuf(my_cairo_context, my_pixbuf, &
83-
& 700d0/4d0, 700d0/4d0)
83+
& 700d0/4d0, 700d0/4d0)
8484
call cairo_paint(my_cairo_context)
8585

8686
! And do some vectorial Cairo drawings above:
8787
call cairo_set_line_width(my_cairo_context, 1d0)
8888
call cairo_set_source_rgb(my_cairo_context, 0d0, 0d0, 1d0)
89-
call cairo_move_to(my_cairo_context, 100d0, 50d0)
89+
call cairo_move_to(my_cairo_context, 100d0, 50d0)
9090
call cairo_line_to(my_cairo_context, 700d0, 700d0)
91-
call cairo_stroke(my_cairo_context)
91+
call cairo_stroke(my_cairo_context)
9292

9393
call cairo_set_source_rgb(my_cairo_context, 1d0, 0d0, 0d0)
9494
call cairo_set_line_width(my_cairo_context, 3d0)
95-
call cairo_move_to(my_cairo_context, 60d0, 0d0)
95+
call cairo_move_to(my_cairo_context, 60d0, 0d0)
9696
call cairo_curve_to(my_cairo_context, 600d0, 50d0, 135d0, 45d0, 500d0, 500d0)
97-
call cairo_stroke(my_cairo_context)
97+
call cairo_stroke(my_cairo_context)
9898

9999
call cairo_set_source_rgb(my_cairo_context, 1d0, 1d0, 0d0)
100100
call cairo_set_line_width(my_cairo_context, 2d0)
101-
call cairo_move_to(my_cairo_context, 0d0, height/2d0)
101+
call cairo_move_to(my_cairo_context, 0d0, height/2d0)
102102
call cairo_line_to(my_cairo_context, 1d0*width, height/2d0)
103-
call cairo_move_to(my_cairo_context, width/2d0+width/12d0, 0d0)
103+
call cairo_move_to(my_cairo_context, width/2d0+width/12d0, 0d0)
104104
call cairo_line_to(my_cairo_context, width/2d0+width/12d0, height*1d0)
105-
call cairo_stroke(my_cairo_context)
105+
call cairo_stroke(my_cairo_context)
106106

107107
call cairo_select_font_face(my_cairo_context, "Times"//c_null_char, &
108108
& CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
@@ -111,8 +111,8 @@ subroutine my_draw_function(widget, my_cairo_context, width, height, gdata) bind
111111
call cairo_show_text (my_cairo_context, "Mandelbrot set"//c_null_char)
112112

113113
call cairo_new_sub_path(my_cairo_context)
114-
call cairo_arc(my_cairo_context, 300d0, 300d0, 100d0, 0d0, 3.14159d0)
115-
call cairo_stroke(my_cairo_context)
114+
call cairo_arc(my_cairo_context, 300d0, 300d0, 100d0, 0d0, 3.14159d0)
115+
call cairo_stroke(my_cairo_context)
116116

117117
! The image is written to PNG only one time:
118118
if (write_png) then
@@ -153,7 +153,7 @@ subroutine activate(app, gdata) bind(c)
153153
! Queries the number of channels of a pixbuf:
154154
nch = gdk_pixbuf_get_n_channels(my_pixbuf)
155155
print *, "Number of channels of the pixbuf: ", nch
156-
! "Queries the rowstride of a pixbuf, which is the number of bytes between
156+
! "Queries the rowstride of a pixbuf, which is the number of bytes between
157157
! the start of a row and the start of the next row":
158158
rowstride = gdk_pixbuf_get_rowstride(my_pixbuf)
159159
print *, "Rowstride of the pixbuf: ", rowstride

examples/gtkbuilder2.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ program gtkbuilder
9090
! Initialize the GTK Library:
9191
call gtk_init ()
9292

93-
! Create a new GtkBuilder object and parse the
93+
! Create a new GtkBuilder object and parse the
9494
! Glade3 XML file 'gtkbuilder.glade' and add it's contents:
9595
builder=gtk_builder_new_from_file("gtkbuilder.glade"//c_null_char)
9696

examples/gtkhello.f90

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
!*************************************
3131
! User defined event handlers go here
3232
!*************************************
33-
! Note that events are a special type of signals, coming from
33+
! Note that events are a special type of signals, coming from
3434
! the X Window system. Callback functions must have an event argument.
3535
module handlers
3636

@@ -125,8 +125,8 @@ end subroutine button1clicked
125125
end module handlers
126126

127127
!*******************************************************************************
128-
! In the main program, we declare the GTK application, connect it to its
129-
! "activate" function where we will create the GUI,
128+
! In the main program, we declare the GTK application, connect it to its
129+
! "activate" function where we will create the GUI,
130130
! and finally call the GLib main loop.
131131
!*******************************************************************************
132132
program gtkhello
@@ -147,7 +147,7 @@ program gtkhello
147147
! https://developer.gnome.org/gio/stable/GApplication.html#g-application-id-is-valid
148148
app = gtk_application_new("gtk-fortran.examples.gtkhello"//c_null_char, &
149149
& G_APPLICATION_FLAGS_NONE)
150-
! The activate signal will be sent by g_application_run().
150+
! The activate signal will be sent by g_application_run().
151151
! The c_funloc() function returns the C address of the callback function.
152152
! The c_null_ptr means no data is transfered to the callback function.
153153
call g_signal_connect(app, "activate"//c_null_char, c_funloc(activate), &

0 commit comments

Comments
 (0)