+/* This is used to automatically select the first header if the user
+ * has not selected any header yet.
+ */
+static gboolean
+modest_header_view_on_expose_event(GtkTreeView *header_view,
+ GdkEventExpose *event,
+ gpointer user_data)
+{
+ GtkTreeSelection *sel;
+ GtkTreeModel *model;
+ GtkTreeIter tree_iter;
+
+ /* I'm invalidating this method because it causes an annoying
+ efect, the focus changes to the header view when selecting
+ a folder in the folder view because of this code and it
+ shouldn't. We need to find another way to set the passive
+ focus on it. Sergio. */
+ return FALSE;
+
+ model = gtk_tree_view_get_model(header_view);
+
+ sel = gtk_tree_view_get_selection(header_view);
+ if(!gtk_tree_selection_count_selected_rows(sel))
+ if (gtk_tree_model_get_iter_first(model, &tree_iter))
+ gtk_tree_selection_select_iter(sel, &tree_iter);
+
+ return FALSE;
+}
+