mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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:
@ -34,6 +34,7 @@ struct _SysprofWindow
|
|||||||
DzlBindingGroup *bindings;
|
DzlBindingGroup *bindings;
|
||||||
|
|
||||||
SysprofNotebook *notebook;
|
SysprofNotebook *notebook;
|
||||||
|
GtkButton *open_button;
|
||||||
GtkMenuButton *menu_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_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, menu_button);
|
||||||
|
gtk_widget_class_bind_template_child (widget_class, SysprofWindow, open_button);
|
||||||
gtk_widget_class_bind_template_child (widget_class, SysprofWindow, notebook);
|
gtk_widget_class_bind_template_child (widget_class, SysprofWindow, notebook);
|
||||||
|
|
||||||
g_type_ensure (SYSPROF_TYPE_NOTEBOOK);
|
g_type_ensure (SYSPROF_TYPE_NOTEBOOK);
|
||||||
|
|||||||
@ -24,6 +24,17 @@
|
|||||||
<property name="pack-type">end</property>
|
<property name="pack-type">end</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</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>
|
<child>
|
||||||
<object class="GtkLabel" id="stat_label">
|
<object class="GtkLabel" id="stat_label">
|
||||||
<property name="margin-end">12</property>
|
<property name="margin-end">12</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user