[gnome-logs/wip/monospace: 4/9] Add timestamp to kernel events list view
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/monospace: 4/9] Add timestamp to kernel events list view
- Date: Wed, 23 Oct 2013 10:41:30 +0000 (UTC)
commit b166b5977d45f497f666a6f36df6fc6595cd124a
Author: David King <davidk gnome org>
Date: Thu Oct 10 15:48:29 2013 +0100
Add timestamp to kernel events list view
src/gl-eventview.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gl-eventview.c b/src/gl-eventview.c
index 01409b8..c330563 100644
--- a/src/gl-eventview.c
+++ b/src/gl-eventview.c
@@ -403,6 +403,7 @@ insert_journal_query_devices (GlJournal *journal,
GtkStyleContext *context;
GtkWidget *grid;
GtkWidget *label;
+ gchar *time;
gboolean rtl;
GtkWidget *image;
GlJournalResult result = *(GlJournalResult *)(l->data);
@@ -428,15 +429,24 @@ insert_journal_query_devices (GlJournal *journal,
gtk_widget_set_hexpand (label, TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
+ gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
+
+ time = gl_util_timestamp_to_display (result.timestamp);
+ label = gtk_label_new (time);
+ context = gtk_widget_get_style_context (GTK_WIDGET (label));
+ gtk_style_context_add_class (context, "dim-label");
+ gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL);
image = gtk_image_new_from_icon_name (rtl ? "go-next-rtl-symbolic"
: "go-next-symbolic",
GTK_ICON_SIZE_MENU);
- gtk_grid_attach (GTK_GRID (grid), image, 1, 0, 1, 1);
+ gtk_grid_attach (GTK_GRID (grid), image, 1, 0, 1, 2);
gtk_container_add (GTK_CONTAINER (listbox), row);
+
+ g_free (time);
}
gl_journal_results_free (journal, results);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]