mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
sysprof: ctrl+n to go record again from greeter
This commit is contained in:
@ -54,11 +54,9 @@ G_DEFINE_FINAL_TYPE (SysprofWindow, sysprof_window, ADW_TYPE_APPLICATION_WINDOW)
|
|||||||
static GParamSpec *properties [N_PROPS];
|
static GParamSpec *properties [N_PROPS];
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sysprof_window_open_capture_action (GtkWidget *widget,
|
show_greeter (SysprofWindow *self,
|
||||||
const char *action_name,
|
SysprofGreeterPage page)
|
||||||
GVariant *param)
|
|
||||||
{
|
{
|
||||||
SysprofWindow *self = (SysprofWindow *)widget;
|
|
||||||
SysprofGreeter *greeter;
|
SysprofGreeter *greeter;
|
||||||
|
|
||||||
g_assert (SYSPROF_IS_WINDOW (self));
|
g_assert (SYSPROF_IS_WINDOW (self));
|
||||||
@ -66,10 +64,26 @@ sysprof_window_open_capture_action (GtkWidget *widget,
|
|||||||
greeter = g_object_new (SYSPROF_TYPE_GREETER,
|
greeter = g_object_new (SYSPROF_TYPE_GREETER,
|
||||||
"transient-for", self,
|
"transient-for", self,
|
||||||
NULL);
|
NULL);
|
||||||
sysprof_greeter_set_page (greeter, SYSPROF_GREETER_PAGE_OPEN);
|
sysprof_greeter_set_page (greeter, page);
|
||||||
gtk_window_present (GTK_WINDOW (greeter));
|
gtk_window_present (GTK_WINDOW (greeter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sysprof_window_open_capture_action (GtkWidget *widget,
|
||||||
|
const char *action_name,
|
||||||
|
GVariant *param)
|
||||||
|
{
|
||||||
|
show_greeter (SYSPROF_WINDOW (widget), SYSPROF_GREETER_PAGE_OPEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sysprof_window_record_capture_action (GtkWidget *widget,
|
||||||
|
const char *action_name,
|
||||||
|
GVariant *param)
|
||||||
|
{
|
||||||
|
show_greeter (SYSPROF_WINDOW (widget), SYSPROF_GREETER_PAGE_RECORD);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sysprof_window_set_document (SysprofWindow *self,
|
sysprof_window_set_document (SysprofWindow *self,
|
||||||
SysprofDocument *document)
|
SysprofDocument *document)
|
||||||
@ -179,6 +193,7 @@ sysprof_window_class_init (SysprofWindowClass *klass)
|
|||||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-window.ui");
|
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-window.ui");
|
||||||
|
|
||||||
gtk_widget_class_install_action (widget_class, "win.open-capture", NULL, sysprof_window_open_capture_action);
|
gtk_widget_class_install_action (widget_class, "win.open-capture", NULL, sysprof_window_open_capture_action);
|
||||||
|
gtk_widget_class_install_action (widget_class, "win.record-capture", NULL, sysprof_window_record_capture_action);
|
||||||
|
|
||||||
g_type_ensure (SYSPROF_TYPE_DOCUMENT);
|
g_type_ensure (SYSPROF_TYPE_DOCUMENT);
|
||||||
g_type_ensure (SYSPROF_TYPE_FILES_SECTION);
|
g_type_ensure (SYSPROF_TYPE_FILES_SECTION);
|
||||||
|
|||||||
@ -8,6 +8,12 @@
|
|||||||
<property name="default-height">750</property>
|
<property name="default-height">750</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutController">
|
<object class="GtkShortcutController">
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcut">
|
||||||
|
<property name="trigger"><ctrl>n</property>
|
||||||
|
<property name="action">action(win.record-capture)</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcut">
|
<object class="GtkShortcut">
|
||||||
<property name="trigger"><ctrl>o</property>
|
<property name="trigger"><ctrl>o</property>
|
||||||
@ -158,19 +164,18 @@
|
|||||||
</template>
|
</template>
|
||||||
<menu id="primary_menu">
|
<menu id="primary_menu">
|
||||||
<section>
|
<section>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">_Record Again…</attribute>
|
||||||
|
<attribute name="action">win.record-capture</attribute>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Open Recording…</attribute>
|
<attribute name="label" translatable="yes">Open Recording…</attribute>
|
||||||
<attribute name="action" translatable="yes">win.open-capture</attribute>
|
<attribute name="action">win.open-capture</attribute>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Save As…</attribute>
|
<attribute name="label" translatable="yes">Save As…</attribute>
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Record Again…</attribute>
|
|
||||||
</item>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Preferences</attribute>
|
<attribute name="label" translatable="yes">Preferences</attribute>
|
||||||
@ -193,11 +198,11 @@
|
|||||||
<attribute name="label" translatable="yes">Callgraph</attribute>
|
<attribute name="label" translatable="yes">Callgraph</attribute>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Hide System Libraries</attribute>
|
<attribute name="label" translatable="yes">Hide System Libraries</attribute>
|
||||||
<attribute name="action" translatable="yes">win.callgraph.hide-system-libraries</attribute>
|
<attribute name="action">win.callgraph.hide-system-libraries</attribute>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Include Threads</attribute>
|
<attribute name="label" translatable="yes">Include Threads</attribute>
|
||||||
<attribute name="action" translatable="yes">win.callgraph.include-threads</attribute>
|
<attribute name="action">win.callgraph.include-threads</attribute>
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
Reference in New Issue
Block a user