41 const int img_group_id = img->
group_id;
60 int new_group_id = -1;
65 const int img_group_id = img->
group_id;
67 if(img_group_id == image_id)
71 for(GList *o = others; o; o = g_list_next(o))
73 const int other_id = GPOINTER_TO_INT(o->data);
74 if(new_group_id == -1) new_group_id = other_id;
78 imgs = g_list_prepend(imgs, GINT_TO_POINTER(other_id));
82 if(new_group_id != -1)
99 imgs = g_list_prepend(imgs, GINT_TO_POINTER(image_id));
101 imgs = g_list_prepend(imgs, GINT_TO_POINTER(img_group_id));
116 for(GList *
m = members;
m;
m = g_list_next(
m))
118 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);
136 const int img_group_id = image->
group_id;
140 for(GList *
m = members;
m;
m = g_list_next(
m))
141 imgs = g_list_prepend(imgs,
m->data);
142 g_list_free(members);
144 return g_list_reverse(imgs);
152 for(GList *imgs = *images; imgs; imgs = g_list_next(imgs))
157 const int img_group_id = image->
group_id;
162 GPOINTER_TO_INT(imgs->data));
163 for(GList *
m = members;
m;
m = g_list_next(
m))
164 gimgs = g_list_prepend(gimgs,
m->data);
165 g_list_free(members);
171 *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)
int32_t dt_grouping_get_image_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...