aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-09-07 15:51:47 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-09-07 15:51:47 +0800
commite0965ab239c03af7a2bec82b1d39bb5f085e6e23 (patch)
tree946eee9f7cb4090de265afd449d3dc8e9bf8fe62 /mail/em-folder-tree.c
parent9841d5bfd279d7f8540f2035fb0fa5b6eddb4138 (diff)
downloadgsoc2013-evolution-e0965ab239c03af7a2bec82b1d39bb5f085e6e23.tar.gz
gsoc2013-evolution-e0965ab239c03af7a2bec82b1d39bb5f085e6e23.tar.zst
gsoc2013-evolution-e0965ab239c03af7a2bec82b1d39bb5f085e6e23.zip
2007-09-07 mcrha Fix for bug #473903
svn path=/trunk/; revision=34192
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index a3d6199790..fa0955a832 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2378,21 +2378,15 @@ get_last_child (GtkTreeModel *model, GtkTreeIter *iter)
gboolean has_child = gtk_tree_model_iter_has_child (model, iter);
if (gtk_tree_model_iter_next (model, iter)) {
- get_last_child (model, iter);
- } else {
-
- if (has_child) {
- /* Pick the last one */
- int nchildren = gtk_tree_model_iter_n_children (model, iter);
- gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1);
- get_last_child (model, child);
- }
- else {
- return *iter;
- }
-
+ return get_last_child (model, iter);
+ } else if (has_child) {
+ /* Pick the last one */
+ int nchildren = gtk_tree_model_iter_n_children (model, iter);
+ gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1);
+ return get_last_child (model, child);
}
-//TODO : The function should return the value here !!
+
+ return *iter;
}
void
@@ -2401,7 +2395,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter, child;
- GtkTreePath *path, *current_path = NULL;
+ GtkTreePath *path = NULL, *current_path = NULL;
unsigned int unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;