![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/collection.h"
#include "common/darktable.h"
#include "common/debug.h"
#include "common/image_cache.h"
#include "common/ratings.h"
#include "common/undo.h"
#include "common/grouping.h"
#include "views/view.h"
#include "control/conf.h"
#include "control/control.h"
#include "gui/gtk.h"
Data Structures | |
struct | dt_undo_ratings_t |
Macros | |
#define | DT_RATINGS_UPGRADE -1 |
#define | DT_RATINGS_DOWNGRADE -2 |
#define | DT_RATINGS_REJECT -3 |
#define | DT_RATINGS_UNREJECT -4 |
Typedefs | |
typedef struct dt_undo_ratings_t | dt_undo_ratings_t |
Functions | |
char * | dt_ratings_get_name (const int rating) |
int | dt_ratings_get (const int32_t imgid) |
static void | _ratings_apply_to_image (const int32_t imgid, const int rating) |
static void | _pop_undo (gpointer user_data, dt_undo_type_t type, dt_undo_data_t data, dt_undo_action_t action, GList **imgs) |
static void | _ratings_undo_data_free (gpointer data) |
static void | _ratings_apply (GList *imgs, const int rating, GList **undo, const gboolean undo_on) |
void | dt_ratings_apply_on_list (GList *img, const int rating, const gboolean undo_on) |
void | dt_ratings_apply_on_image (const int32_t imgid, const int rating, const gboolean single_star_toggle, const gboolean undo_on, const gboolean group_on) |
#define DT_RATINGS_DOWNGRADE -2 |
#define DT_RATINGS_REJECT -3 |
#define DT_RATINGS_UNREJECT -4 |
#define DT_RATINGS_UPGRADE -1 |
typedef struct dt_undo_ratings_t dt_undo_ratings_t |
|
static |
References _ratings_apply_to_image(), darktable_t::collection, darktable, DT_ACTION_UNDO, dt_collection_hint_message(), DT_UNDO_RATINGS, ratings, and type.
Referenced by dt_ratings_apply_on_image(), and dt_ratings_apply_on_list().
|
static |
References _ratings_apply_to_image(), dt_undo_ratings_t::after, dt_undo_ratings_t::before, darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_RATINGS_DOWNGRADE, dt_ratings_get(), DT_RATINGS_REJECT, DT_RATINGS_UNREJECT, DT_RATINGS_UPGRADE, DT_SIGNAL_IMAGE_INFO_CHANGED, DT_VIEW_DESERT, DT_VIEW_REJECT, DT_VIEW_STAR_1, DT_VIEW_STAR_5, FALSE, dt_undo_ratings_t::imgid, MAX, MIN, darktable_t::signals, and TRUE.
Referenced by dt_ratings_apply_on_image(), and dt_ratings_apply_on_list().
|
static |
|
static |
Referenced by dt_ratings_apply_on_image(), and dt_ratings_apply_on_list().
void dt_ratings_apply_on_image | ( | const int32_t | imgid, |
const int | rating, | ||
const gboolean | single_star_toggle, | ||
const gboolean | undo_on, | ||
const gboolean | group_on | ||
) |
apply rating to the specified image
References _pop_undo(), _ratings_apply(), _ratings_undo_data_free(), darktable, dt_control_log(), dt_grouping_add_grouped_images(), dt_undo_end_group(), DT_UNDO_RATINGS, dt_undo_record(), dt_undo_start_group(), DT_VIEW_REJECT, g_list_shorter_than(), and darktable_t::undo.
Referenced by _event_rating_release(), and dt_lightroom_import().
void dt_ratings_apply_on_list | ( | GList * | list, |
const int | rating, | ||
const gboolean | undo_on | ||
) |
apply rating to all images in the list
References _pop_undo(), _ratings_apply(), _ratings_undo_data_free(), darktable_t::collection, darktable, dt_collection_hint_message(), dt_ratings_get_name(), dt_toast_log(), dt_undo_end_group(), DT_UNDO_RATINGS, dt_undo_record(), dt_undo_start_group(), and darktable_t::undo.
Referenced by _rating_callback().
int dt_ratings_get | ( | const int32_t | imgid | ) |
get rating for the specified image
References darktable, dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_REJECTED, DT_VIEW_RATINGS_MASK, DT_VIEW_REJECT, dt_image_t::flags, and darktable_t::image_cache.
Referenced by _ratings_apply().
char * dt_ratings_get_name | ( | const int | rating | ) |
Referenced by dt_ratings_apply_on_list().