diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-22 08:47:30 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-22 08:47:30 +0000 |
commit | 39a1d4cf0bd2ae39c2300b12f9c826514acd560e (patch) | |
tree | 7a998a377493ad15ee9ac478d19b056535ec3a5f /src/summaryview.c | |
parent | ab756417b394ba20a43b6836db5e01469584df23 (diff) |
summaryview.c: align selected row to center when reached to the edge on key operation.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@600 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/summaryview.c')
-rw-r--r-- | src/summaryview.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/summaryview.c b/src/summaryview.c index 01e2b409..d2372398 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -789,6 +789,7 @@ void summary_clear_list(SummaryView *summaryview) } summaryview->filtered = 0; + summaryview->on_button_press = FALSE; summaryview->can_toggle_selection = TRUE; summaryview->on_drag = FALSE; if (summaryview->pressed_path) { @@ -1288,7 +1289,8 @@ void summary_select_row(SummaryView *summaryview, GtkTreeIter *iter, path, NULL, TRUE, 0.5, 0.0); } else { gtkut_tree_view_scroll_to_cell - (GTK_TREE_VIEW(summaryview->treeview), path); + (GTK_TREE_VIEW(summaryview->treeview), path, + !summaryview->on_button_press); } gtk_tree_path_free(path); @@ -1310,7 +1312,8 @@ static void summary_scroll_to_selected(SummaryView *summaryview, path, NULL, TRUE, 0.5, 0.0); else gtkut_tree_view_scroll_to_cell - (GTK_TREE_VIEW(summaryview->treeview), path); + (GTK_TREE_VIEW(summaryview->treeview), path, + FALSE); gtk_tree_path_free(path); } } @@ -2230,7 +2233,8 @@ static void summary_display_msg_full(SummaryView *summaryview, (GTK_NOTEBOOK(msgview->notebook)) == 0))) gtk_widget_grab_focus(summaryview->treeview); gtkut_tree_view_scroll_to_cell - (GTK_TREE_VIEW(summaryview->treeview), path); + (GTK_TREE_VIEW(summaryview->treeview), path, + !summaryview->on_button_press); gtk_tree_path_free(path); } @@ -4540,6 +4544,8 @@ static gboolean summary_button_pressed(GtkWidget *treeview, } if (event->button == 1) { + summaryview->on_button_press = TRUE; + if (summary_get_selection_type(summaryview) == SUMMARY_SELECTED_MULTIPLE && is_selected && !mod_pressed) { @@ -4588,6 +4594,7 @@ static gboolean summary_button_released(GtkWidget *treeview, NULL, FALSE); } + summaryview->on_button_press = FALSE; summaryview->can_toggle_selection = TRUE; summaryview->on_drag = FALSE; if (summaryview->pressed_path) { |