gnome-utils r8295 - trunk/logview



Author: cosimoc
Date: Tue Dec 23 13:27:36 2008
New Revision: 8295
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8295&view=rev

Log:
Insert the days in the right order inside the store and format a nicer
string for the date.

Modified:
   trunk/logview/logview-loglist.c

Modified: trunk/logview/logview-loglist.c
==============================================================================
--- trunk/logview/logview-loglist.c	(original)
+++ trunk/logview/logview-loglist.c	Tue Dec 23 13:27:36 2008
@@ -69,6 +69,7 @@
   gboolean res;
   GtkTreeIter iter;
   GSList *l;
+  int i;
 
   /* first, remove all the stored days */
   res = gtk_tree_model_iter_children (GTK_TREE_MODEL (loglist->priv->model),
@@ -82,12 +83,13 @@
                                        &iter));
   }
 
-  for (l = days; l; l = l->next) {
+  for (i = 0, l = days; l; l = l->next) {
     /* now insert all the days */
     gtk_tree_store_insert (GTK_TREE_STORE (loglist->priv->model),
-                           &iter, log, 1);
+                           &iter, log, i);
     gtk_tree_store_set (GTK_TREE_STORE (loglist->priv->model),
                         &iter, LOG_DAY, l->data, -1);
+    i++;
   }
 }
 
@@ -300,7 +302,7 @@
     return;
   }
 
-  g_date_strftime (string_date, 200, "%F", day->date);
+  g_date_strftime (string_date, 200, "%A, %e %b", day->date);
   g_object_set (cell, "text", string_date, NULL);
 }
 



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