![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <glib.h>
#include <glib/gstdio.h>
#include <sqlite3.h>
#include <stdio.h>
#include <string.h>
#include "common/darktable.h"
#include "common/database.h"
#include "common/debug.h"
#include "common/history.h"
#include "common/image.h"
#include "control/conf.h"
#include "control/control.h"
#include "crawler.h"
#include "gui/gtk.h"
Data Structures | |
struct | dt_control_crawler_result_t |
struct | dt_control_crawler_gui_t |
Typedefs | |
typedef enum dt_control_crawler_cols_t | dt_control_crawler_cols_t |
typedef struct dt_control_crawler_result_t | dt_control_crawler_result_t |
typedef struct dt_control_crawler_gui_t | dt_control_crawler_gui_t |
Functions | |
static void | _free_crawler_result (dt_control_crawler_result_t *entry) |
static void | _set_modification_time (char *filename, const time_t timestamp) |
GList * | dt_control_crawler_run (void) |
static void | dt_control_crawler_response_callback (GtkWidget *dialog, const gint response_id, gpointer user_data) |
static void | _delete_selected_rows (dt_control_crawler_gui_t *gui) |
static void | _select_all_callback (GtkButton *button, gpointer user_data) |
static void | _select_none_callback (GtkButton *button, gpointer user_data) |
static void | _select_invert_callback (GtkButton *button, gpointer user_data) |
static void | _db_update_timestamp (const int id, const time_t timestamp) |
static void | _get_crawler_entry_from_model (GtkTreeModel *model, GtkTreeIter *iter, dt_control_crawler_result_t *entry) |
static void | _append_row_to_remove (GtkTreeModel *model, GtkTreePath *path, GList **rowref_list) |
static void | _log_synchronization (dt_control_crawler_gui_t *gui, gchar *pattern, gchar *filepath) |
static void | sync_xmp_to_db (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) |
static void | sync_db_to_xmp (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) |
static void | sync_newest_to_oldest (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) |
static void | sync_oldest_to_newest (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) |
static void | _reload_button_clicked (GtkButton *button, gpointer user_data) |
void | _overwrite_button_clicked (GtkButton *button, gpointer user_data) |
static void | _newest_button_clicked (GtkButton *button, gpointer user_data) |
static void | _oldest_button_clicked (GtkButton *button, gpointer user_data) |
static gchar * | str_time_delta (const int time_delta) |
void | dt_control_crawler_show_image_list (GList *images) |
typedef enum dt_control_crawler_cols_t dt_control_crawler_cols_t |
typedef struct dt_control_crawler_gui_t dt_control_crawler_gui_t |
typedef struct dt_control_crawler_result_t dt_control_crawler_result_t |
|
static |
References model.
Referenced by sync_db_to_xmp(), sync_newest_to_oldest(), sync_oldest_to_newest(), and sync_xmp_to_db().
|
static |
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, and DT_DEBUG_SQLITE3_PREPARE_V2.
Referenced by sync_newest_to_oldest(), sync_oldest_to_newest(), and sync_xmp_to_db().
|
static |
References dt_control_crawler_gui_t::model, model, and dt_control_crawler_gui_t::rows_to_remove.
Referenced by _newest_button_clicked(), _oldest_button_clicked(), _overwrite_button_clicked(), and _reload_button_clicked().
|
static |
|
static |
References DT_CONTROL_CRAWLER_COL_ID, DT_CONTROL_CRAWLER_COL_IMAGE_PATH, DT_CONTROL_CRAWLER_COL_TS_DB_INT, DT_CONTROL_CRAWLER_COL_TS_XMP_INT, DT_CONTROL_CRAWLER_COL_XMP_PATH, dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, model, dt_control_crawler_result_t::timestamp_db, dt_control_crawler_result_t::timestamp_xmp, and dt_control_crawler_result_t::xmp_path.
Referenced by sync_db_to_xmp(), sync_newest_to_oldest(), sync_oldest_to_newest(), and sync_xmp_to_db().
|
static |
References FALSE, dt_control_crawler_gui_t::log, and TRUE.
Referenced by sync_db_to_xmp(), sync_newest_to_oldest(), sync_oldest_to_newest(), and sync_xmp_to_db().
|
static |
|
static |
void _overwrite_button_clicked | ( | GtkButton * | button, |
gpointer | user_data | ||
) |
|
static |
|
static |
References dt_control_crawler_gui_t::tree.
Referenced by dt_control_crawler_show_image_list().
|
static |
References dt_control_crawler_gui_t::model, and dt_control_crawler_gui_t::tree.
Referenced by dt_control_crawler_show_image_list().
|
static |
References dt_control_crawler_gui_t::tree.
Referenced by dt_control_crawler_show_image_list().
|
static |
Referenced by sync_db_to_xmp(), sync_newest_to_oldest(), and sync_oldest_to_newest().
|
static |
References dt_control_crawler_gui_t::model.
Referenced by dt_control_crawler_show_image_list().
GList * dt_control_crawler_run | ( | ) |
this isn't a background job on purpose. it has to be really fast so it shouldn't require locking from image cache or anything like that. should we find out that we want to have a background job that crawls over all images we can maybe refactor this, but for now it's good the way it is.
References darktable, darktable_t::db, dt_database_get(), dt_database_release_transaction, dt_database_start_transaction, DT_DEBUG_CONTROL, dt_image_get_xmp_mode(), DT_IMAGE_HAS_TXT, DT_IMAGE_HAS_WAV, dt_image_path_append_version_no_db(), dt_print(), dt_util_normalize_path(), flags, dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, PATH_MAX, dt_control_crawler_result_t::timestamp_db, dt_control_crawler_result_t::timestamp_xmp, and dt_control_crawler_result_t::xmp_path.
Referenced by crawl_xmp_changes(), and dt_init().
void dt_control_crawler_show_image_list | ( | GList * | images | ) |
References _free_crawler_result(), _newest_button_clicked(), _oldest_button_clicked(), _overwrite_button_clicked(), _reload_button_clicked(), _select_all_callback(), _select_invert_callback(), _select_none_callback(), darktable, DT_CONTROL_CRAWLER_COL_ID, DT_CONTROL_CRAWLER_COL_IMAGE_PATH, DT_CONTROL_CRAWLER_COL_REPORT, DT_CONTROL_CRAWLER_COL_TIME_DELTA, DT_CONTROL_CRAWLER_COL_TS_DB, DT_CONTROL_CRAWLER_COL_TS_DB_INT, DT_CONTROL_CRAWLER_COL_TS_XMP, DT_CONTROL_CRAWLER_COL_TS_XMP_INT, DT_CONTROL_CRAWLER_COL_XMP_PATH, DT_CONTROL_CRAWLER_NUM_COLS, dt_control_crawler_response_callback(), dt_osx_disallow_fullscreen(), DT_PIXEL_APPLY_DPI, dt_ui_main_window(), FALSE, darktable_t::gui, dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, dt_control_crawler_gui_t::log, dt_control_crawler_gui_t::model, dt_control_crawler_gui_t::spinner, store(), str_time_delta(), dt_control_crawler_result_t::timestamp_db, dt_control_crawler_result_t::timestamp_xmp, dt_control_crawler_gui_t::tree, TRUE, dt_gui_gtk_t::ui, and dt_control_crawler_result_t::xmp_path.
Referenced by crawl_xmp_changes(), and dt_init().
|
static |
Referenced by dt_control_crawler_show_image_list().
|
static |
References _append_row_to_remove(), _free_crawler_result(), _get_crawler_entry_from_model(), _log_synchronization(), _set_modification_time(), dt_image_write_sidecar_file(), error(), dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, model, dt_control_crawler_gui_t::rows_to_remove, dt_control_crawler_result_t::timestamp_db, and dt_control_crawler_result_t::xmp_path.
Referenced by _overwrite_button_clicked().
|
static |
References _append_row_to_remove(), _db_update_timestamp(), _free_crawler_result(), _get_crawler_entry_from_model(), _log_synchronization(), _set_modification_time(), dt_history_load_and_apply(), dt_image_write_sidecar_file(), error(), dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, model, dt_control_crawler_gui_t::rows_to_remove, dt_control_crawler_result_t::timestamp_db, dt_control_crawler_result_t::timestamp_xmp, and dt_control_crawler_result_t::xmp_path.
Referenced by _newest_button_clicked().
|
static |
References _append_row_to_remove(), _db_update_timestamp(), _free_crawler_result(), _get_crawler_entry_from_model(), _log_synchronization(), _set_modification_time(), dt_history_load_and_apply(), dt_image_write_sidecar_file(), error(), dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, model, dt_control_crawler_gui_t::rows_to_remove, dt_control_crawler_result_t::timestamp_db, dt_control_crawler_result_t::timestamp_xmp, and dt_control_crawler_result_t::xmp_path.
Referenced by _oldest_button_clicked().
|
static |
References _append_row_to_remove(), _db_update_timestamp(), _free_crawler_result(), _get_crawler_entry_from_model(), _log_synchronization(), dt_history_load_and_apply(), error(), dt_control_crawler_result_t::id, dt_control_crawler_result_t::image_path, model, dt_control_crawler_gui_t::rows_to_remove, dt_control_crawler_result_t::timestamp_xmp, and dt_control_crawler_result_t::xmp_path.
Referenced by _reload_button_clicked().