Skip to content

Commit 55c3a79

Browse files
authored
fixes for Gtk4 0.7 (#15)
* fixes for Gtk4 0.7 * remove Julia 1.6
1 parent 0fa0688 commit 55c3a79

File tree

7 files changed

+92
-77
lines changed

7 files changed

+92
-77
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, windows-latest, macOS-latest]
18-
version: ['1.6', '1']
18+
version: ['1']
1919
arch: [x64, x86]
2020
include:
2121
- os: ubuntu-latest

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
1111
[compat]
1212
BitFlags = "0.1.5"
1313
CEnum = "0.4, 0.5"
14-
Gtk4 = "0.6"
14+
Gtk4 = "0.7"
1515
GtkSourceView_jll = "5.1.0"
16-
julia = "1.6"
16+
julia = "1.10"
1717

1818
[extras]
1919
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/GtkSourceWidget.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,16 @@ end
209209

210210
## GtkSourceSearchContext
211211

212-
function search_context_forward(search::GtkSourceSearchContext, iter::_GtkTextIter)
213-
found, match_start, match_end, wrapped_around = G_.forward(search, Ref(iter))
214-
return (found, match_start, match_end)
212+
function search_context_forward(search::GtkSourceSearchContext, iter)
213+
found, match_start, match_end, wrapped_around = G_.forward(search, iter)
214+
return (found, Ref(match_start), Ref(match_end))
215215
end
216216

217217
function search_context_replace(
218218
search::GtkSourceSearchContext,
219-
match_start::_GtkTextIter, match_end::_GtkTextIter,
219+
match_start::GtkTextIterLike, match_end::GtkTextIterLike,
220220
replace::String)
221-
G_.replace(search, Ref(match_start), Ref(match_end), replace, -1)
221+
G_.replace(search, match_start, match_end, replace, -1)
222222
end
223223

224224
function search_context_replace_all(search::GtkSourceSearchContext, replace::String)

src/gen/gtksourceview_consts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ quote
22
$(Expr(:toplevel, quote
33
begin
44
const MAJOR_VERSION = 5
5-
const MICRO_VERSION = 0
6-
const MINOR_VERSION = 10
5+
const MICRO_VERSION = 1
6+
const MINOR_VERSION = 12
77
begin
88
@cenum BackgroundPatternType::Int32 BackgroundPatternType_NONE = 0 BackgroundPatternType_GRID = 1
99
(GLib.g_type(::Type{T}) where T <: BackgroundPatternType) = begin

src/gen/gtksourceview_methods

Lines changed: 45 additions & 36 deletions
Large diffs are not rendered by default.

src/gen/gtksourceview_structs

Lines changed: 35 additions & 26 deletions
Large diffs are not rendered by default.

test/runtests.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,19 @@ using Gtk4
1414
search_context = GtkSourceSearchContext(b, search_settings)
1515
set_search_text(search_settings, "test")
1616

17-
it = Gtk4._GtkTextIter(b, 1)
17+
it = Gtk4.GtkTextIter(b, 1)
1818
found, its, ite = search_context_forward(search_context, it)
1919
@test found == true
2020
@test (its:ite).text == "test"
2121

2222
search_context_replace(search_context, its, ite, "it worked!")
2323
set_search_text(search_settings, "it worked!")
2424

25-
it = Gtk4._GtkTextIter(b, 1)
25+
it = Gtk4.GtkTextIter(b, 1)
2626
found, its, ite = search_context_forward(search_context, it)
2727
@test found == true
2828
@test (its:ite).text == "it worked!"
2929

3030
mark = create_mark(b, it)
3131
scroll_to(v, mark, 0, true, 0.5, 0.5)
32-
3332
end
34-
35-

0 commit comments

Comments
 (0)