-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need access to gdk_pixbuf_get_type (ListStore for IconView / TreeView) #37
Comments
I'm not sure how viable generating a type getter for every single class is. The Does this code work? var pixbufType = glib.TypeFromName("GdkPixbuf") The code used to get the package main
import (
"log"
"github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gdkpixbuf/v2"
)
func main() {
pixbuf := gdkpixbuf.NewPixbuf(
gdkpixbuf.ColorspaceRGB,
false, 8, 1, 1,
)
log.Println(pixbuf.TypeFromInstance())
log.Println(pixbuf.TypeFromInstance().Name())
log.Println(glib.TypeFromName("GdkPixbuf"))
// Output:
// GdkPixbuf
// GdkPixbuf
// GdkPixbuf
} |
AFAIK there was no other specific need like this, but the IconView is not usable without it. For the gallery I wanted to get pixbuf from icon name, which seem pretty hard now that everything is wrapped in Paintable or other, so for now it will be from download. Side question now that my gallery is almost ready, is there a way to make a screenshot of the window (or part of) :
Panics in the ToNode() method.
Example found on the gnome forums |
Is there a log print that says "missing marshaler for type"? This will only work on commit 5622f54 and later. |
I should probably change the code generator to generate an assertion that vomits Edit: commit 2625db3 implements this. |
your new error message:
Need to make more changes in
Which now crash my screenshot attempt like this:
With my new error message and its magical %T |
That's unusual. Can you make a working piece of code that reproduces the |
Wait... I'm wondering if this is because the returned |
I think the most appropriate fix in this case would be to fix the bug that's For now, commit 1988d98 now panics with a message indicating that an object that |
Latest commit now generates a |
I know it's possible to do this in the builder (I used to do it before gotk3 had the function) but that seem like driving a heavy truck to move a letter. And I'd prefer not to show that in the gallery example.
IconView is not really usable without that.
Here's the gotk3 code:
This was in gdk/pixbuf.go, I'm not sure if it belongs in the gdkpixbuf package like :
gdkpixbuf.GetType()
or justgdkpixbuf.Type()
The text was updated successfully, but these errors were encountered: