![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/history_actions.h"#include "common/darktable.h"#include "common/debug.h"#include "common/exif.h"#include "common/history.h"#include "common/history_snapshot.h"#include "common/image.h"#include "common/image_cache.h"#include "common/mipmap_cache.h"#include "common/styles.h"#include "common/tags.h"#include "common/undo.h"#include "control/conf.h"#include "control/control.h"#include "develop/dev_history.h"#include "develop/develop.h"#include "develop/imageop.h"#include "dtgtk/thumbtable.h"#include "gui/hist_dialog.h"
Include dependency graph for history_actions.c:Data Structures | |
| struct | dt_history_load_params_t |
| struct | dt_history_delete_params_t |
| struct | dt_history_style_params_t |
Typedefs | |
| typedef gboolean(* | dt_history_action_fn) (const int32_t imgid, void *user_data) |
| typedef struct dt_history_load_params_t | dt_history_load_params_t |
| typedef struct dt_history_delete_params_t | dt_history_delete_params_t |
| typedef struct dt_history_style_params_t | dt_history_style_params_t |
Functions | |
| static void | _history_action_finalize_list (const GList *list, const gboolean changed) |
| static gboolean | _history_action_on_list_with_undo (const GList *list, dt_history_action_fn action, void *user_data, const gboolean use_undo) |
| static gboolean | _history_action_on_list (const GList *list, dt_history_action_fn action, void *user_data) |
| static GList * | _get_user_mod_list (dt_develop_t *dev_src, GList *ops, gboolean copy_full) |
| Build a module list to copy based on selected history indices. | |
| static int | _history_copy_and_paste_on_image_merge (int32_t imgid, int32_t dest_imgid, GList *ops, const gboolean copy_full, const dt_history_merge_strategy_t mode) |
| Copy/merge history between images using the merge pipeline. | |
| 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) |
| gboolean | dt_history_copy (int32_t imgid) |
| gboolean | dt_history_copy_parts (int32_t imgid) |
| static gboolean | _history_paste_apply (const int32_t imgid, void *user_data) |
| gboolean | dt_history_paste_on_image (const int32_t imgid) |
| gboolean | dt_history_paste_on_list (const GList *list) |
| gboolean | dt_history_paste_parts_prepare (void) |
| static gboolean | _history_paste_parts_apply (const int32_t imgid, void *user_data) |
| gboolean | dt_history_paste_parts_on_image (const int32_t imgid) |
| gboolean | dt_history_paste_parts_on_list (const GList *list) |
| static gboolean | _history_compress_apply (const int32_t imgid, void *user_data) |
| void | dt_history_compress_on_image (const int32_t imgid) |
| int | dt_history_compress_on_list (const GList *imgs) |
| static gboolean | _history_load_and_apply_apply (const int32_t imgid, void *user_data) |
| int | dt_history_load_and_apply (const int32_t imgid, gchar *filename, int history_only) |
| int | dt_history_load_and_apply_on_image (int32_t imgid, gchar *filename, int history_only) |
| int | dt_history_load_and_apply_on_list (gchar *filename, const GList *list) |
| static gboolean | _history_delete_apply (const int32_t imgid, void *user_data) |
| gboolean | dt_history_delete_on_list (const GList *list, gboolean undo) |
| static gboolean | _history_style_apply (const int32_t imgid, void *user_data) |
| gboolean | dt_history_style_on_image (const int32_t imgid, const char *name, const gboolean duplicate) |
| gboolean | dt_history_style_on_list (const GList *list, const char *name, const gboolean duplicate) |
| typedef gboolean(* dt_history_action_fn) (const int32_t imgid, void *user_data) |
| typedef struct dt_history_delete_params_t dt_history_delete_params_t |
| typedef struct dt_history_load_params_t dt_history_load_params_t |
| typedef struct dt_history_style_params_t dt_history_style_params_t |
|
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. |
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(), h, dt_develop_t::history, dt_develop_t::iop, dt_iop_module_t::multi_priority, dt_dev_history_item_t::num, and dt_iop_module_t::op.
Referenced by _history_copy_and_paste_on_image_merge().
|
static |
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_IMAGE_INFO_CHANGED, DT_SIGNAL_TAG_CHANGED, and darktable_t::signals.
Referenced by _history_action_on_list_with_undo().
|
static |
|
static |
References _history_action_finalize_list(), darktable, dt_undo_end_group(), DT_UNDO_LT_HISTORY, dt_undo_start_group(), FALSE, and darktable_t::undo.
Referenced by _history_action_on_list(), and dt_history_delete_on_list().
|
static |
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. |
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, and TRUE.
Referenced by dt_history_copy_and_paste_on_image().
|
static |
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, darktable, 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_LT_HISTORY, dt_undo_record(), FALSE, dt_undo_lt_history_t::imgid, TRUE, and darktable_t::undo.
Referenced by dt_history_delete_on_list().
|
static |
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, darktable, 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_UNDO_LT_HISTORY, dt_undo_record(), FALSE, darktable_t::image_cache, dt_undo_lt_history_t::imgid, TRUE, and darktable_t::undo.
Referenced by dt_history_load_and_apply(), and dt_history_load_and_apply_on_list().
|
static |
References dt_history_copy_item_t::copied_imageid, dt_view_manager_t::copy_paste, darktable, dt_conf_get_int(), dt_history_copy_and_paste_on_image(), FALSE, dt_history_copy_item_t::selops, darktable_t::view_manager, and void().
Referenced by dt_history_paste_on_image(), and dt_history_paste_on_list().
|
static |
References dt_history_copy_item_t::copied_imageid, dt_view_manager_t::copy_paste, darktable, dt_conf_get_int(), dt_history_copy_and_paste_on_image(), FALSE, dt_history_copy_item_t::selops, darktable_t::view_manager, and void().
Referenced by dt_history_paste_parts_on_image(), and dt_history_paste_parts_on_list().
|
static |
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, darktable, 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(), dt_styles_apply_to_image_merge(), DT_UNDO_LT_HISTORY, dt_undo_record(), FALSE, dt_undo_lt_history_t::imgid, TRUE, darktable_t::undo, and UNKNOWN_IMAGE.
Referenced by dt_history_style_on_image(), and dt_history_style_on_list().
| void dt_history_compress_on_image | ( | const int32_t | imgid | ) |
References _history_compress_apply().
Referenced by compress_history_callback().
| int dt_history_compress_on_list | ( | const GList * | imgs | ) |
compress history stack
References _history_action_on_list(), and _history_compress_apply().
Referenced by compress_history_callback().
| gboolean dt_history_copy | ( | int32_t | imgid | ) |
copy history from imgid and pasts on selected images, merge or overwrite...
References dt_history_copy_item_t::copied_imageid, dt_view_manager_t::copy_paste, darktable, FALSE, TRUE, and darktable_t::view_manager.
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 | ||
| ) |
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, darktable, dt_control_log(), 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_LT_HISTORY, dt_undo_record(), dt_undo_lt_history_t::imgid, darktable_t::undo, 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().
| gboolean dt_history_copy_parts | ( | int32_t | imgid | ) |
References dt_view_manager_t::copy_paste, darktable, dt_gui_hist_dialog_new(), dt_history_copy(), FALSE, TRUE, and darktable_t::view_manager.
Referenced by copy_parts_callback().
| gboolean dt_history_delete_on_list | ( | const GList * | list, |
| gboolean | undo | ||
| ) |
delete historystack of selected images
References _history_action_on_list_with_undo(), and _history_delete_apply().
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
References _history_load_and_apply_apply().
Referenced by dt_history_load_and_apply_on_image().
| int dt_history_load_and_apply_on_image | ( | int32_t | imgid, |
| gchar * | filename, | ||
| int | history_only | ||
| ) |
References dt_history_load_and_apply().
Referenced by sync_newest_to_oldest(), sync_oldest_to_newest(), and sync_xmp_to_db().
| int dt_history_load_and_apply_on_list | ( | gchar * | filename, |
| const GList * | list | ||
| ) |
load a dt file and applies to selected images
References _history_action_on_list(), and _history_load_and_apply_apply().
Referenced by load_xmp_callback().
| gboolean dt_history_paste_on_image | ( | const int32_t | imgid | ) |
References _history_paste_apply().
| gboolean dt_history_paste_on_list | ( | const GList * | list | ) |
References _history_action_on_list(), _history_paste_apply(), dt_history_copy_item_t::copied_imageid, dt_view_manager_t::copy_paste, darktable, FALSE, and darktable_t::view_manager.
Referenced by paste_all_callback().
| gboolean dt_history_paste_parts_on_image | ( | const int32_t | imgid | ) |
References _history_paste_parts_apply().
| gboolean dt_history_paste_parts_on_list | ( | const GList * | list | ) |
| gboolean dt_history_paste_parts_prepare | ( | void | ) |
References dt_history_copy_item_t::copied_imageid, dt_view_manager_t::copy_paste, darktable, dt_gui_hist_dialog_new(), FALSE, TRUE, and darktable_t::view_manager.
Referenced by paste_parts_callback().
| gboolean dt_history_style_on_image | ( | const int32_t | imgid, |
| const char * | name, | ||
| const gboolean | duplicate | ||
| ) |
References _history_style_apply(), dt_conf_get_int(), dt_styles_get_id_by_name(), FALSE, and name.
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
References _history_action_on_list(), _history_style_apply(), dt_conf_get_int(), dt_styles_get_id_by_name(), FALSE, and name.
Referenced by _styles_apply_callback(), _styles_row_activated_callback(), and entry_activated().