Since my last blog post I have been working on implementing a selection mode for Epiphany’s History Dialog. The selection mode is a pretty common pattern seen throughout GNOME applications. It’s used to easily manipulate a set of selected items from a list or grid. I’ve used the selection mode from GNOME Boxes as a reference when implementing it in Epiphany.
This is how the History Dialog looked like before:
The selection mode is not permanently visible. It is toggled on and off using the tick button at the top right of the dialog.
Activating the selection mode reveals the action bar at the bottom which can be used to delete the selected items from history or open them in new tabs in the main browser window.
Another new change is the addition of the Copy URL button located to the right of each history row. The button is used to copy the item’s URL to clipboard. This change is not directly related to the selection mode, but it was added in order to remove the right-click popover menu which was previously used to open history items in new tabs and copy URLs to clipboard.
Recently I have been working on a very stubborn bug, #1281, which occurs when repeatedly opening and closing the Preferences dialog 3 to 4 times.
While working on this issue I have learned a handful of new debugging tricks:
gdbto get a crash backtrace
- using environment variables to alter an application’s behavior
valgrindto find memory leaks
I’ll expand a bit on environment variables since there are two very nice use cases which are worth mentioning:
G_DEBUG=fatal-criticals epiphanyin a terminal causes Epiphany to crash whenever a critical error is printed, which is exceptionally useful for debugging (I honestly wish I found out about this sooner 🙂 )
GTK_THEME=Adwaita epiphanyin a terminal will force Epiphany to use the Adwaita theme, which is very useful when testing UI changes (it’s also the theme used in the above gif and screenshot)
Currently I am in the process of setting up JHBuild for building Epiphany because I want to print information from inside the Gtk calls. When all else fails, good ol’
printf() is always ready to assist 🙂
After this issue is fixed (hopefully soon), I’ll spend some time polishing the History dialog source code files, as they are quite disorganized and hard to read after the recent work.
Thanks to this year’s project mentors, Michael Catanzaro and Jan-Michael Brummer for the help!
Also thanks to Alexander Mikhaylenko and Tobias Bernard for giving design feedback!
Lastly, thank you for reading this post, stay safe and enjoy the rest of the summer! 🙂