From 39dde4634bac9a20f6e992966afea2f899ebdbfc Mon Sep 17 00:00:00 2001 From: Jared Wahlstrand Date: Sun, 2 Jul 2023 21:22:53 -0400 Subject: [PATCH] index methods for GtkPopover --- src/buttons.jl | 2 -- src/layout.jl | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/buttons.jl b/src/buttons.jl index dc599597..854eaa55 100644 --- a/src/buttons.jl +++ b/src/buttons.jl @@ -72,8 +72,6 @@ function GtkPopoverMenu(model::GMenu, nested = false) end end -popup(m::GtkPopover) = G_.popup(m) - GtkPopoverMenuBar(model::GMenu) = G_.PopoverMenuBar_new_from_model(model) menu_model(b::Union{GtkMenuButton,GtkPopoverMenu, GtkPopoverMenuBar}, model) = G_.set_menu_model(b, GMenuModel(model)) diff --git a/src/layout.jl b/src/layout.jl index 654ba7fa..e4e41d0e 100644 --- a/src/layout.jl +++ b/src/layout.jl @@ -267,3 +267,10 @@ getindex(s::GtkStack, name::AbstractString) = G_.get_child_by_name(s,name) setindex!(s::GtkStack, x::GtkWidget, name::AbstractString) = G_.add_named(s,x,name) stack(w::GtkStackSwitcher, s::GtkStack) = G_.set_stack(w,s) + +## GtkPopover + +getindex(w::GtkPopover) = G_.get_child(w) +setindex!(w::GtkPopover, c::GtkWidget) = G_.set_child(w,c) +popup(m::GtkPopover) = G_.popup(m) +