mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: make escape stop the current profiler
This commit is contained in:
@ -254,13 +254,11 @@ stop_recording_cb (GSimpleAction *action,
|
||||
gpointer user_data)
|
||||
{
|
||||
SysprofDisplay *self = user_data;
|
||||
SysprofDisplayPrivate *priv = sysprof_display_get_instance_private (self);
|
||||
|
||||
g_assert (G_IS_SIMPLE_ACTION (action));
|
||||
g_assert (SYSPROF_IS_DISPLAY (self));
|
||||
|
||||
if (priv->profiler != NULL)
|
||||
sysprof_profiler_stop (priv->profiler);
|
||||
sysprof_display_stop_recording (self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -572,3 +570,14 @@ sysprof_display_get_can_save (SysprofDisplay *self)
|
||||
|
||||
return sysprof_capture_view_get_reader (priv->capture_view) != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
sysprof_display_stop_recording (SysprofDisplay *self)
|
||||
{
|
||||
SysprofDisplayPrivate *priv = sysprof_display_get_instance_private (self);
|
||||
|
||||
g_return_if_fail (SYSPROF_IS_DISPLAY (self));
|
||||
|
||||
if (priv->profiler != NULL)
|
||||
sysprof_profiler_stop (priv->profiler);
|
||||
}
|
||||
|
||||
@ -41,19 +41,21 @@ struct _SysprofDisplayClass
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
GtkWidget *sysprof_display_new (void);
|
||||
GtkWidget *sysprof_display_new (void);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
gchar *sysprof_display_dup_title (SysprofDisplay *self);
|
||||
gchar *sysprof_display_dup_title (SysprofDisplay *self);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
SysprofProfiler *sysprof_display_get_profiler (SysprofDisplay *self);
|
||||
SysprofProfiler *sysprof_display_get_profiler (SysprofDisplay *self);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
gboolean sysprof_display_is_empty (SysprofDisplay *self);
|
||||
gboolean sysprof_display_is_empty (SysprofDisplay *self);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
void sysprof_display_open (SysprofDisplay *self,
|
||||
GFile *file);
|
||||
void sysprof_display_open (SysprofDisplay *self,
|
||||
GFile *file);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
void sysprof_display_save (SysprofDisplay *self);
|
||||
void sysprof_display_save (SysprofDisplay *self);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
gboolean sysprof_display_get_can_save (SysprofDisplay *self);
|
||||
gboolean sysprof_display_get_can_save (SysprofDisplay *self);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
void sysprof_display_stop_recording (SysprofDisplay *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user