Skip to content

Text toolbar and comboboxes refactoring

PBS requested to merge pbs3141/inkscape:fontcombo-unblech into master

A largish refactoring prompted by the mess I found in combo-box-entry-tool-item, which needed cleaning up for GTK4. A long-awaited GList eradication was also performed, eliminating most of the remaining uses in the codebase.

Main changes:

  • Cppify and clean up ComboBoxEntryToolItem, with the main motivation being to eliminate type-unsafe C connections and GdkEvent usage, both for GTK4.

  • Get rid of GList of StyleNames, replacing it with shared_ptr<vector<StyleNames>>. Although the shared_ptr seems unnecessary, it was necessary to sort out the muddled memory management. (See below.)

  • Don't leak FontLister and DocumentFonts at exit. The destructor of FontLister (that was previously not running) turned out to be crashing. This was due to double-freeing shared data among the various GLists, hence the need for their eradication.

Smaller changes:

  • Fix a std::map that claimed O(1) lookup to an unordered one.

  • Make two catch (...) statements only catch the type they intend to.

  • Add cache for font size ListStores.

Merge request reports