From 769869254d13ef0a85c9dc1177e95f1c08ae733c Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Fri, 25 Apr 2008 15:33:32 +0000 Subject: [PATCH] * src/maemo/modest-main-window.c: * Fix the cursor position on activating from header view, if the cursor was in a deleted row (fixes NB#81429). pmo-trunk-r4483 --- src/maemo/modest-main-window.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index f3890e6..816a280 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -1678,6 +1678,20 @@ on_inner_widgets_key_pressed (GtkWidget *widget, if (selected_headers > 1) { hildon_banner_show_information (NULL, NULL, _("mcen_ib_select_one_message")); return TRUE; + } else { + GtkTreePath * cursor_path; + gtk_tree_view_get_cursor (GTK_TREE_VIEW (widget), &cursor_path, NULL); + if (cursor_path == NULL) { + GtkTreeSelection *selection; + GList *list; + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)); + list = gtk_tree_selection_get_selected_rows (selection, NULL); + + if (list != NULL) + gtk_tree_view_set_cursor (GTK_TREE_VIEW (widget), (GtkTreePath *) list->data, NULL, FALSE); + g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); + g_list_free (list); + } } } } else if (MODEST_IS_FOLDER_VIEW (widget) && event->keyval == GDK_Right) -- 1.7.9.5