Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
history_merge_gui.c File Reference
#include "common/history_merge_gui.h"
#include "common/darktable.h"
#include "common/debug.h"
#include "common/iop_order.h"
#include "common/topological_sort.h"
#include "develop/blend.h"
#include "develop/dev_history.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/masks.h"
#include "gui/gtk.h"
#include <glib.h>
#include <string.h>
+ Include dependency graph for history_merge_gui.c:

Data Structures

struct  _hm_id_info_t
 
struct  _hm_report_reorder_ctx_t
 
struct  _hm_label_t
 

Typedefs

typedef enum dt_hm_report_col_t dt_hm_report_col_t
 

Enumerations

enum  dt_hm_report_col_t {
  HM_REPORT_COL_ORIG = 0 ,
  HM_REPORT_COL_FILET ,
  HM_REPORT_COL_SRC ,
  HM_REPORT_COL_ARROW ,
  HM_REPORT_COL_DST ,
  HM_REPORT_COL_SRC_ID ,
  HM_REPORT_COL_DST_ID ,
  HM_REPORT_COL_SRC_WEIGHT ,
  HM_REPORT_COL_DST_WEIGHT ,
  HM_REPORT_COL_ORIG_STYLE ,
  HM_REPORT_COL_SRC_STYLE ,
  HM_REPORT_COL_DST_STYLE ,
  HM_REPORT_COL_IS_INPUT ,
  HM_REPORT_COL_COUNT
}
 

Functions

static gchar * _hm_clean_module_name (const dt_iop_module_t *mod)
 
static gchar * _hm_module_label_short (const dt_iop_module_t *mod)
 
static gchar * _hm_pretty_id (const char *id)
 
static gchar * _hm_pretty_id_from_id_ht (const char *id, GHashTable *id_ht, const gboolean prefer_dest)
 
static gchar * _hm_cycle_node_label (const dt_digraph_node_t *n, GHashTable *id_ht)
 
static void _hm_append_cycle_label (GString *out, const char *s, const gboolean bold)
 
dt_hm_constraint_choice_t _hm_ask_user_constraints_choice (GHashTable *id_ht, const char *faulty_id, const char *src_prev, const char *src_next, const char *dst_prev, const char *dst_next)
 
gboolean _hm_warn_missing_raster_producers (const GList *mod_list)
 
void _hm_show_toposort_cycle_popup (GList *cycle_nodes, GHashTable *id_ht)
 
static gchar * _hm_module_row_label (const dt_iop_module_t *mod)
 
static gboolean _hm_history_masks_match (const dt_dev_history_item_t *a, const dt_dev_history_item_t *b)
 
static gboolean _hm_history_items_match (const dt_dev_history_item_t *a, const dt_dev_history_item_t *b)
 
static gboolean _hm_history_item_uses_masks (const dt_dev_history_item_t *hist)
 
static gint _hm_label_cmp (gconstpointer a, gconstpointer b)
 
GPtrArray * _hm_collect_labels_from_history_map (GHashTable *last_by_id, const GHashTable *mod_list_ids, GPtrArray **out_styles)
 
static dt_iop_module_t_hm_module_from_id (dt_develop_t *dev, const char *id)
 
static gboolean _hm_module_visible_in_report (const dt_iop_module_t *mod, const GHashTable *mod_list_ids)
 
static gchar * _hm_report_dest_label (const dt_iop_module_t *mod, GHashTable *dst_last_by_id, const GHashTable *orig_ids)
 
static GPtrArray * _hm_collect_enabled_modules_gui_order (const dt_develop_t *dev, const GHashTable *mod_list_ids)
 
static void _hm_report_resync_history_iop_order (dt_develop_t *dev)
 
static GPtrArray * _hm_report_collect_dest_ids (GtkTreeModel *model)
 
static GPtrArray * _hm_report_build_desired_visible_order (dt_develop_t *dev_dest, GtkTreeModel *model)
 
static GList * _hm_report_build_ordered_modules (dt_develop_t *dev_dest, const GPtrArray *visible_order, const GHashTable *mod_list_ids)
 
static gboolean _hm_report_apply_visible_order (dt_develop_t *dev_dest, const GPtrArray *visible_order, const GHashTable *mod_list_ids)
 
static GHashTable * _hm_report_build_moved_set (dt_develop_t *dev_src, GtkTreeModel *model, const GHashTable *mod_list_ids)
 
static void _hm_report_update_move_styles (GtkListStore *store, dt_develop_t *dev_src, const GHashTable *mod_list_ids)
 
static void _hm_report_update_arrows (GtkListStore *store, GHashTable *override, GHashTable *dst_last_by_id, GHashTable *dst_last_before_by_id)
 
static void _hm_report_keep_input_row_at_bottom (GtkListStore *store)
 
static void _hm_report_update_dest_labels (GtkListStore *store, dt_develop_t *dev_dest, GHashTable *dst_last_by_id, const GHashTable *orig_ids)
 
static void _hm_report_apply_store_order (_hm_report_reorder_ctx_t *ctx)
 
static void _hm_report_drag_begin (GtkWidget *widget, GdkDragContext *context, gpointer user_data)
 
static void _hm_report_drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, gpointer user_data)
 
static void _hm_report_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time, gpointer user_data)
 
static GHashTable * _hm_build_override_map (const dt_develop_t *dev_dest, GHashTable *src_last_by_id, GHashTable *dst_last_before_by_id)
 
gboolean _hm_show_merge_report_popup (dt_develop_t *dev_dest, dt_develop_t *dev_src, const gboolean merge_iop_order, const gboolean used_source_order, const dt_history_merge_strategy_t strategy, GHashTable *src_last_by_id, GHashTable *dst_last_before_by_id, const GPtrArray *orig_labels, const GPtrArray *orig_styles, const GHashTable *orig_ids, const GHashTable *mod_list_ids)
 

Typedef Documentation

◆ dt_hm_report_col_t

Enumeration Type Documentation

◆ dt_hm_report_col_t

Enumerator
HM_REPORT_COL_ORIG 
HM_REPORT_COL_FILET 
HM_REPORT_COL_SRC 
HM_REPORT_COL_ARROW 
HM_REPORT_COL_DST 
HM_REPORT_COL_SRC_ID 
HM_REPORT_COL_DST_ID 
HM_REPORT_COL_SRC_WEIGHT 
HM_REPORT_COL_DST_WEIGHT 
HM_REPORT_COL_ORIG_STYLE 
HM_REPORT_COL_SRC_STYLE 
HM_REPORT_COL_DST_STYLE 
HM_REPORT_COL_IS_INPUT 
HM_REPORT_COL_COUNT 

Function Documentation

◆ _hm_append_cycle_label()

static void _hm_append_cycle_label ( GString *  out,
const char *  s,
const gboolean  bold 
)
static

References dt_free, and out.

Referenced by _hm_show_toposort_cycle_popup().

◆ _hm_ask_user_constraints_choice()

dt_hm_constraint_choice_t _hm_ask_user_constraints_choice ( GHashTable *  id_ht,
const char *  faulty_id,
const char *  src_prev,
const char *  src_next,
const char *  dst_prev,
const char *  dst_next 
)

◆ _hm_build_override_map()

static GHashTable * _hm_build_override_map ( const dt_develop_t dev_dest,
GHashTable *  src_last_by_id,
GHashTable *  dst_last_before_by_id 
)
static

◆ _hm_clean_module_name()

static gchar * _hm_clean_module_name ( const dt_iop_module_t mod)
static

◆ _hm_collect_enabled_modules_gui_order()

static GPtrArray * _hm_collect_enabled_modules_gui_order ( const dt_develop_t dev,
const GHashTable *  mod_list_ids 
)
static

◆ _hm_collect_labels_from_history_map()

GPtrArray * _hm_collect_labels_from_history_map ( GHashTable *  last_by_id,
const GHashTable *  mod_list_ids,
GPtrArray **  out_styles 
)

◆ _hm_cycle_node_label()

static gchar * _hm_cycle_node_label ( const dt_digraph_node_t n,
GHashTable *  id_ht 
)
static

◆ _hm_history_item_uses_masks()

◆ _hm_history_items_match()

static gboolean _hm_history_items_match ( const dt_dev_history_item_t a,
const dt_dev_history_item_t b 
)
static

References _hm_history_masks_match(), a, b, FALSE, and TRUE.

Referenced by _hm_build_override_map().

◆ _hm_history_masks_match()

static gboolean _hm_history_masks_match ( const dt_dev_history_item_t a,
const dt_dev_history_item_t b 
)
static

◆ _hm_label_cmp()

static gint _hm_label_cmp ( gconstpointer  a,
gconstpointer  b 
)
static

◆ _hm_module_from_id()

◆ _hm_module_label_short()

static gchar * _hm_module_label_short ( const dt_iop_module_t mod)
static

◆ _hm_module_row_label()

◆ _hm_module_visible_in_report()

static gboolean _hm_module_visible_in_report ( const dt_iop_module_t mod,
const GHashTable *  mod_list_ids 
)
static

◆ _hm_pretty_id()

static gchar * _hm_pretty_id ( const char *  id)
static

References _hm_id_to_op_name(), and name.

Referenced by _hm_pretty_id_from_id_ht().

◆ _hm_pretty_id_from_id_ht()

static gchar * _hm_pretty_id_from_id_ht ( const char *  id,
GHashTable *  id_ht,
const gboolean  prefer_dest 
)
static

◆ _hm_report_apply_store_order()

◆ _hm_report_apply_visible_order()

static gboolean _hm_report_apply_visible_order ( dt_develop_t dev_dest,
const GPtrArray *  visible_order,
const GHashTable *  mod_list_ids 
)
static

◆ _hm_report_build_desired_visible_order()

static GPtrArray * _hm_report_build_desired_visible_order ( dt_develop_t dev_dest,
GtkTreeModel *  model 
)
static

◆ _hm_report_build_moved_set()

static GHashTable * _hm_report_build_moved_set ( dt_develop_t dev_src,
GtkTreeModel *  model,
const GHashTable *  mod_list_ids 
)
static

◆ _hm_report_build_ordered_modules()

static GList * _hm_report_build_ordered_modules ( dt_develop_t dev_dest,
const GPtrArray *  visible_order,
const GHashTable *  mod_list_ids 
)
static

◆ _hm_report_collect_dest_ids()

static GPtrArray * _hm_report_collect_dest_ids ( GtkTreeModel *  model)
static

◆ _hm_report_dest_label()

static gchar * _hm_report_dest_label ( const dt_iop_module_t mod,
GHashTable *  dst_last_by_id,
const GHashTable *  orig_ids 
)
static

◆ _hm_report_drag_begin()

static void _hm_report_drag_begin ( GtkWidget widget,
GdkDragContext *  context,
gpointer  user_data 
)
static

◆ _hm_report_drag_data_get()

static void _hm_report_drag_data_get ( GtkWidget widget,
GdkDragContext *  context,
GtkSelectionData *  selection_data,
guint  info,
guint  time,
gpointer  user_data 
)
static

◆ _hm_report_drag_data_received()

static void _hm_report_drag_data_received ( GtkWidget widget,
GdkDragContext *  context,
gint  x,
gint  y,
GtkSelectionData *  selection_data,
guint  info,
guint  time,
gpointer  user_data 
)
static

◆ _hm_report_keep_input_row_at_bottom()

static void _hm_report_keep_input_row_at_bottom ( GtkListStore *  store)
static

◆ _hm_report_resync_history_iop_order()

static void _hm_report_resync_history_iop_order ( dt_develop_t dev)
static

◆ _hm_report_update_arrows()

static void _hm_report_update_arrows ( GtkListStore *  store,
GHashTable *  override,
GHashTable *  dst_last_by_id,
GHashTable *  dst_last_before_by_id 
)
static

◆ _hm_report_update_dest_labels()

static void _hm_report_update_dest_labels ( GtkListStore *  store,
dt_develop_t dev_dest,
GHashTable *  dst_last_by_id,
const GHashTable *  orig_ids 
)
static

◆ _hm_report_update_move_styles()

static void _hm_report_update_move_styles ( GtkListStore *  store,
dt_develop_t dev_src,
const GHashTable *  mod_list_ids 
)
static

◆ _hm_show_merge_report_popup()

gboolean _hm_show_merge_report_popup ( dt_develop_t dev_dest,
dt_develop_t dev_src,
const gboolean  merge_iop_order,
const gboolean  used_source_order,
const dt_history_merge_strategy_t  strategy,
GHashTable *  src_last_by_id,
GHashTable *  dst_last_before_by_id,
const GPtrArray *  orig_labels,
const GPtrArray *  orig_styles,
const GHashTable *  orig_ids,
const GHashTable *  mod_list_ids 
)

◆ _hm_show_toposort_cycle_popup()

void _hm_show_toposort_cycle_popup ( GList *  cycle_nodes,
GHashTable *  id_ht 
)

◆ _hm_warn_missing_raster_producers()