mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
marks: add end time to mark details
This commit is contained in:
@ -47,6 +47,7 @@ typedef struct
|
|||||||
GtkLabel *group;
|
GtkLabel *group;
|
||||||
GtkLabel *mark;
|
GtkLabel *mark;
|
||||||
GtkLabel *time;
|
GtkLabel *time;
|
||||||
|
GtkLabel *end;
|
||||||
GtkLabel *duration;
|
GtkLabel *duration;
|
||||||
GtkTextView *message;
|
GtkTextView *message;
|
||||||
} SysprofMarksPagePrivate;
|
} SysprofMarksPagePrivate;
|
||||||
@ -147,12 +148,14 @@ sysprof_marks_page_selection_changed_cb (SysprofMarksPage *self,
|
|||||||
g_autofree gchar *name = NULL;
|
g_autofree gchar *name = NULL;
|
||||||
g_autofree gchar *duration_str = NULL;
|
g_autofree gchar *duration_str = NULL;
|
||||||
g_autofree gchar *time_str = NULL;
|
g_autofree gchar *time_str = NULL;
|
||||||
|
g_autofree gchar *end_str = NULL;
|
||||||
g_autofree gchar *text = NULL;
|
g_autofree gchar *text = NULL;
|
||||||
GtkAdjustment *adj;
|
GtkAdjustment *adj;
|
||||||
gdouble x;
|
gdouble x;
|
||||||
gint64 begin_time;
|
gint64 begin_time;
|
||||||
gint64 end_time;
|
gint64 end_time;
|
||||||
gint64 duration;
|
gint64 duration;
|
||||||
|
gint64 etime;
|
||||||
gint64 otime;
|
gint64 otime;
|
||||||
gdouble lower;
|
gdouble lower;
|
||||||
gdouble upper;
|
gdouble upper;
|
||||||
@ -174,10 +177,14 @@ sysprof_marks_page_selection_changed_cb (SysprofMarksPage *self,
|
|||||||
otime = begin_time - priv->capture_begin_time;
|
otime = begin_time - priv->capture_begin_time;
|
||||||
time_str = _sysprof_format_duration (otime);
|
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->group, group);
|
||||||
gtk_label_set_label (priv->mark, name);
|
gtk_label_set_label (priv->mark, name);
|
||||||
gtk_label_set_label (priv->duration, duration_str);
|
gtk_label_set_label (priv->duration, duration_str);
|
||||||
gtk_label_set_label (priv->time, time_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);
|
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;
|
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_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, 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_cell);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, duration_column);
|
gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, duration_column);
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Duration</property>
|
<property name="label" translatable="yes">End</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<style>
|
<style>
|
||||||
@ -90,6 +90,20 @@
|
|||||||
<property name="left-attach">0</property>
|
<property name="left-attach">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</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>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Message</property>
|
<property name="label" translatable="yes">Message</property>
|
||||||
@ -101,7 +115,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top-attach">4</property>
|
<property name="top-attach">5</property>
|
||||||
<property name="left-attach">0</property>
|
<property name="left-attach">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -139,7 +153,7 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="duration">
|
<object class="GtkLabel" id="end">
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
@ -148,6 +162,16 @@
|
|||||||
<property name="left-attach">1</property>
|
<property name="left-attach">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</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>
|
<child>
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="hexpand">true</property>
|
<property name="hexpand">true</property>
|
||||||
@ -161,7 +185,7 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top-attach">4</property>
|
<property name="top-attach">5</property>
|
||||||
<property name="left-attach">1</property>
|
<property name="left-attach">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
Reference in New Issue
Block a user