Skip to content

Commit

Permalink
removed code for maintaining filelist position, gtk_tree_view itself …
Browse files Browse the repository at this point in the history
…handles it

better
  • Loading branch information
nadvornik committed Aug 17, 2008
1 parent 951b625 commit e1a9ff9
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/view_file_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,8 +1633,6 @@ static void vflist_populate_view(ViewFile *vf)
{
GtkTreeStore *store;
gint thumbs;
GtkTreeRowReference *visible_row = NULL;
GtkTreePath *tpath;
GList *selected;

store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview)));
Expand All @@ -1649,13 +1647,6 @@ static void vflist_populate_view(ViewFile *vf)
return;
}

if (GTK_WIDGET_REALIZED(vf->listview) &&
gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(vf->listview), 0, 0, &tpath, NULL, NULL, NULL))
{
visible_row = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), tpath);
gtk_tree_path_free(tpath);
}

vflist_listview_set_columns(vf->listview, thumbs);

selected = vflist_selection_get_list(vf);
Expand All @@ -1670,17 +1661,6 @@ static void vflist_populate_view(ViewFile *vf)

filelist_free(selected);

if (visible_row)
{
if (gtk_tree_row_reference_valid(visible_row))
{
tpath = gtk_tree_row_reference_get_path(visible_row);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(vf->listview), tpath, NULL, TRUE, 0.0, 0.0);
gtk_tree_path_free(tpath);
}
gtk_tree_row_reference_free(visible_row);
}

vf_send_update(vf);
vflist_thumb_update(vf);
}
Expand Down

0 comments on commit e1a9ff9

Please sign in to comment.