[empathy: 60/80] LogWindow: select the first normal date by default



commit 90f40d91fb39eff7e64113411c3efa9f81803418
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Tue May 3 11:35:53 2011 +0100

    LogWindow: select the first normal date by default

 libempathy-gtk/empathy-log-window.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index ad61fe1..2203ee2 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1290,7 +1290,8 @@ populate_dates_from_search_hits (GList *accounts,
           COL_WHEN_TEXT, _("Anytime"),
           -1);
 
-      gtk_tree_selection_select_iter (selection, &iter);
+      if (gtk_tree_model_iter_nth_child (model, &iter, NULL, 2))
+        gtk_tree_selection_select_iter (selection, &iter);
     }
 }
 
@@ -2559,7 +2560,7 @@ select_first_date (TplActionChain *chain, gpointer user_data)
   selection = gtk_tree_view_get_selection (view);
 
   /* Show messages of the most recent date */
-  if (gtk_tree_model_get_iter_first (model, &iter))
+  if (gtk_tree_model_iter_nth_child (model, &iter, NULL, 2))
     gtk_tree_selection_select_iter (selection, &iter);
 
   _tpl_action_chain_continue (log_window->chain);



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