Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
fail in __init__() with error if Gtk4 was previously imported (#651)
Browse files Browse the repository at this point in the history
* fail in __init__() with error if Gtk4 was previously imported (prevents a crash)

Also remove redundant tests that I introduced

* run CI again
  • Loading branch information
jwahlstrand authored Jul 29, 2022
1 parent b1e2d5e commit 4a45ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Gtk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ include("gio.jl")
include("application.jl")

function __init__()
in(:Gtk4, names(Main, imported=true)) && error("Gtk is incompatible with Gtk4.")

# Set XDG_DATA_DIRS so that Gtk can find its icons and schemas
ENV["XDG_DATA_DIRS"] = join(filter(x -> x !== nothing, [
dirname(adwaita_icons_dir),
Expand Down
2 changes: 0 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ include("gui.jl")
include("list.jl")
include("misc.jl")
include("text.jl")
include("tree.jl")

end

0 comments on commit 4a45ca4

Please sign in to comment.