comparison src/view_dir_list.c @ 1628:66bf394d162a

simplified the code around vd_select_row
author nadvornik
date Fri, 05 Jun 2009 21:52:37 +0000
parents 626adbb26387
children 763c254bc57a
comparison
equal deleted inserted replaced
1627:1a134b4dc88c 1628:66bf394d162a
115 *----------------------------------------------------------------------------- 115 *-----------------------------------------------------------------------------
116 * main 116 * main
117 *----------------------------------------------------------------------------- 117 *-----------------------------------------------------------------------------
118 */ 118 */
119 119
120 void vdlist_select_row(ViewDir *vd, FileData *fd)
121 {
122 if (fd && vd->select_func)
123 {
124 gchar *path;
125
126 path = g_strdup(fd->path);
127 vd->select_func(vd, path, vd->select_data);
128 g_free(path);
129 }
130 }
131
132 const gchar *vdlist_row_get_path(ViewDir *vd, gint row) 120 const gchar *vdlist_row_get_path(ViewDir *vd, gint row)
133 { 121 {
134 FileData *fd; 122 FileData *fd;
135 123
136 fd = g_list_nth_data(VDLIST(vd)->list, row); 124 fd = g_list_nth_data(VDLIST(vd)->list, row);