![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/collection.h"
#include "common/selection.h"
#include "common/darktable.h"
#include "control/signal.h"
#include "gui/gtk.h"
#include "views/view.h"
Data Structures | |
struct | dt_selection_t |
Typedefs | |
typedef struct dt_selection_t | dt_selection_t |
typedef struct dt_selection_t dt_selection_t |
|
static |
References dt_selection_t::ids, dt_selection_t::last_single_id, and dt_selection_t::length.
Referenced by _list_iterate(), and dt_selection_select().
|
static |
References darktable, darktable_t::db, dt_database_get(), and DT_DEBUG_SQLITE3_EXEC.
Referenced by _selection_update_collection().
|
static |
References _add_id_link(), and _remove_id_link().
Referenced by dt_selection_deselect_list(), and dt_selection_select_list().
|
static |
References _update_last_ids(), dt_selection_t::ids, and dt_selection_t::length.
Referenced by _list_iterate(), and dt_selection_deselect().
|
static |
References dt_selection_t::ids, dt_selection_t::last_single_id, and dt_selection_t::length.
Referenced by dt_selection_clear(), and dt_selection_reload_from_database_real().
|
static |
References darktable, darktable_t::db, dt_database_get(), and DT_DEBUG_SQLITE3_PREPARE_V2.
Referenced by dt_selection_reload_from_database_real().
|
static |
References darktable, darktable_t::db, dt_database_get(), and DT_DEBUG_SQLITE3_EXEC.
Referenced by dt_selection_deselect().
|
static |
References darktable, darktable_t::db, dt_database_get(), and DT_DEBUG_SQLITE3_EXEC.
Referenced by dt_selection_select().
|
static |
References _clean_missing_ids(), _update_gui(), and dt_selection_reload_from_database.
Referenced by dt_selection_free(), and dt_selection_new().
|
static |
References darktable_t::collection, darktable, dt_collection_hint_message(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_SELECTION_CHANGED, and darktable_t::signals.
Referenced by _selection_update_collection(), dt_selection_clear(), dt_selection_deselect(), dt_selection_deselect_list(), dt_selection_pop(), dt_selection_push(), dt_selection_select(), and dt_selection_select_list().
|
static |
References dt_selection_t::ids, and dt_selection_t::last_single_id.
Referenced by _remove_id_link(), and dt_selection_reload_from_database_real().
void dt_selection_clear | ( | struct dt_selection_t * | selection | ) |
clears the selection
References _reset_ids_list(), _update_gui(), darktable, darktable_t::db, dt_database_get(), and DT_DEBUG_SQLITE3_EXEC.
Referenced by _selection_cb(), clear_selection_callback(), dt_image_read_duplicates(), dt_selection_select_single(), dt_selection_to_culling_mode(), enter(), and view_popup_menu_onRemove().
void dt_selection_deselect | ( | struct dt_selection_t * | selection, |
int32_t | imgid | ||
) |
removes a single imgid from the current selection. use the optimized dt_selection_deselect_list()
to process batches.
References _remove_id_link(), _selection_deselect(), _update_gui(), and UNKNOWN_IMAGE.
Referenced by _dt_collection_lut(), and dt_selection_toggle().
void dt_selection_deselect_list | ( | struct dt_selection_t * | selection, |
const GList * | list | ||
) |
deselects a set of images from a list in a fast, optimized fashion. the list is unaltered
References _list_iterate(), _update_gui(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_EXEC, dt_util_dstrcat(), and FALSE.
Referenced by dt_thumbtable_invert_selection().
void dt_selection_free | ( | dt_selection_t * | selection | ) |
References _selection_update_collection(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_selection_t::ids, and darktable_t::signals.
Referenced by dt_cleanup().
int32_t dt_selection_get_first_id | ( | struct dt_selection_t * | selection | ) |
Get the first imgid of a selection
References dt_selection_t::last_single_id.
Referenced by _culling_mode(), _metadata_view_update_values(), copy_callback(), copy_parts_callback(), dt_act_on_get_first_image(), dt_thumbtable_key_pressed_grid(), dt_thumbtable_scroll_to_selection(), enter(), and try_enter().
int dt_selection_get_length | ( | struct dt_selection_t * | selection | ) |
get the length of the current selection (number of items)
References dt_selection_t::ids, and dt_selection_t::length.
Referenced by _init_treeview(), _metadata_view_update_values(), clear_selection_sensitive_callback(), copy_callback(), copy_parts_callback(), dt_act_on_get_first_image(), dt_act_on_get_images(), dt_act_on_get_images_nb(), dt_collection_hint_message(), dt_tag_get_attached(), dt_tag_get_suggestions(), dt_tag_get_with_usage(), has_selection(), preload_image_cache(), select_all_sensitive_callback(), and try_enter().
GList * dt_selection_get_list | ( | struct dt_selection_t * | selection | ) |
get the list of selected images. Warning: returns a copy, the caller owns it and needs to free it.
References dt_selection_t::ids.
Referenced by _new_button_clicked(), _selection_cb(), _write_metadata(), clear_image_cache(), copy_callback(), copy_parts_callback(), dt_act_on_get_images(), dt_collection_hint_message(), dt_thumbtable_invert_selection(), dt_thumbtable_select_range(), load_xmp_callback(), paste_all_callback(), paste_parts_callback(), and preload_image_cache().
gchar * dt_selection_ids_to_string | ( | struct dt_selection_t * | selection | ) |
concatenate all image ids from the selection as a string, separated with coma, for SQL queries
References dt_selection_t::ids, and dt_selection_t::length.
Referenced by _concatenate_multiple_images(), _tag_get_tags(), _update(), and dt_tag_get_attached().
gboolean dt_selection_is_id_selected | ( | struct dt_selection_t * | selection, |
int32_t | imgid | ||
) |
see if the imgid is known from the selection
References FALSE, and dt_selection_t::ids.
Referenced by _add_thumbnail_at_rowid(), _dt_selection_changed_callback(), and dt_thumbnail_new().
dt_selection_t * dt_selection_new | ( | ) |
References _selection_update_collection(), darktable, DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_selection_reload_from_database, DT_SIGNAL_COLLECTION_CHANGED, and darktable_t::signals.
Referenced by dt_init().
void dt_selection_pop | ( | struct dt_selection_t * | selection | ) |
restore the previous selection from a temp memory database table
References _update_gui(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_EXEC, dt_selection_reload_from_database, FALSE, darktable_t::gui, and dt_gui_gtk_t::selection_stacked.
Referenced by dt_culling_mode_to_selection().
void dt_selection_push | ( | struct dt_selection_t * | selection | ) |
backup the current selection to a temp memory database table
References _update_gui(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_EXEC, dt_selection_reload_from_database, darktable_t::gui, dt_gui_gtk_t::selection_stacked, and TRUE.
Referenced by dt_selection_to_culling_mode().
void dt_selection_reload_from_database_real | ( | struct dt_selection_t * | selection | ) |
call this right after the selection got changed directly in memory database, to resync the GList representation of the selection
References _reset_ids_list(), _selection_database_to_glist(), _update_last_ids(), dt_selection_t::ids, and dt_selection_t::length.
void dt_selection_select | ( | struct dt_selection_t * | selection, |
int32_t | imgid | ||
) |
adds a single imgid to the current selection. use the optimized dt_selection_select_list()
to process batches.
References _add_id_link(), _selection_select(), _update_gui(), and UNKNOWN_IMAGE.
Referenced by dt_collection_load_filmroll(), dt_selection_select_single(), and dt_selection_toggle().
void dt_selection_select_list | ( | struct dt_selection_t * | selection, |
const GList * | list | ||
) |
selects a set of images from a list in a fast, optimized fashion. the list is unaltered
References _list_iterate(), _update_gui(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_EXEC, dt_util_dstrcat(), and TRUE.
Referenced by _selection_cb(), dt_thumbtable_select_all(), and dt_thumbtable_select_range().
void dt_selection_select_single | ( | struct dt_selection_t * | selection, |
int32_t | imgid | ||
) |
clears current selection and adds a single imgid
References dt_selection_clear(), dt_selection_select(), and UNKNOWN_IMAGE.
Referenced by _event_main_release(), _film_strip_activated(), dt_thumbtable_key_pressed_grid(), and leave().
void dt_selection_toggle | ( | struct dt_selection_t * | selection, |
int32_t | imgid | ||
) |
toggles selection of a single image in the current selection
References dt_selection_deselect(), dt_selection_select(), dt_selection_t::ids, and UNKNOWN_IMAGE.
Referenced by _event_main_release(), and dt_thumbtable_key_pressed_grid().