I am pleased to announce a new Cambalache stable release, version 0.92.0!
This comes with two major dependencies changes, the first one is a very basic port to Adwaita and webkit/broadway replacement with a custom Wayland compositor widget based on wlroots.
What’s new:
-
- Basic port to Adwaita
- Use Casilda compositor widget for workspace
- Update widget catalogs to SDK 47
- Improved Drag&Drop support
- Improve workspace performance
- Enable workspace animations
- Fix window ordering
- Support new desktop dark style
- Support 3rd party libraries
- Streamline headerbar
- Lots of bug fixes and minor improvements
Adwaita
The port to Adwaita gives Cambalache the new modern look and enables dark mode support.
The headerbar is simplified only keeping most common used actions, everything else was moved to the main menu.
Casilda Compositor
Up until this release, Cambalache showed windows from a different process in its workspace running broadwayd or gtk4-broadwayd backend depending on the gtk version of your project and using a WebView to connect to it and show the windows in an HTML canvas.All of this was replaced with a simple Wayland compositor widget which reduces hard dependencies a lot.
On top of that we get all the optimizations from using Wayland instead of a protocol meant to go over the internet.
With Broadway, the client would render the window in memory, the broadway backend would compress the image and sent it over TCP to the webview which has to uncompress it and render it on an HTML5 canvas.
Now, the client just renders in shared memory which is directly available to the compositor widget to use. This also leave the option to further improve performance by adding support for dmabuf which would allow to offload the composition to the host compositor reducing the number of memory copies to show the windows on the screen.
This allowed me to re enable Gtk animations since they no longer impact the workspace performance.
Special thanks to emersion, kennylevinsen, vyivel and the wlroots community for their support and awesome project, I would not have been able to do this without wlroots and their help.
You can read more about Casilda in my previous post
3rd party libraries
Cambalache now loads 3rd party catalogs from GLib.get_system_data_dirs()/cambalache/catalogs and ~/.cambalache/catalogs
These catalog files are generated from Gir data with a new tool bundled in Cambalache calledcmb-catalog-gen
. This used to be an internal and still lacks proper documentation but you can see an example of how its used internally here
So what is a catalog anyway?
A catalog is a XML file with all the necessary data for Cambalache to produce UI files with widgets from a particular library, this includes the different GTypes, with their properties, signals and everything else except the actual object implementations.
Runtime objects are created in the workspace by loading the GI namespace specified in the catalog.
Feel free to contact me on matrix if you are interested in adding support for a 3rd party library.
Improved Drag&Drop
After the extensive rework done porting the main widget hierarchy from GtkTreeView to GtkColumnView and implementing several GListModel interfaces to avoid maintaining multiple lists I was able to reimplement and extend Drag&Drop code so now its possible to drop widgets in different parents.
Data Model
History handling for Undo/Redo was simplified from multiple history tables (one per table tracked) into one history table by adding a few extra columns to store data change in JSON format.
CREATE TABLE history ( history_id INTEGER PRIMARY KEY, command TEXT NOT NULL, range_id INTEGER REFERENCES history, table_name TEXT, column_name TEXT, message TEXT, + table_pk JSON, + new_values JSON, + old_values JSON );
This is the current history table, entries are populated automatically by triggers each time something in the project is created, changed or removed.
This data is then used to implement Undo and Redo commands.
Where to get it?
You can get it from Flathub
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo flatpak install flathub ar.xjuan.Cambalache
or directly from gitlab
git clone https://gitlab.gnome.org/jpu/cambalache.git
Matrix channel
Have any question? come chat with us at #cambalache:gnome.org
Mastodon
Follow me in Mastodon @xjuan to get news related to Cambalache development.
Happy coding!
Wonderful !