mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: add vfunc for when session is set
This commit is contained in:
@ -216,7 +216,11 @@ sysprof_section_set_session (SysprofSection *self,
|
|||||||
g_return_if_fail (!session || SYSPROF_IS_SESSION (session));
|
g_return_if_fail (!session || SYSPROF_IS_SESSION (session));
|
||||||
|
|
||||||
if (g_set_object (&priv->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 *
|
const char *
|
||||||
|
|||||||
@ -33,6 +33,9 @@ G_DECLARE_DERIVABLE_TYPE (SysprofSection, sysprof_section, SYSPROF, SECTION, Gtk
|
|||||||
struct _SysprofSectionClass
|
struct _SysprofSectionClass
|
||||||
{
|
{
|
||||||
GtkWidgetClass parent_class;
|
GtkWidgetClass parent_class;
|
||||||
|
|
||||||
|
void (*session_set) (SysprofSection *self,
|
||||||
|
SysprofSession *session);
|
||||||
};
|
};
|
||||||
|
|
||||||
SysprofSession *sysprof_section_get_session (SysprofSection *self);
|
SysprofSession *sysprof_section_get_session (SysprofSection *self);
|
||||||
|
|||||||
Reference in New Issue
Block a user