Skip to content

Commit

Permalink
Merge pull request #70 from hugopl/release
Browse files Browse the repository at this point in the history
Release v0.17.0
  • Loading branch information
hugopl authored Jul 11, 2024
2 parents 68d1b6a + 9e288b7 commit 898a6d7
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 62 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.17.0] - 2024-07-11
### Added
- Functions receiving `Gio::AsyncResultCallback` not works, unless the `_finish` functions isn't too complex, see `examples/file_dialog.cr`.

### Changed
- Using GI-Crystal v0.23.x, See [GI-Crystal changelog](https://github.com/hugopl/gi-crystal/blob/master/CHANGELOG.md) for more info.
- Minimal crystal compiler version bumper to 1.6.0.

## [0.16.1] - 2024-03-24
### Fixed
- Workaround to fix compilation with GTK 4.14. This remove Gtk::PathPoint#get_curvature
Expand Down
18 changes: 18 additions & 0 deletions examples/alert_dialog.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require "../src/gtk4"

def activate(app : Gtk::Application)
options = {"Yes", "Maybe"}
alert_dialog = Gtk::AlertDialog.new(message: "Message", buttons: options)
alert_dialog.choose(nil, nil) do |obj, result|
idx = alert_dialog.choose_finish(result)
puts "You choose: #{options[idx]}"
ensure
app.quit
end
app.hold
end

app = Gtk::Application.new("hello.example.com", Gio::ApplicationFlags::None)
app.activate_signal.connect(->activate(Gtk::Application))
exit(app.run)

20 changes: 0 additions & 20 deletions examples/file_chooser_dialog.cr

This file was deleted.

19 changes: 19 additions & 0 deletions examples/file_dialog.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require "../src/gtk4"

def activate(app : Gtk::Application)
dialog = Gtk::FileDialog.new
dialog.open(nil, nil) do |obj, result|
file = dialog.open_finish(result)
puts "You choose: #{file.path}" if file
rescue e
STDERR.puts("#{e.class.name} raised: #{e.message}")
ensure
app.quit
end
app.hold # Since there's no windows open, we must tell the application to not quit
end

app = Gtk::Application.new("hello.example.com", Gio::ApplicationFlags::None)
app.activate_signal.connect(->activate(Gtk::Application))
exit(app.run)

39 changes: 0 additions & 39 deletions examples/message_dialog.cr

This file was deleted.

6 changes: 3 additions & 3 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: gtk4
version: 0.16.1
version: 0.17.0

authors:
- Hugo Parente Lima <[email protected]>

dependencies:
gi-crystal:
github: hugopl/gi-crystal
version: ">= 0.22.2"
version: ">= 0.23.0"
pango:
github: hugopl/pango.cr
version: ">= 0.2.0"

crystal: ">= 1.4.1"
crystal: ">= 1.6.0"

license: MIT

0 comments on commit 898a6d7

Please sign in to comment.