From 88df2711e3bbdefe95de37f13ffd4584d442f458 Mon Sep 17 00:00:00 2001 From: p3732 Date: Thu, 2 Jul 2020 00:37:44 +0200 Subject: [PATCH] Add Open button Add a button to open capture files in headerbar. This caters to the suggested usage of 'sysprof-cli' by exposing the funcitonality in a prominent place. --- src/sysprof/sysprof-window.c | 2 ++ src/sysprof/ui/sysprof-window.ui | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/sysprof/sysprof-window.c b/src/sysprof/sysprof-window.c index bbf90d56..7b59ff62 100644 --- a/src/sysprof/sysprof-window.c +++ b/src/sysprof/sysprof-window.c @@ -34,6 +34,7 @@ struct _SysprofWindow DzlBindingGroup *bindings; SysprofNotebook *notebook; + GtkButton *open_button; GtkMenuButton *menu_button; }; @@ -190,6 +191,7 @@ sysprof_window_class_init (SysprofWindowClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-window.ui"); gtk_widget_class_bind_template_child (widget_class, SysprofWindow, menu_button); + gtk_widget_class_bind_template_child (widget_class, SysprofWindow, open_button); gtk_widget_class_bind_template_child (widget_class, SysprofWindow, notebook); g_type_ensure (SYSPROF_TYPE_NOTEBOOK); diff --git a/src/sysprof/ui/sysprof-window.ui b/src/sysprof/ui/sysprof-window.ui index f6d891c6..87158fe2 100644 --- a/src/sysprof/ui/sysprof-window.ui +++ b/src/sysprof/ui/sysprof-window.ui @@ -24,6 +24,17 @@ end + + + _Open + app.open-capture + true + true + + + start + + 12