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.
This commit is contained in:
p3732
2020-07-02 00:37:44 +02:00
committed by Christian Hergert
parent 03f32fe718
commit 88df2711e3
2 changed files with 13 additions and 0 deletions

View File

@ -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);

View File

@ -24,6 +24,17 @@
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkButton" id="open_button">
<property name="label" translatable="yes">_Open</property>
<property name="action_name">app.open-capture</property>
<property name="use_underline">true</property>
<property name="visible">true</property>
</object>
<packing>
<property name="pack-type">start</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stat_label">
<property name="margin-end">12</property>