[sysprof] marks: add end time to mark details
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] marks: add end time to mark details
- Date: Wed, 22 Jan 2020 20:01:20 +0000 (UTC)
commit 7dad1f2ab4ae4763dcc2a8d2ae080088c0bffc4a
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 22 12:01:26 2020 -0800
marks: add end time to mark details
src/libsysprof-ui/sysprof-marks-page.c | 8 ++++++++
src/libsysprof-ui/sysprof-marks-page.ui | 32 ++++++++++++++++++++++++++++----
2 files changed, 36 insertions(+), 4 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-marks-page.c b/src/libsysprof-ui/sysprof-marks-page.c
index 5ceff30..f6f59a2 100644
--- a/src/libsysprof-ui/sysprof-marks-page.c
+++ b/src/libsysprof-ui/sysprof-marks-page.c
@@ -47,6 +47,7 @@ typedef struct
GtkLabel *group;
GtkLabel *mark;
GtkLabel *time;
+ GtkLabel *end;
GtkLabel *duration;
GtkTextView *message;
} SysprofMarksPagePrivate;
@@ -147,12 +148,14 @@ sysprof_marks_page_selection_changed_cb (SysprofMarksPage *self,
g_autofree gchar *name = NULL;
g_autofree gchar *duration_str = NULL;
g_autofree gchar *time_str = NULL;
+ g_autofree gchar *end_str = NULL;
g_autofree gchar *text = NULL;
GtkAdjustment *adj;
gdouble x;
gint64 begin_time;
gint64 end_time;
gint64 duration;
+ gint64 etime;
gint64 otime;
gdouble lower;
gdouble upper;
@@ -174,10 +177,14 @@ sysprof_marks_page_selection_changed_cb (SysprofMarksPage *self,
otime = begin_time - priv->capture_begin_time;
time_str = _sysprof_format_duration (otime);
+ etime = end_time - priv->capture_begin_time;
+ end_str = _sysprof_format_duration (etime);
+
gtk_label_set_label (priv->group, group);
gtk_label_set_label (priv->mark, name);
gtk_label_set_label (priv->duration, duration_str);
gtk_label_set_label (priv->time, time_str);
+ gtk_label_set_label (priv->end, end_str);
gtk_text_buffer_set_text (gtk_text_view_get_buffer (priv->message), text, -1);
@@ -462,6 +469,7 @@ sysprof_marks_page_class_init (SysprofMarksPageClass *klass)
page_class->set_size_group = sysprof_marks_page_set_size_group;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-marks-page.ui");
+ gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, end);
gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, details_box);
gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, duration_cell);
gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, duration_column);
diff --git a/src/libsysprof-ui/sysprof-marks-page.ui b/src/libsysprof-ui/sysprof-marks-page.ui
index 1b6ab7c..131079d 100644
--- a/src/libsysprof-ui/sysprof-marks-page.ui
+++ b/src/libsysprof-ui/sysprof-marks-page.ui
@@ -78,7 +78,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label" translatable="yes">Duration</property>
+ <property name="label" translatable="yes">End</property>
<property name="visible">true</property>
<property name="xalign">1</property>
<style>
@@ -90,6 +90,20 @@
<property name="left-attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Duration</property>
+ <property name="visible">true</property>
+ <property name="xalign">1</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="top-attach">4</property>
+ <property name="left-attach">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Message</property>
@@ -101,7 +115,7 @@
</style>
</object>
<packing>
- <property name="top-attach">4</property>
+ <property name="top-attach">5</property>
<property name="left-attach">0</property>
</packing>
</child>
@@ -139,7 +153,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="duration">
+ <object class="GtkLabel" id="end">
<property name="visible">true</property>
<property name="xalign">0</property>
</object>
@@ -148,6 +162,16 @@
<property name="left-attach">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="duration">
+ <property name="visible">true</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top-attach">4</property>
+ <property name="left-attach">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkScrolledWindow">
<property name="hexpand">true</property>
@@ -161,7 +185,7 @@
</child>
</object>
<packing>
- <property name="top-attach">4</property>
+ <property name="top-attach">5</property>
<property name="left-attach">1</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]