mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: allow passing program path to sysprof
If the path provided to us is an executable program (instead of a syscap file) then we can setup the path as the binary to execute in the profiler assistant and save the user a couple clicks.
This commit is contained in:
@ -455,3 +455,22 @@ _sysprof_profiler_assistant_focus_record (SysprofProfilerAssistant *self)
|
||||
|
||||
gtk_widget_grab_focus (GTK_WIDGET (self->record_button));
|
||||
}
|
||||
|
||||
void
|
||||
sysprof_profiler_assistant_set_executable (SysprofProfilerAssistant *self,
|
||||
const gchar *path)
|
||||
{
|
||||
g_return_if_fail (SYSPROF_IS_PROFILER_ASSISTANT (self));
|
||||
|
||||
if (path == NULL || path[0] == 0)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (self->command_line), "");
|
||||
gtk_switch_set_active (self->launch_switch, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (self->command_line), path);
|
||||
gtk_switch_set_active (self->launch_switch, TRUE);
|
||||
gtk_widget_grab_focus (GTK_WIDGET (self->command_line));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user