![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/history_actions.h"#include "history/notify.h"#include "common/collection.h"#include "common/xmp_sidecar.h"#include "history/history.h"#include "history/history_snapshot.h"#include "common/image.h"#include "caches/image_cache.h"#include "common/styles.h"#include "common/undo.h"#include "common/conf.h"#include "develop/dev_history.h"#include "develop/develop.h"#include "develop/imageop.h"
Include dependency graph for history_actions.c:Go to the source code of this file.
Data Structures | |
| struct | _paste_action_ctx_t |
| struct | dt_history_load_params_t |
| struct | dt_history_delete_params_t |
| struct | dt_history_style_params_t |
Variables | |
| static dt_history_copy_item_t | _copy_paste = { 0 } |
Definition at line 56 of file history_actions.c.
|
static |
Build a module list to copy based on selected history indices.
When ops is NULL, builds a list from the full history depending on copy_full.
| dev_src | Source develop context. |
| ops | Optional list of history indices (as GPOINTER_TO_UINT). |
| copy_full | Whether to include disabled/default items. |
Definition at line 91 of file history_actions.c.
References DT_DEBUG_HISTORY, DT_DEBUG_PARAMS, dt_dev_history_get_first_item_by_module(), dt_history_module_skip_copy(), dt_iop_is_hidden(), dt_print(), dt_develop_t::history, dt_develop_t::iop, L, and dt_dev_history_item_t::num.
Referenced by _history_copy_and_paste_on_image_merge().
Definition at line 48 of file history_actions.c.
References DT_HISTORY_CHANGE_TAGS, dt_history_changed(), and dt_history_changed_images().
Referenced by _history_action_on_list_with_undo().
|
static |
Definition at line 76 of file history_actions.c.
References _history_action_on_list_with_undo(), L, and TRUE.
Referenced by dt_history_compress_on_list(), dt_history_load_and_apply_on_list(), dt_history_paste_on_list(), dt_history_paste_parts_on_list(), and dt_history_style_on_list().
|
static |
Definition at line 58 of file history_actions.c.
References _history_action_finalize_list(), dt_undo_end_group(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_start_group(), FALSE, IS_NULL_PTR, and L.
Referenced by _history_action_on_list(), and dt_history_delete_on_list().
Definition at line 307 of file history_actions.c.
References DT_DEBUG_HISTORY, dt_dev_cleanup(), dt_dev_history_compress_or_truncate(), dt_dev_init(), dt_dev_reload_history_items(), dt_dev_write_history_ext(), dt_print(), FALSE, TRUE, and void().
Referenced by dt_history_compress_on_image(), and dt_history_compress_on_list().
|
static |
Copy/merge history between images using the merge pipeline.
Builds a source dev, resolves the module list, and dispatches to dt_history_merge().
| imgid | Source image id. |
| dest_imgid | Destination image id. |
| ops | Optional list of history indices to copy. |
| copy_full | Whether to copy the full history. |
| mode | Merge strategy. |
Definition at line 162 of file history_actions.c.
References _get_user_mod_list(), dt_conf_get_bool(), dt_dev_cleanup(), dt_dev_init(), dt_dev_merge_history_into_image(), dt_dev_reload_history_items(), dt_dev_replace_history_on_image(), DT_HISTORY_MERGE_REPLACE, FALSE, L, and TRUE.
Referenced by dt_history_copy_and_paste_on_image().
Definition at line 399 of file history_actions.c.
References dt_undo_lt_history_t::after, dt_undo_lt_history_t::after_history_end, dt_undo_lt_history_t::before, dt_undo_lt_history_t::before_history_end, dt_history_delete_on_image_ext(), dt_history_snapshot_item_init(), dt_history_snapshot_undo_create(), dt_history_snapshot_undo_lt_history_data_free(), dt_history_snapshot_undo_pop(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_record(), FALSE, dt_undo_lt_history_t::imgid, L, params, and TRUE.
Referenced by dt_history_delete_on_list().
Definition at line 339 of file history_actions.c.
References dt_undo_lt_history_t::after, dt_undo_lt_history_t::after_history_end, dt_undo_lt_history_t::before, dt_undo_lt_history_t::before_history_end, dt_exif_xmp_read(), dt_history_snapshot_item_init(), dt_history_snapshot_undo_create(), dt_history_snapshot_undo_lt_history_data_free(), dt_history_snapshot_undo_pop(), dt_image_cache_get(), DT_IMAGE_CACHE_RELAXED, DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), dt_image_history_changed(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_record(), FALSE, dt_undo_lt_history_t::imgid, IS_NULL_PTR, L, params, and TRUE.
Referenced by dt_history_load_and_apply(), and dt_history_load_and_apply_on_list().
Definition at line 241 of file history_actions.c.
References dt_conf_get_bool(), dt_conf_get_int(), dt_history_copy_and_paste_on_image(), dt_history_copy_paste_get(), FALSE, and L.
Referenced by dt_history_paste_on_image(), and dt_history_paste_on_list().
Definition at line 272 of file history_actions.c.
References dt_conf_get_bool(), dt_conf_get_int(), dt_history_copy_and_paste_on_image(), dt_history_copy_paste_get(), FALSE, IS_NULL_PTR, and L.
Referenced by dt_history_paste_parts_on_image(), and dt_history_paste_parts_on_list().
Definition at line 441 of file history_actions.c.
References dt_undo_lt_history_t::after, dt_undo_lt_history_t::after_history_end, dt_undo_lt_history_t::before, dt_undo_lt_history_t::before_history_end, DT_COLLECTION_CHANGE_RELOAD, dt_collection_get_global(), DT_COLLECTION_PROP_UNDEF, dt_collection_update_query(), dt_conf_get_bool(), dt_history_copy_and_paste_on_image(), dt_history_snapshot_item_init(), dt_history_snapshot_undo_create(), dt_history_snapshot_undo_lt_history_data_free(), dt_history_snapshot_undo_pop(), dt_image_duplicate_no_reload(), dt_styles_apply_to_image_merge(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_record(), FALSE, dt_undo_lt_history_t::imgid, IS_NULL_PTR, L, params, TRUE, and UNKNOWN_IMAGE.
Referenced by dt_history_style_on_image(), and dt_history_style_on_list().
Definition at line 322 of file history_actions.c.
References _history_compress_apply(), and L.
Referenced by compress_history_callback().
compress history stack
Definition at line 327 of file history_actions.c.
References _history_action_on_list(), _history_compress_apply(), and L.
Referenced by compress_history_callback().
| gboolean dt_history_copy | ( | int32_t | imgid | ) |
copy history from imgid and pasts on selected images, merge or overwrite...
Definition at line 224 of file history_actions.c.
References dt_history_copy_item_t::copied_imageid, dt_history_copy_paste_get(), FALSE, and TRUE.
Referenced by copy_callback(), and dt_history_copy_parts().
| gboolean dt_history_copy_and_paste_on_image | ( | const int32_t | imgid, |
| const int32_t | dest_imgid, | ||
| GList * | ops, | ||
| const gboolean | copy_full, | ||
| const dt_history_merge_strategy_t | mode, | ||
| const gboolean | copy_iop_order, | ||
| dt_hm_batch_state_t * | batch | ||
| ) |
Definition at line 198 of file history_actions.c.
References _history_copy_and_paste_on_image_merge(), dt_undo_lt_history_t::after, dt_undo_lt_history_t::after_history_end, dt_undo_lt_history_t::before, dt_undo_lt_history_t::before_history_end, dt_history_message(), dt_history_snapshot_item_init(), dt_history_snapshot_undo_create(), dt_history_snapshot_undo_lt_history_data_free(), dt_history_snapshot_undo_pop(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_record(), dt_undo_lt_history_t::imgid, L, and UNKNOWN_IMAGE.
Referenced by _history_paste_apply(), _history_paste_parts_apply(), _history_style_apply(), dt_control_duplicate_images_job_run(), and dt_image_copy_rename().
| dt_history_copy_item_t * dt_history_copy_paste_get | ( | void | ) |
The history clipboard: what "copy history" put there, for "paste" to read.
It used to be a dt_history_copy_item_t member of dt_view_manager_t, which made this file – the one that actually defines copy and paste – include views/view.h, layer 7, to reach its own state. The view manager never touched it. It is now file-static here, zero-initialised exactly as it was when the view manager was calloc'd, and handed out by this accessor.
Never NULL, and lives for the process. The GUI reaches it to drive the "paste parts" dialog, which is what items and selops are for.
Definition at line 43 of file history_actions.c.
References _copy_paste.
Referenced by _history_paste_apply(), _history_paste_parts_apply(), dt_history_copy(), dt_history_copy_parts(), dt_history_paste_on_list(), dt_history_paste_parts_on_list(), dt_history_paste_parts_prepare(), and paste_sensitive_callback().
delete historystack of selected images
Definition at line 426 of file history_actions.c.
References _history_action_on_list_with_undo(), _history_delete_apply(), and params.
Referenced by delete_history_callback().
| int dt_history_load_and_apply | ( | const int32_t | imgid, |
| gchar * | filename, | ||
| int | history_only | ||
| ) |
load a dt file and applies to specified image
Definition at line 376 of file history_actions.c.
References _history_load_and_apply_apply(), and params.
Referenced by dt_history_load_and_apply_on_image(), and load_xmp_on_image().
| int dt_history_load_and_apply_on_image | ( | int32_t | imgid, |
| gchar * | filename, | ||
| int | history_only | ||
| ) |
Definition at line 382 of file history_actions.c.
References dt_history_load_and_apply().
Referenced by sync_newest_to_oldest(), sync_oldest_to_newest(), and sync_xmp_to_db().
load a dt file and applies to selected images
Definition at line 387 of file history_actions.c.
References _history_action_on_list(), _history_load_and_apply_apply(), and params.
Referenced by load_xmp_callback().
| gboolean dt_history_paste_on_image | ( | const int32_t | imgid | ) |
Definition at line 258 of file history_actions.c.
References _history_paste_apply(), and L.
Definition at line 263 of file history_actions.c.
References _history_action_on_list(), _history_paste_apply(), dt_history_copy_paste_get(), dt_hm_batch_state_cleanup(), FALSE, and L.
Referenced by paste_all_callback().
| gboolean dt_history_paste_parts_on_image | ( | const int32_t | imgid | ) |
Definition at line 290 of file history_actions.c.
References _history_paste_parts_apply(), and L.
Definition at line 295 of file history_actions.c.
References _history_action_on_list(), _history_paste_parts_apply(), dt_history_copy_paste_get(), dt_hm_batch_state_cleanup(), FALSE, IS_NULL_PTR, and L.
Referenced by paste_parts_callback().
| gboolean dt_history_style_on_image | ( | const int32_t | imgid, |
| const char * | name, | ||
| const gboolean | duplicate | ||
| ) |
Definition at line 480 of file history_actions.c.
References _history_style_apply(), dt_conf_get_int(), dt_hm_batch_state_cleanup(), DT_HM_BATCH_UNDECIDED, dt_styles_get_id_by_name(), FALSE, IS_NULL_PTR, name, and params.
Referenced by _styles_apply_callback(), dt_multiple_styles_apply_to_list(), and dt_styles_apply_to_image().
| gboolean dt_history_style_on_list | ( | const GList * | list, |
| const char * | name, | ||
| const gboolean | duplicate | ||
| ) |
apply style to selected images
Definition at line 498 of file history_actions.c.
References _history_action_on_list(), _history_style_apply(), dt_conf_get_int(), dt_hm_batch_state_cleanup(), DT_HM_BATCH_UNDECIDED, dt_styles_get_id_by_name(), FALSE, IS_NULL_PTR, name, and params.
Referenced by _styles_apply_callback(), _styles_row_activated_callback(), and entry_activated().
|
static |
Definition at line 41 of file history_actions.c.
Referenced by dt_history_copy_paste_get().