Skip to main content


You have a #Gtk4 application, written in python with #PyGObject, which use a template to build a window.
If you define a callback in code but you do not use it in template, an exception is raised.
If you use a callback in template which is not defined in code, no errors are reported.
But.
CSS classes are not applied to widgets. 🤷

Look:
With the callback:

Without the callback:

I lost some good hours trying to find why my button was not styled.

#Gtk 4.16.5



Today I've worked on a little on my toy python-only Gtk UI Light Language (GULL), which is an experiment to write a lighter, more compact, UI definition file for #GTK instead of XML.

My experiment works only with python, as the code which parse and build widgets is all in python/py-gobject . It has also some nice functionality, like import other definition files as widgets and python module to connect functions to events. Oh and probably will ever support only Gtk3, because it's a toy, I'm lazy and I didn't started to look into Gtk4 yet...

I was thinking about writing a "converter" from my format into XML, to be able to use it via standard GtkBuilder.

My ugly code is here: git.sr.ht/~fabrixxm/gull

And now I stumbled on this jwestman.net/2021/10/22/a-mark… by @James Westman

I see we both come on that from the same thread on #GNOME discourse 😀

discourse.gnome.org/t/simplify…



#wip #GTK / #Python app to manage collections, using lesana as base




TIL* about Project Gemini
"Gemini is a new, collaboratively designed internet protocol, which explores the space inbetween gopher and the web, striving to address (perceived) limitations of one while avoiding the (undeniable) pitfalls of the other."


https://gemini.circumlunar.space/

Found about it via Castor ( sr.ht/~julienxx/Castor/ ), a graphical gemini (+ gopher and finger) browser, written in #rust / #gtk , which I found thanks to the "Featured projects" list of Sourcehut Hub ( read more here sourcehut.org/blog/2020-04-30-… )

So, obviously, I neeeeded a #gemini browser on my #sailfishos phone.

It's not yet here, but while experimenting I ended up writing a desktop browser for #gemini with #Qt and #QML which I called Alrisha : git.sr.ht/~fabrixxm/alrisha

At this point I neeeeeeeeed a presence on the 'gemini space'. But I'm not inclined to maintain it by hand. It will become stale quickly, I'm sure.

So I'm on the road to write an "ActivityPub C2S client via gemini". A web.. no, a gemini app that will render gemini pages from ActivityStream objects.

Just to publish this #microblog on gemini automatically. Because why not.

It's been written in #python using Jetforce github.com/michael-lazar/jetfo…

Here a screenshot of what I have now: on the left firefox shows my profile page via http/html, on the right the terminal running the gemini appserver, in the middle Alrisha rendering the result of the work...

*Thursday I Learned
Schermata_del_2020-05-04_11-42-14.png

This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.