mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-ui: only handle selected aids
This commit is contained in:
@ -63,6 +63,14 @@ sysprof_aid_icon_new (SysprofAid *aid)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
sysprof_aid_icon_is_selected (SysprofAidIcon *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (SYSPROF_IS_AID_ICON (self), FALSE);
|
||||||
|
|
||||||
|
return gtk_widget_get_visible (GTK_WIDGET (self->check));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sysprof_aid_icon_get_aid:
|
* sysprof_aid_icon_get_aid:
|
||||||
*
|
*
|
||||||
|
|||||||
@ -31,8 +31,9 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (SysprofAidIcon, sysprof_aid_icon, SYSPROF, AID_ICON, GtkFlowBoxChild)
|
G_DECLARE_FINAL_TYPE (SysprofAidIcon, sysprof_aid_icon, SYSPROF, AID_ICON, GtkFlowBoxChild)
|
||||||
|
|
||||||
GtkWidget *sysprof_aid_icon_new (SysprofAid *aid);
|
GtkWidget *sysprof_aid_icon_new (SysprofAid *aid);
|
||||||
SysprofAid *sysprof_aid_icon_get_aid (SysprofAidIcon *self);
|
SysprofAid *sysprof_aid_icon_get_aid (SysprofAidIcon *self);
|
||||||
void sysprof_aid_icon_toggle (SysprofAidIcon *self);
|
void sysprof_aid_icon_toggle (SysprofAidIcon *self);
|
||||||
|
gboolean sysprof_aid_icon_is_selected (SysprofAidIcon *self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@ -169,9 +169,12 @@ sysprof_profiler_assistant_foreach_cb (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
else if (SYSPROF_IS_AID_ICON (widget))
|
else if (SYSPROF_IS_AID_ICON (widget))
|
||||||
{
|
{
|
||||||
SysprofAid *aid = sysprof_aid_icon_get_aid (SYSPROF_AID_ICON (widget));
|
if (sysprof_aid_icon_is_selected (SYSPROF_AID_ICON (widget)))
|
||||||
|
{
|
||||||
|
SysprofAid *aid = sysprof_aid_icon_get_aid (SYSPROF_AID_ICON (widget));
|
||||||
|
|
||||||
sysprof_aid_prepare (aid, profiler);
|
sysprof_aid_prepare (aid, profiler);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user