libsysprof-ui: allow multiple selections

This commit is contained in:
Christian Hergert
2019-05-20 15:25:13 -07:00
parent 2f1d6b6981
commit 1183c05e81
2 changed files with 6 additions and 1 deletions

View File

@ -37,6 +37,7 @@ struct _SysprofDetailsView
/* Template Objects */ /* Template Objects */
DzlThreeGrid *three_grid; DzlThreeGrid *three_grid;
GtkListStore *marks_store; GtkListStore *marks_store;
GtkTreeView *marks_view;
GtkLabel *duration; GtkLabel *duration;
GtkLabel *filename; GtkLabel *filename;
GtkLabel *forks; GtkLabel *forks;
@ -93,6 +94,7 @@ sysprof_details_view_class_init (SysprofDetailsViewClass *klass)
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, forks); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, forks);
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, marks); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, marks);
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, marks_store); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, marks_store);
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, marks_view);
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, processes); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, processes);
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, samples); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, samples);
gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, start_time); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsView, start_time);
@ -106,6 +108,9 @@ sysprof_details_view_init (SysprofDetailsView *self)
{ {
gtk_widget_init_template (GTK_WIDGET (self)); gtk_widget_init_template (GTK_WIDGET (self));
gtk_tree_selection_set_mode (gtk_tree_view_get_selection (self->marks_view),
GTK_SELECTION_MULTIPLE);
self->next_row = 8; self->next_row = 8;
} }

View File

@ -208,7 +208,7 @@
<property name="shadow-type">in</property> <property name="shadow-type">in</property>
<property name="margin-bottom">12</property> <property name="margin-bottom">12</property>
<child> <child>
<object class="GtkTreeView" id="marks_tree_view"> <object class="GtkTreeView" id="marks_view">
<property name="model">marks_store</property> <property name="model">marks_store</property>
<property name="width-request">500</property> <property name="width-request">500</property>
<property name="height-request">100</property> <property name="height-request">100</property>