[sysprof] libsysprof-ui: allow multiple selections



commit 1183c05e81d9734f940faf24e94a3c2cc5ff80a0
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 20 15:25:13 2019 -0700

    libsysprof-ui: allow multiple selections

 src/libsysprof-ui/sysprof-details-view.c     | 5 +++++
 src/libsysprof-ui/ui/sysprof-details-view.ui | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-details-view.c b/src/libsysprof-ui/sysprof-details-view.c
index 8a55942..4a96e0a 100644
--- a/src/libsysprof-ui/sysprof-details-view.c
+++ b/src/libsysprof-ui/sysprof-details-view.c
@@ -37,6 +37,7 @@ struct _SysprofDetailsView
   /* Template Objects */
   DzlThreeGrid *three_grid;
   GtkListStore *marks_store;
+  GtkTreeView  *marks_view;
   GtkLabel     *duration;
   GtkLabel     *filename;
   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, marks);
   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, samples);
   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_tree_selection_set_mode (gtk_tree_view_get_selection (self->marks_view),
+                               GTK_SELECTION_MULTIPLE);
+
   self->next_row = 8;
 }
 
diff --git a/src/libsysprof-ui/ui/sysprof-details-view.ui b/src/libsysprof-ui/ui/sysprof-details-view.ui
index 71dffeb..3365eea 100644
--- a/src/libsysprof-ui/ui/sysprof-details-view.ui
+++ b/src/libsysprof-ui/ui/sysprof-details-view.ui
@@ -208,7 +208,7 @@
                 <property name="shadow-type">in</property>
                 <property name="margin-bottom">12</property>
                 <child>
-                  <object class="GtkTreeView" id="marks_tree_view">
+                  <object class="GtkTreeView" id="marks_view">
                     <property name="model">marks_store</property>
                     <property name="width-request">500</property>
                     <property name="height-request">100</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]