Mercurial > geeqie
comparison src/filedata.c @ 964:ba1d3c4bc0cd
implemented marks filter
author | nadvornik |
---|---|
date | Sat, 16 Aug 2008 20:34:14 +0000 |
parents | d7cb8d5714d1 |
children | cbdabb499684 |
comparison
equal
deleted
inserted
replaced
963:323dab9321bb | 964:ba1d3c4bc0cd |
---|---|
1066 fd->marks = fd->marks ^ (1 << n); | 1066 fd->marks = fd->marks ^ (1 << n); |
1067 file_data_increment_version(fd); | 1067 file_data_increment_version(fd); |
1068 file_data_send_notification(fd, NOTIFY_TYPE_INTERNAL); | 1068 file_data_send_notification(fd, NOTIFY_TYPE_INTERNAL); |
1069 } | 1069 } |
1070 | 1070 |
1071 gboolean file_data_filter_marks(FileData *fd, guint filter) | |
1072 { | |
1073 return ((fd->marks & filter) == filter); | |
1074 } | |
1075 | |
1076 GList *file_data_filter_marks_list(GList *list, guint filter) | |
1077 { | |
1078 GList *work; | |
1079 | |
1080 work = list; | |
1081 while (work) | |
1082 { | |
1083 FileData *fd = work->data; | |
1084 GList *link = work; | |
1085 work = work->next; | |
1086 | |
1087 if (!file_data_filter_marks(fd, filter)) | |
1088 { | |
1089 list = g_list_remove_link(list, link); | |
1090 file_data_unref(fd); | |
1091 g_list_free(link); | |
1092 } | |
1093 } | |
1094 | |
1095 return list; | |
1096 } | |
1097 | |
1071 gint file_data_get_user_orientation(FileData *fd) | 1098 gint file_data_get_user_orientation(FileData *fd) |
1072 { | 1099 { |
1073 return fd->user_orientation; | 1100 return fd->user_orientation; |
1074 } | 1101 } |
1075 | 1102 |