Migrate from EggSMClient to GtkApplication
#2 Updated by John Lindgren about 8 years ago
There are major problems with "migrating" to GtkApplication, which is a much different API than EggSMClient.
GtkApplication enforces a certain model on any program using it. If I understand the documentation correctly, you have to implement a startup() function that does program-wide initialization and an activate() function that creates and registers a GtkWindow. The program will then quit when (and only when) the last window is destroyed. Audacious simply does not fit this model. It would make headless mode entirely impossible, and it would force any quit command to be accomplished through the current UI plugin (by destroying the main window). It would make any non-GTK+ UI plugin impossible.
"Currently, GtkApplication handles GTK+ initialization, application uniqueness, session management, provides some basic scriptability and desktop shell integration by exporting actions and menus and manages a list of toplevel windows whose life-cycle is automatically tied to the life-cycle of your application."
All we want is the session management support, so GtkApplication seems like a solution that is completely out of proportion to the problem.