![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "database/history_repository.h"#include "common/thumbnail_notify.h"#include "history/history.h"#include "history/notify.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "common/logging.h"#include "history/history_snapshot.h"#include "caches/image_cache.h"#include "caches/mipmap_cache.h"#include "metadata/tags.h"#include "common/undo.h"#include "common/glib_utils.h"#include "common/utility.h"
Include dependency graph for history/history.c:Go to the source code of this file.
Macros | |
| #define | DT_IOP_ORDER_INFO (dt_get_debug_flags() & DT_DEBUG_IOPORDER) |
Functions | |
| void | dt_history_set_operation_name_resolver (dt_history_operation_name_resolver_t resolver) |
| const char * | dt_history_operation_name (const char *operation) |
Resolve operation through the installed resolver, or return it unchanged. | |
| void | dt_history_item_free (gpointer data) |
| static void | _remove_preset_flag (const int32_t imgid) |
| void | dt_history_delete_on_image_ext (int32_t imgid, gboolean undo) |
| void | dt_history_delete_on_image (int32_t imgid) |
| char * | dt_history_item_as_string (const char *name, gboolean enabled) |
| static void | _collect_item (void *user_data, const int num, const char *operation, const gboolean enabled, const char *multi_name) |
| GList * | dt_history_get_items (const int32_t imgid, gboolean enabled) |
| static void | _collect_item_string (void *user_data, const int num, const char *operation, const gboolean enabled, const char *multi_name) |
| char * | dt_history_get_items_as_string (const int32_t imgid) |
Variables | |
| static dt_history_operation_name_resolver_t | _operation_name_resolver = NULL |
| #define DT_IOP_ORDER_INFO (dt_get_debug_flags() & DT_DEBUG_IOPORDER) |
Definition at line 57 of file history/history.c.
|
static |
Definition at line 141 of file history/history.c.
References dt_history_operation_name(), dt_history_item_t::enabled, L, name, dt_history_item_t::name, dt_history_item_t::num, and dt_history_item_t::op.
Referenced by dt_history_get_items().
|
static |
Definition at line 170 of file history/history.c.
References dt_free, dt_history_item_as_string(), dt_history_operation_name(), dt_string_replace(), items, L, and name.
Referenced by dt_history_get_items_as_string().
Definition at line 83 of file history/history.c.
References dt_image_cache_get(), DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), dt_image_t::flags, IS_NULL_PTR, and L.
Referenced by dt_history_delete_on_image_ext().
| void dt_history_delete_on_image | ( | int32_t | imgid | ) |
delete all history for the given image
Definition at line 130 of file history/history.c.
References DT_HISTORY_CHANGE_TAGS, dt_history_changed(), dt_history_delete_on_image_ext(), and TRUE.
Referenced by dt_control_duplicate_images_job_run().
| void dt_history_delete_on_image_ext | ( | int32_t | imgid, |
| gboolean | undo | ||
| ) |
as above but control whether to record undo/redo
Definition at line 95 of file history/history.c.
References _remove_preset_flag(), 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_repository_delete_all_for_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_mipmap_cache_remove(), dt_tag_detach_by_string(), dt_thumbnail_notify_image_changed(), dt_undo_end_group(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_record(), dt_undo_start_group(), FALSE, dt_undo_lt_history_t::imgid, L, and TRUE.
Referenced by _history_delete_apply(), _history_snapshot_undo_restore(), and dt_history_delete_on_image().
| GList * dt_history_get_items | ( | int32_t | imgid, |
| gboolean | enabled | ||
| ) |
get list of history items for image
Definition at line 163 of file history/history.c.
References _collect_item(), dt_history_repository_foreach_last_item(), and L.
Referenced by _gui_styles_dialog_run(), and dt_gui_hist_dialog_new().
| char * dt_history_get_items_as_string | ( | int32_t | imgid | ) |
get list of history items for image as a nice string
Definition at line 190 of file history/history.c.
References _collect_item_string(), dt_free_gpointer(), dt_history_repository_foreach_item(), dt_util_glist_to_str(), items, and L.
Referenced by _altered_enter(), and main().
| char * dt_history_item_as_string | ( | const char * | name, |
| gboolean | enabled | ||
| ) |
get a single history item as string with enabled status
Definition at line 136 of file history/history.c.
Referenced by _collect_item_string().
| void dt_history_item_free | ( | gpointer | data | ) |
helper function to free a GList of dt_history_item_t
Definition at line 73 of file history/history.c.
References dt_free, L, dt_history_item_t::name, and dt_history_item_t::op.
Referenced by _gui_styles_dialog_run(), and dt_gui_hist_dialog_new().
Resolve operation through the installed resolver, or return it unchanged.
Definition at line 66 of file history/history.c.
References _operation_name_resolver, and L.
Referenced by _collect_item(), and _collect_item_string().
| void dt_history_set_operation_name_resolver | ( | dt_history_operation_name_resolver_t | resolver | ) |
Definition at line 61 of file history/history.c.
References _operation_name_resolver, and L.
Referenced by dt_init().
|
static |
Definition at line 59 of file history/history.c.
Referenced by dt_history_operation_name(), and dt_history_set_operation_name_resolver().