54 int new_group_id = -1;
59 const int img_group_id = img->
group_id;
61 if(img_group_id == image_id)
65 for(GList *
o = others;
o;
o = g_list_next(
o))
67 const int other_id = GPOINTER_TO_INT(
o->data);
71 if(new_group_id == -1) new_group_id = other_id;
74 imgs = g_list_prepend(imgs, GINT_TO_POINTER(other_id));
78 if(new_group_id != -1)
96 imgs = g_list_prepend(imgs, GINT_TO_POINTER(image_id));
98 imgs = g_list_prepend(imgs, GINT_TO_POINTER(img_group_id));
114 for(GList *
m = members;
m;
m = g_list_next(
m))
116 const int other_id = GPOINTER_TO_INT(
m->data);
122 imgs = g_list_prepend(imgs, GINT_TO_POINTER(other_id));
124 g_list_free(members);
137 const int img_group_id = image->
group_id;
141 for(GList *
m = members;
m;
m = g_list_next(
m))
142 imgs = g_list_prepend(imgs,
m->data);
143 g_list_free(members);
145 return g_list_reverse(imgs);
153 for(GList *imgs = *images; imgs; imgs = g_list_next(imgs))
158 const int img_group_id = image->
group_id;
163 GPOINTER_TO_INT(imgs->data));
164 for(GList *
m = members;
m;
m = g_list_next(
m))
165 gimgs = g_list_prepend(gimgs,
m->data);
166 g_list_free(members);
172 *images = g_list_concat(*images, g_list_reverse(gimgs));
dt_collection_t * dt_collection_get_global(void)
GList * dt_collection_query_get_group_members(const int32_t group_id, const int32_t exclude_imgid)
int dt_grouping_change_representative(const int32_t image_id)
int dt_grouping_remove_from_group(const int32_t image_id)
void dt_grouping_add_grouped_images(GList **images)
void dt_grouping_add_to_group(const int32_t group_id, const int32_t image_id)
GList * dt_grouping_get_group_images(const int32_t imgid)
void dt_image_cache_write_release(dt_image_t *img, dt_image_cache_write_mode_t mode)
dt_image_t * dt_image_cache_get(const int32_t imgid, char mode)
void dt_image_cache_read_release(const dt_image_t *img)
void dt_image_repository_reassign_group(const int32_t from_group_id, const int32_t to_group_id, const int32_t exclude_imgid)
Move every member of from_group_id into to_group_id, except exclude_imgid.
GList * dt_image_repository_get_group_members(const int32_t group_id, const int32_t exclude_imgid)
Image ids in group group_id.
Reading and writing one dt_image_t to and from the library database. The SQL half of what used to be ...
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...