Skip to content

Commit 898a6d7

Browse files
authored
Merge pull request #70 from hugopl/release
Release v0.17.0
2 parents 68d1b6a + 9e288b7 commit 898a6d7

File tree

6 files changed

+48
-62
lines changed

6 files changed

+48
-62
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.17.0] - 2024-07-11
8+
### Added
9+
- Functions receiving `Gio::AsyncResultCallback` not works, unless the `_finish` functions isn't too complex, see `examples/file_dialog.cr`.
10+
11+
### Changed
12+
- Using GI-Crystal v0.23.x, See [GI-Crystal changelog](https://github.com/hugopl/gi-crystal/blob/master/CHANGELOG.md) for more info.
13+
- Minimal crystal compiler version bumper to 1.6.0.
14+
715
## [0.16.1] - 2024-03-24
816
### Fixed
917
- Workaround to fix compilation with GTK 4.14. This remove Gtk::PathPoint#get_curvature

examples/alert_dialog.cr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require "../src/gtk4"
2+
3+
def activate(app : Gtk::Application)
4+
options = {"Yes", "Maybe"}
5+
alert_dialog = Gtk::AlertDialog.new(message: "Message", buttons: options)
6+
alert_dialog.choose(nil, nil) do |obj, result|
7+
idx = alert_dialog.choose_finish(result)
8+
puts "You choose: #{options[idx]}"
9+
ensure
10+
app.quit
11+
end
12+
app.hold
13+
end
14+
15+
app = Gtk::Application.new("hello.example.com", Gio::ApplicationFlags::None)
16+
app.activate_signal.connect(->activate(Gtk::Application))
17+
exit(app.run)
18+

examples/file_chooser_dialog.cr

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/file_dialog.cr

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require "../src/gtk4"
2+
3+
def activate(app : Gtk::Application)
4+
dialog = Gtk::FileDialog.new
5+
dialog.open(nil, nil) do |obj, result|
6+
file = dialog.open_finish(result)
7+
puts "You choose: #{file.path}" if file
8+
rescue e
9+
STDERR.puts("#{e.class.name} raised: #{e.message}")
10+
ensure
11+
app.quit
12+
end
13+
app.hold # Since there's no windows open, we must tell the application to not quit
14+
end
15+
16+
app = Gtk::Application.new("hello.example.com", Gio::ApplicationFlags::None)
17+
app.activate_signal.connect(->activate(Gtk::Application))
18+
exit(app.run)
19+

examples/message_dialog.cr

Lines changed: 0 additions & 39 deletions
This file was deleted.

shard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: gtk4
2-
version: 0.16.1
2+
version: 0.17.0
33

44
authors:
55
- Hugo Parente Lima <hugo.pl@gmail.com>
66

77
dependencies:
88
gi-crystal:
99
github: hugopl/gi-crystal
10-
version: ">= 0.22.2"
10+
version: ">= 0.23.0"
1111
pango:
1212
github: hugopl/pango.cr
1313
version: ">= 0.2.0"
1414

15-
crystal: ">= 1.4.1"
15+
crystal: ">= 1.6.0"
1616

1717
license: MIT

0 commit comments

Comments
 (0)