sysprof: add vfunc for when session is set

This commit is contained in:
Christian Hergert
2023-07-14 17:09:23 -07:00
parent ea7fe3c55f
commit c7e1d862ac
2 changed files with 8 additions and 1 deletions

View File

@ -216,7 +216,11 @@ sysprof_section_set_session (SysprofSection *self,
g_return_if_fail (!session || SYSPROF_IS_SESSION (session));
if (g_set_object (&priv->session, session))
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SESSION]);
{
if (SYSPROF_SECTION_GET_CLASS (self)->session_set)
SYSPROF_SECTION_GET_CLASS (self)->session_set (self, session);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SESSION]);
}
}
const char *

View File

@ -33,6 +33,9 @@ G_DECLARE_DERIVABLE_TYPE (SysprofSection, sysprof_section, SYSPROF, SECTION, Gtk
struct _SysprofSectionClass
{
GtkWidgetClass parent_class;
void (*session_set) (SysprofSection *self,
SysprofSession *session);
};
SysprofSession *sysprof_section_get_session (SysprofSection *self);