Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
collection.c File Reference
#include "common/collection.h"
#include "common/paths.h"
#include "control/settings.h"
#include "database/collection_query.h"
#include "metadata/colorlabels.h"
#include "common/image.h"
#include "imageio/imageio_core.h"
#include "develop/iop_order.h"
#include "metadata/metadata.h"
#include "common/utility.h"
#include "metadata/map_locations.h"
#include "common/datetime.h"
#include "common/selection.h"
#include "common/conf.h"
#include "control/control.h"
#include "views/view.h"
#include <assert.h>
#include <glib.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "gui/application.h"
+ Include dependency graph for collection.c:

Go to the source code of this file.

Macros

#define SELECT_QUERY   "SELECT DISTINCT * FROM %s"
 
#define LIMIT_QUERY   "LIMIT ?1, ?2"
 

Functions

static int dt_collection_image_offset_with_collection (const dt_collection_t *collection, int32_t imgid)
 
static int _resolve_iop_order_name (const char *text)
 
dt_collection_tdt_collection_get_global (void)
 
void dt_collection_init_global (void)
 
void dt_collection_cleanup_global (void)
 
dt_collection_tdt_collection_new ()
 
void dt_collection_free (const dt_collection_t *collection)
 
const dt_collection_params_tdt_collection_params (const dt_collection_t *collection)
 
int dt_collection_update (const dt_collection_t *collection)
 
void dt_collection_memory_update ()
 
GList * dt_collection_get (const dt_collection_t *collection, const uint32_t limit)
 
int32_t dt_collection_get_nth (const dt_collection_t *collection, const int nth)
 
void dt_pop_collection ()
 
void dt_push_collection ()
 
void dt_selection_to_culling_mode ()
 
uint32_t dt_collection_get_count (const dt_collection_t *collection)
 
void dt_collection_reset (const dt_collection_t *collection)
 
dt_collection_filter_flag_t dt_collection_get_filter_flags (const dt_collection_t *collection)
 
void dt_collection_set_filter_flags (const dt_collection_t *collection, dt_collection_filter_flag_t flags)
 
char * dt_collection_get_text_filter (const dt_collection_t *collection)
 
void dt_collection_set_text_filter (const dt_collection_t *collection, char *text_filter)
 
dt_collection_query_flags_t dt_collection_get_query_flags (const dt_collection_t *collection)
 
void dt_collection_set_query_flags (const dt_collection_t *collection, dt_collection_query_flags_t flags)
 
void dt_collection_set_rules (const dt_collection_t *collection, const dt_collection_rule_t *rules, const int n_rules)
 
void dt_collection_set_tag_id (dt_collection_t *collection, const uint32_t tagid)
 
void dt_collection_set_sort (const dt_collection_t *collection, dt_collection_sort_t sort, gboolean reverse)
 
dt_collection_sort_t dt_collection_get_sort_field (const dt_collection_t *collection)
 
gboolean dt_collection_get_sort_descending (const dt_collection_t *collection)
 
const char * dt_collection_name (dt_collection_properties_t prop)
 
GList * dt_collection_get_all (const dt_collection_t *collection, int limit)
 
void dt_collection_split_operator_number (const gchar *input, char **number1, char **number2, char **operator)
 
static char * _dt_collection_compute_datetime (const char *operator, const char *input)
 
void dt_collection_split_operator_datetime (const gchar *input, char **number1, char **number2, char **operator)
 
void dt_collection_split_operator_exposure (const gchar *input, char **number1, char **number2, char **operator)
 
void dt_collection_get_makermodels (const gchar *filter, GList **sanitized, GList **exif)
 
gchar * dt_collection_get_makermodel (const char *exif_maker, const char *exif_model)
 
GList * dt_collection_get_images_for_rule (const dt_collection_properties_t property, const char *text, gboolean recursive)
 
void dt_collection_name_value_free (gpointer value)
 
GList * dt_collection_get_property_values (const dt_collection_properties_t property, const int rule)
 
int dt_collection_serialize (char *buf, int bufsize)
 
void dt_collection_deserialize (const char *buf)
 
void dt_collection_set_recents_handler (dt_collection_recents_handler_t handler)
 
void dt_collection_update_query (const dt_collection_t *collection, dt_collection_change_t query_change, dt_collection_properties_t changed_property, GList *list)
 
void dt_culling_mode_to_selection ()
 
gboolean dt_collection_hint_message_internal (void *message)
 
void dt_collection_hint_message (const dt_collection_t *collection)
 
static void _dt_collection_change_view_after_import (const dt_view_t *current_view, dt_collection_import_view_t view_policy, const int32_t imgid)
 
static gboolean _collection_folder_ui_inactive (const dt_view_t *current_atelier)
 
gboolean dt_collection_get_browsed_folder (gchar *folder, size_t len, gboolean *recursive)
 
void dt_collection_notify_imported (const int32_t imgid, const gchar *known_image_folder, gint64 *last_refresh_us)
 
void dt_collection_load_filmroll (dt_collection_t *collection, const int32_t imgid, dt_collection_import_view_t view_policy, gboolean set_mouse_over)
 

Variables

static const char * _order_names [DT_IOP_ORDER_LAST]
 
static dt_collection_t_collection_global = NULL
 
static dt_collection_recents_handler_t _recents_handler = NULL
 

Macro Definition Documentation

◆ LIMIT_QUERY

#define LIMIT_QUERY   "LIMIT ?1, ?2"

Definition at line 104 of file collection.c.

◆ SELECT_QUERY

#define SELECT_QUERY   "SELECT DISTINCT * FROM %s"

Definition at line 103 of file collection.c.

Function Documentation

◆ _collection_folder_ui_inactive()

static gboolean _collection_folder_ui_inactive ( const dt_view_t current_atelier)
inlinestatic

Definition at line 982 of file collection.c.

References dt_conf_get_int(), and dt_view_t::module_name.

Referenced by dt_collection_get_browsed_folder().

◆ _dt_collection_change_view_after_import()

static void _dt_collection_change_view_after_import ( const dt_view_t current_view,
dt_collection_import_view_t  view_policy,
const int32_t  imgid 
)
inlinestatic

◆ _dt_collection_compute_datetime()

static char * _dt_collection_compute_datetime ( const char *  operator,
const char *  input 
)
static

◆ _resolve_iop_order_name()

static int _resolve_iop_order_name ( const char *  text)
static

Definition at line 113 of file collection.c.

References DT_IOP_ORDER_LAST, dt_iop_order_string(), and i.

Referenced by dt_collection_new().

◆ dt_collection_cleanup_global()

void dt_collection_cleanup_global ( void  )

frees the application-wide collection.

Definition at line 148 of file collection.c.

References _collection_global, and dt_collection_free().

Referenced by dt_cleanup().

◆ dt_collection_deserialize()

◆ dt_collection_free()

◆ dt_collection_get()

GList * dt_collection_get ( const dt_collection_t collection,
const uint32_t  limit 
)

Definition at line 231 of file collection.c.

References dt_collection_query_get_images().

Referenced by dt_collection_get_all().

◆ dt_collection_get_all()

GList * dt_collection_get_all ( const dt_collection_t collection,
int  limit 
)

get all image ids order as current selection. no more than limit many images are returned, <0 == unlimited

Definition at line 442 of file collection.c.

References dt_collection_get().

Referenced by _jpg_combobox_changed(), _switch_to_next_picture(), and _switch_to_prev_picture().

◆ dt_collection_get_browsed_folder()

gboolean dt_collection_get_browsed_folder ( gchar *  folder,
size_t  len,
gboolean *  recursive 
)

If lighttable/Studio Capture is currently browsing a single folder or film-roll (Collect module on the "Folders" tab), copy its path into folder (up to len bytes), set *recursive to whether sub-folders are included (always FALSE for a film-roll: only the Tree/FOLDERS view supports recursion), and return TRUE. Otherwise leave both outputs untouched and return FALSE.

Definition at line 1002 of file collection.c.

References _collection_folder_ui_inactive(), DT_COLLECTION_PROP_FOLDERS, dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string(), dt_free, dt_view_manager_get_current_view(), dt_view_manager_get_global(), FALSE, and folder.

Referenced by dt_collection_notify_imported().

◆ dt_collection_get_count()

uint32_t dt_collection_get_count ( const dt_collection_t collection)

◆ dt_collection_get_filter_flags()

◆ dt_collection_get_global()

dt_collection_t * dt_collection_get_global ( void  )

instantiates a collection context

Definition at line 138 of file collection.c.

References _collection_global.

Referenced by _adopt_tag_order(), _altered_clicked(), _colorlabel_clicked(), _commit_colllection(), _control_import_job_run(), _culling_mode(), _drop_move_to_folder(), _dt_collection_changed_callback(), _dt_collection_get_hash(), _film_import1(), _generic_dt_control_fileop_images_job_run(), _history_style_apply(), _image_duplicate_with_version(), _jpg_combobox_changed(), _lib_duplicate_delete(), _lib_filter_reverse_button_changed(), _lib_filter_set_tag_order(), _lib_filter_sort_combobox_changed(), _lib_filter_update_query(), _pop_undo(), _pop_undo(), _pop_undo(), _rating_clicked(), _refresh_collection_callback(), _reset_text_entry(), _reset_text_filter(), _select_all_callback(), _select_none_callback(), _switch_to_next_picture(), _switch_to_prev_picture(), _text_entry_changed_wait(), _unaltered_clicked(), _update_altered_filters(), _update_colors_filter(), _update_gui(), _update_rating_filter(), collapse_grouped_callback(), dt_collection_deserialize(), dt_collection_memory_update(), dt_collection_notify_imported(), dt_collection_query_refresh_memory_table(), dt_collection_update(), dt_colorlabels_toggle_label_on_list(), dt_control_delete_images_job_run(), dt_control_duplicate_images_job_run(), dt_control_local_copy_images_job_run(), dt_control_merge_hdr_job_run(), dt_control_monochrome_images_job_run(), dt_control_refresh_exif_run(), dt_control_remove_images_job_run(), dt_film_set_query(), dt_grouping_add_grouped_images(), dt_image_copy_rename(), dt_image_read_duplicates(), dt_iop_request_focus(), dt_ratings_apply_on_list(), enter(), geotag_changed(), group_images_callback(), gui_cleanup(), gui_focus(), gui_focus(), gui_init(), gui_reset(), metadata_changed(), preferences_changed(), select_all_sensitive_callback(), tag_changed(), try_enter(), and ungroup_images_callback().

◆ dt_collection_get_images_for_rule()

GList * dt_collection_get_images_for_rule ( const dt_collection_properties_t  property,
const char *  text,
gboolean  recursive 
)

get the list of image ids matching a single (property, text, recursive) rule, independently of the currently active collection. recursive only matters for DT_COLLECTION_PROP_FOLDERS. Returns a GList of imgids (GINT_TO_POINTER), caller frees with g_list_free. Used by the library module to feed batch/background operations.

Definition at line 667 of file collection.c.

References dt_collection_query_get_images_for_rule().

Referenced by _rows_to_imgids().

◆ dt_collection_get_makermodel()

gchar * dt_collection_get_makermodel ( const char *  exif_maker,
const char *  exif_model 
)

get the sanitized makermodel for exif maker/model

Definition at line 651 of file collection.c.

References dt_imageio_lookup_makermodel(), maker, and model.

Referenced by dt_collection_query_get_makermodels(), and dt_collection_query_get_property_values().

◆ dt_collection_get_makermodels()

void dt_collection_get_makermodels ( const gchar *  filter,
GList **  sanitized,
GList **  exif 
)

get the filtered map between sanitized makermodel and exif maker/model

Definition at line 646 of file collection.c.

References dt_collection_query_get_makermodels().

Referenced by get_query_string().

◆ dt_collection_get_nth()

int32_t dt_collection_get_nth ( const dt_collection_t collection,
int  nth 
)

get the nth image in the query

Definition at line 236 of file collection.c.

References dt_collection_query_get_nth().

◆ dt_collection_get_property_values()

GList * dt_collection_get_property_values ( const dt_collection_properties_t  property,
const int  rule 
)

Enumerate the distinct values of a collection property for the library module, honouring all the other active rules through the extended-where of rule rule. The library module then turns these into a flat list or a hierarchical tree. Returns a GList of dt_collection_name_value_t*, free with g_list_free_full(list, dt_collection_name_value_free).

Definition at line 682 of file collection.c.

References DT_COLLECTION_PROP_METADATA, dt_collection_query_get_property_values(), dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string_const(), DT_METADATA_FLAG_HIDDEN, dt_metadata_get_keyid_by_display_order(), dt_metadata_get_name(), DT_METADATA_NUMBER, FALSE, name, and dt_collection_values_request_t::property.

Referenced by _collect_sorted_tree_names(), and _populate_list().

◆ dt_collection_get_query_flags()

dt_collection_query_flags_t dt_collection_get_query_flags ( const dt_collection_t collection)

get filter flags for collection

Definition at line 324 of file collection.c.

References COLLECTION_QUERY_FULL, IS_NULL_PTR, dt_collection_t::params, and dt_collection_params_t::query_flags.

Referenced by dt_collection_update_query().

◆ dt_collection_get_sort_descending()

gboolean dt_collection_get_sort_descending ( const dt_collection_t collection)

get if the collection must be shown in descending order

Definition at line 384 of file collection.c.

References dt_collection_params_t::descending, FALSE, IS_NULL_PTR, and dt_collection_t::params.

Referenced by gui_init().

◆ dt_collection_get_sort_field()

dt_collection_sort_t dt_collection_get_sort_field ( const dt_collection_t collection)

get the sort field used

Definition at line 378 of file collection.c.

References DT_COLLECTION_SORT_NONE, IS_NULL_PTR, dt_collection_t::params, and dt_collection_params_t::sort.

Referenced by gui_init().

◆ dt_collection_get_text_filter()

char * dt_collection_get_text_filter ( const dt_collection_t collection)

get text filter for collection

Definition at line 310 of file collection.c.

References IS_NULL_PTR, dt_collection_t::params, and dt_collection_params_t::text_filter.

Referenced by _text_entry_changed_wait(), and gui_init().

◆ dt_collection_hint_message()

◆ dt_collection_hint_message_internal()

gboolean dt_collection_hint_message_internal ( void message)

Definition at line 905 of file collection.c.

References dt_control_get_global(), dt_control_hinter_message(), dt_free, and FALSE.

Referenced by dt_collection_hint_message().

◆ dt_collection_image_offset_with_collection()

static int dt_collection_image_offset_with_collection ( const dt_collection_t collection,
int32_t  imgid 
)
static

Definition at line 241 of file collection.c.

References dt_collection_query_image_offset().

Referenced by dt_collection_hint_message().

◆ dt_collection_init_global()

void dt_collection_init_global ( void  )

creates the application-wide collection. Called by the GUI bootstrap only.

Definition at line 143 of file collection.c.

References _collection_global, dt_collection_new(), and IS_NULL_PTR.

Referenced by dt_gui_gtk_init().

◆ dt_collection_load_filmroll()

void dt_collection_load_filmroll ( dt_collection_t collection,
const int32_t  imgid,
dt_collection_import_view_t  view_policy,
gboolean  set_mouse_over 
)

load a filmroll-based collection from an imgid, and make that image visible to the user as far as view_policy allows.

Parameters
collectionthe collection to re-point and re-query.
imgidthe imported image the library should follow. Typically the FIRST image of an import job: its folder is the one the Collect module's rule 0 is pointed at.
view_policywhat this import may do to what the user is currently looking at. It also governs the folder-following, the hovered image and the selection: under DT_COLLECTION_IMPORT_VIEW_KEEP none of them is touched outside Studio Capture's own atelier, which tracks its captures itself.
set_mouse_overwhether dt_control_set_mouse_over_id(imgid) is (re-)applied here: pass FALSE when the caller already pointed mouse_over_id at imgid earlier and does not want it forced back onto imgid here, clobbering whatever the user may be hovering by the time this runs. Ignored under KEEP.

Definition at line 1090 of file collection.c.

References _dt_collection_change_view_after_import(), DT_COLLECTION_CHANGE_NEW_QUERY, DT_COLLECTION_IMPORT_VIEW_KEEP, DT_COLLECTION_PROP_FILMROLL, dt_collection_update_query(), dt_conf_get_int(), dt_conf_set_int(), dt_conf_set_string(), dt_control_set_mouse_over_id(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_get_dirname_from_imgid(), DT_PATH_MAX, dt_selection_get_global(), dt_selection_select(), DT_SIGNAL_TAG_CHANGED, dt_util_dir_exist(), dt_view_manager_get_current_view(), dt_view_manager_get_global(), IS_NULL_PTR, dt_view_t::module_name, and UNKNOWN_IMAGE.

Referenced by _control_import_job_run(), and _film_import1().

◆ dt_collection_memory_update()

◆ dt_collection_name()

◆ dt_collection_name_value_free()

void dt_collection_name_value_free ( gpointer  value)

Definition at line 673 of file collection.c.

References v, and value.

Referenced by _collect_sorted_tree_names(), and _populate_list().

◆ dt_collection_new()

◆ dt_collection_notify_imported()

void dt_collection_notify_imported ( const int32_t  imgid,
const gchar *  known_image_folder,
gint64 *  last_refresh_us 
)

Shared notifier for import jobs that process images one at a time, throttled to at most once every 250ms via *last_refresh_us (caller-owned state, zero-initialized before the import loop starts). Re-reads dt_collection_get_browsed_folder() itself on every throttle-admitted call (so at most 4/s, not once per whole import job) rather than trusting a snapshot the caller took before the loop started: the user can change which folder is browsed while a long import is still running, and a stale snapshot would keep comparing against wherever they were looking when the job began.

known_image_folder is an optional optimization: pass imgid's folder if the caller already has it at hand (e.g. film_jobs.c's import loop, which never copies files, already knows it from the film-roll it just inserted into) to skip re-deriving it here. Pass NULL to have it resolved fresh via dt_get_dirname_from_imgid() – necessary whenever the caller can't otherwise know the final path, e.g. import_jobs.c's copy mode, which writes to a pattern-generated destination.

If imgid's folder matches the browsed folder exactly, or falls under it and sub-folders are included, this does a real dt_collection_update_query(), so the grid gains the new image – or no folder is being browsed at all, meaning relevance can't be determined, which takes the same real-update path. Otherwise it raises DT_SIGNAL_COLLECTION_CHANGED directly, without re-querying/rebuilding memory.collected_images: listeners that keep their own counts independently of it (e.g. the Collect module's tag/camera/lens lists) still refresh, while the center view – keyed off the query generation and memory.collected_images's row count, both left untouched on this path – does not needlessly reload thumbnails.

Either way the signal is labeled DT_COLLECTION_CHANGE_BACKGROUND_SYNC: a background import heartbeat should never steal scroll/focus or reset grid/zoom preferences, whether or not it touches what's on screen. Listeners that guard exactly that off query_change (thumbtable.c's own collection-changed callback, libs/tools/lighttable.c's) recognize it as "not a real [navigational] change" and skip just that side effect, not the parts driven by their own hash/state.

Definition at line 1023 of file collection.c.

References DT_COLLECTION_CHANGE_BACKGROUND_SYNC, dt_collection_get_browsed_folder(), dt_collection_get_global(), DT_COLLECTION_PROP_UNDEF, dt_collection_update_query(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_get_dirname_from_imgid(), DT_PATH_MAX, DT_SIGNAL_COLLECTION_CHANGED, FALSE, and TRUE.

Referenced by _control_import_job_run(), and _film_import1().

◆ dt_collection_params()

const dt_collection_params_t * dt_collection_params ( const dt_collection_t collection)

fetch params for collection for storing.

Definition at line 185 of file collection.c.

References IS_NULL_PTR, and dt_collection_t::params.

◆ dt_collection_reset()

◆ dt_collection_serialize()

int dt_collection_serialize ( char *  buf,
int  bufsize 
)

◆ dt_collection_set_filter_flags()

void dt_collection_set_filter_flags ( const dt_collection_t collection,
dt_collection_filter_flag_t  flags 
)

◆ dt_collection_set_query_flags()

void dt_collection_set_query_flags ( const dt_collection_t collection,
dt_collection_query_flags_t  flags 
)

set filter flags for collection

Definition at line 330 of file collection.c.

References flags, IS_NULL_PTR, and dt_collection_t::params.

Referenced by _lib_filter_update_query(), dt_collection_update_query(), and gui_reset().

◆ dt_collection_set_recents_handler()

void dt_collection_set_recents_handler ( dt_collection_recents_handler_t  handler)

Install the handler that records the current collection as recently used. NULL removes it.

Definition at line 831 of file collection.c.

References _recents_handler.

Referenced by dt_collection_gui_register_handlers().

◆ dt_collection_set_rules()

void dt_collection_set_rules ( const dt_collection_t collection,
const dt_collection_rule_t rules,
const int  n_rules 
)

gets an extended where part sets an extended where part Replace the collection's rules and rebuild its query.

Definition at line 337 of file collection.c.

References dt_collection_update(), dt_free, i, IS_NULL_PTR, MAX, t, and dt_collection_rule_t::text.

Referenced by dt_collection_update_query().

◆ dt_collection_set_sort()

void dt_collection_set_sort ( const dt_collection_t collection,
dt_collection_sort_t  sort,
gboolean  reverse 
)

◆ dt_collection_set_tag_id()

void dt_collection_set_tag_id ( dt_collection_t collection,
const uint32_t  tagid 
)

set the tagid of collection

Definition at line 361 of file collection.c.

References IS_NULL_PTR, and dt_collection_t::tagid.

Referenced by _adopt_tag_order().

◆ dt_collection_set_text_filter()

void dt_collection_set_text_filter ( const dt_collection_t collection,
char *  text_filter 
)

set text filter for collection

Definition at line 316 of file collection.c.

References dt_free, IS_NULL_PTR, and dt_collection_t::params.

Referenced by _reset_text_filter(), _text_entry_changed_wait(), and gui_cleanup().

◆ dt_collection_split_operator_datetime()

void dt_collection_split_operator_datetime ( const gchar *  input,
char **  number1,
char **  number2,
char **  operator 
)

Definition at line 523 of file collection.c.

References _dt_collection_compute_datetime(), dt_free, dt_util_dstrcat(), and IS_NULL_PTR.

Referenced by get_query_string().

◆ dt_collection_split_operator_exposure()

void dt_collection_split_operator_exposure ( const gchar *  input,
char **  number1,
char **  number2,
char **  operator 
)

Definition at line 584 of file collection.c.

References dt_free.

Referenced by get_query_string().

◆ dt_collection_split_operator_number()

void dt_collection_split_operator_number ( const gchar *  input,
char **  number1,
char **  number2,
char **  operator 
)

Definition at line 455 of file collection.c.

References dt_free.

Referenced by get_query_string(), and list_match_string().

◆ dt_collection_update()

◆ dt_collection_update_query()

void dt_collection_update_query ( const dt_collection_t collection,
dt_collection_change_t  query_change,
dt_collection_properties_t  changed_property,
GList *  list 
)

update query by conf vars

Definition at line 837 of file collection.c.

References _recents_handler, COLLECTION_QUERY_USE_WHERE_EXT, dt_collection_get_query_flags(), dt_collection_memory_update(), dt_collection_query_find_neighbour(), dt_collection_set_query_flags(), dt_collection_set_rules(), dt_collection_update(), dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_free, DT_SIGNAL_COLLECTION_CHANGED, i, IS_NULL_PTR, dt_collection_rule_t::mode, dt_collection_rule_t::property, dt_collection_rule_t::recursive, and dt_collection_rule_t::text.

Referenced by _commit_colllection(), _control_import_job_run(), _culling_mode(), _drop_move_to_folder(), _film_import1(), _generic_dt_control_fileop_images_job_run(), _history_style_apply(), _image_duplicate_with_version(), _lib_duplicate_delete(), _lib_filter_update_query(), _pop_undo(), _refresh_collection_callback(), _reset_text_entry(), collapse_grouped_callback(), dt_collection_deserialize(), dt_collection_load_filmroll(), dt_collection_notify_imported(), dt_collection_reset(), dt_control_delete_images_job_run(), dt_control_duplicate_images_job_run(), dt_control_local_copy_images_job_run(), dt_control_merge_hdr_job_run(), dt_control_monochrome_images_job_run(), dt_control_refresh_exif_run(), dt_control_remove_images_job_run(), dt_film_set_query(), dt_image_copy_rename(), dt_image_read_duplicates(), enter(), geotag_changed(), group_images_callback(), metadata_changed(), preferences_changed(), tag_changed(), and ungroup_images_callback().

◆ dt_culling_mode_to_selection()

void dt_culling_mode_to_selection ( )

restore initial collection and selection when exiting culling mode

Definition at line 897 of file collection.c.

References dt_pop_collection(), dt_selection_get_global(), and dt_selection_pop().

Referenced by _culling_mode(), dt_cleanup(), and dt_collection_memory_update().

◆ dt_pop_collection()

void dt_pop_collection ( )

Definition at line 246 of file collection.c.

References dt_collection_query_pop().

Referenced by dt_culling_mode_to_selection().

◆ dt_push_collection()

void dt_push_collection ( )

Definition at line 251 of file collection.c.

References dt_collection_query_push().

Referenced by dt_selection_to_culling_mode().

◆ dt_selection_to_culling_mode()

void dt_selection_to_culling_mode ( )

restrict the collection to selected pictures

Definition at line 256 of file collection.c.

References dt_collection_query_restrict_to_selection(), dt_push_collection(), dt_selection_clear(), dt_selection_get_global(), and dt_selection_push().

Referenced by dt_collection_memory_update().

Variable Documentation

◆ _collection_global

dt_collection_t* _collection_global = NULL
static

◆ _order_names

const char* _order_names[DT_IOP_ORDER_LAST]
static

The module-order names, in the order their versions are stored. Built once: gettext owns the strings, so the array can be handed over and borrowed.

Definition at line 122 of file collection.c.

Referenced by dt_collection_new().

◆ _recents_handler

dt_collection_recents_handler_t _recents_handler = NULL
static

Definition at line 829 of file collection.c.

Referenced by dt_collection_set_recents_handler(), and dt_collection_update_query().