mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-03 09:44:05 +01:00
Add GApplication::should_quit vfunc
We are going to use it to intercept the quit() vfunc.
This commit is contained in:
@@ -813,6 +813,12 @@ g_application_real_shutdown (GApplication *application)
|
||||
application->priv->did_shutdown = TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_application_real_should_quit (GApplication *application)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
g_application_real_activate (GApplication *application)
|
||||
{
|
||||
@@ -1304,6 +1310,7 @@ g_application_class_init (GApplicationClass *class)
|
||||
class->add_platform_data = g_application_real_add_platform_data;
|
||||
class->dbus_register = g_application_real_dbus_register;
|
||||
class->dbus_unregister = g_application_real_dbus_unregister;
|
||||
class->should_quit = g_application_real_should_quit;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_APPLICATION_ID,
|
||||
g_param_spec_string ("application-id",
|
||||
|
||||
@@ -113,8 +113,10 @@ struct _GApplicationClass
|
||||
gint (* handle_local_options)(GApplication *application,
|
||||
GVariantDict *options);
|
||||
|
||||
gboolean (* should_quit) (GApplication *application);
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[8];
|
||||
gpointer padding[7];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
|
||||
Reference in New Issue
Block a user