mate-desktop / pluma

A powerful text editor for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
157 stars 65 forks source link

Port main program to GSettings #563

Closed mbkma closed 4 years ago

mbkma commented 4 years ago

Remove pluma-prefs-manager. Plugins were already ported to GSettings. Based on: https://gitlab.gnome.org/GNOME/gedit/-/commit/4215be0e8924f45170683493beaa2695e8e2e483

I hope with this PR it will be much easier in the future to add settings for new features in pluma. It removes the need to mess around with pluma_prefs_manager_* and instead uses g_settings_* methods directly. This will be much easier to maintain (less code). Everything should work exactly like before.

If #562 gets merged I can just rebase this PR.

sc0w commented 4 years ago

I don't understand the benefits of this change, it improves performance?

before: g_settings_new is called 12 times now: g_settings_new is called 30 times

rbuj commented 4 years ago

@sc0w did you read the PR description?

mbkma commented 4 years ago

@sc0w one way to avoid g_settings_new calls is to just initialise GSettings in PlumaSettings, and then use sth. like _pluma_settings_peek_editor_settings, like here: https://gitlab.gnome.org/GNOME/gedit/-/commit/23a97b390c5558e3995dc47ca4e8da79070ac751