Skip to content

Fully switch to GtkApplication

This MR completes the switch to GtkApplication, after !25 (merged) which was essentially at the window level, and which only introduced GtkApplication as a means to be able to make use of GAction.

Here are the main changes:

  • Drop DBus dependency and related code.
  • Use GResource to benefit from the "automatic resources" feature of GtkApplication, and integrate the preferences dialog to this change, to homogenize resources management.
  • Transfer most of the code of mousepad/main.c to mousepad/mousepad-application.c, by distributing it appropriately (I hope) among the GApplication virtual functions.
  • Some consequences of the above mainly located in mousepad/mousepad-window.c.

I limit myself to that for this MR, but another step could possibly be considered, consisting in rethinking the "create new window/open file" part, to better stick to the "activate/open" schema of GApplication.

In practice, this would consist in splitting mousepad_application_new_window_with_files() into mousepad_application_activate() and mousepad_application_open(), which are currently unused.

The behavior of the --quit option should also be improved in a future MR: see !30 (comment 16502).

Edited by Gaël Bonithon

Merge request reports