![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "common/collection.h"#include "common/debug.h"#include "common/map_locations.h"#include "control/conf.h"#include "control/control.h"#include "libs/lib.h"
Include dependency graph for libs/map_locations.c:Go to the source code of this file.
Data Structures | |
| struct | dt_lib_map_locations_t |
| struct | dt_loc_op_t |
Typedefs | |
| typedef struct dt_lib_map_locations_t | dt_lib_map_locations_t |
| typedef struct dt_loc_op_t | dt_loc_op_t |
| typedef enum dt_map_positions_cols_t | dt_map_positions_cols_t |
| typedef enum dt_map_position_name_sort_id | dt_map_position_name_sort_id |
Enumerations | |
| enum | dt_map_positions_cols_t { DT_MAP_LOCATION_COL_ID = 0 , DT_MAP_LOCATION_COL_TAG , DT_MAP_LOCATION_COL_PATH , DT_MAP_LOCATION_COL_COUNT , DT_MAP_LOCATION_NUM_COLS } |
| enum | dt_map_position_name_sort_id { DT_MAP_POSITION_SORT_NAME_ID } |
Functions | |
| static void | _signal_location_change (dt_lib_module_t *self) |
| static void | _show_location (dt_lib_module_t *self) |
| const char * | name (struct dt_lib_module_t *self) |
| const char ** | views (dt_lib_module_t *self) |
| uint32_t | container (dt_lib_module_t *self) |
| int | position () |
| static gboolean | _mouse_scroll (GtkWidget *treeview, GdkEventScroll *event, dt_lib_module_t *self) |
| static gboolean | _find_tag_iter_id (GtkTreeModel *model, GtkTreeIter *iter, const guint locid) |
| static void | _locations_tree_update (dt_lib_module_t *self, const guint locid) |
| static void | _display_buttons (dt_lib_module_t *self) |
| static void | _tree_name_show (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) |
| static void | _new_button_clicked (GtkButton *button, dt_lib_module_t *self) |
| static void | _shape_button_clicked (GtkButton *button, dt_lib_module_t *self) |
| static void | _show_all_button_clicked (GtkButton *button, dt_lib_module_t *self) |
| static void | _delete_tree_path (GtkTreeModel *model, GtkTreeIter *iter, gboolean root) |
| static gboolean | _update_tag_name_per_name (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, dt_loc_op_t *to) |
| static void | _view_map_geotag_changed (gpointer instance, GList *imgs, const int newlocid, dt_lib_module_t *self) |
| static void | _view_map_location_changed (gpointer instance, GList *polygons, dt_lib_module_t *self) |
| static void | _name_editing_done (GtkCellEditable *editable, dt_lib_module_t *self) |
| static void | _name_start_editing (GtkCellRenderer *renderer, GtkCellEditable *editable, char *path, dt_lib_module_t *self) |
| static gint | _sort_position_names_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, dt_lib_module_t *self) |
| static void | _pop_menu_edit_location (GtkWidget *menuitem, dt_lib_module_t *self) |
| static void | _pop_menu_delete_location (GtkWidget *menuitem, dt_lib_module_t *self) |
| static gboolean | _set_location_collection (dt_lib_module_t *self) |
| static void | _pop_menu_update_filmstrip (GtkWidget *menuitem, dt_lib_module_t *self) |
| static void | _pop_menu_goto_collection (GtkWidget *menuitem, dt_lib_module_t *self) |
| static void | _pop_menu_view (GtkWidget *view, GdkEventButton *event, dt_lib_module_t *self) |
| static gboolean | _force_selection_changed (gpointer user_data) |
| static void | _selection_changed (GtkTreeSelection *selection, dt_lib_module_t *self) |
| static gboolean | _click_on_view (GtkWidget *view, GdkEventButton *event, dt_lib_module_t *self) |
| void | gui_init (dt_lib_module_t *self) |
| void | gui_cleanup (dt_lib_module_t *self) |
Variables | |
| const DTGTKCairoPaintIconFunc | location_shapes [] |
| typedef struct dt_lib_map_locations_t dt_lib_map_locations_t |
| typedef struct dt_loc_op_t dt_loc_op_t |
| typedef enum dt_map_position_name_sort_id dt_map_position_name_sort_id |
| typedef enum dt_map_positions_cols_t dt_map_positions_cols_t |
| Enumerator | |
|---|---|
| DT_MAP_POSITION_SORT_NAME_ID | |
Definition at line 95 of file libs/map_locations.c.
| Enumerator | |
|---|---|
| DT_MAP_LOCATION_COL_ID | |
| DT_MAP_LOCATION_COL_TAG | |
| DT_MAP_LOCATION_COL_PATH | |
| DT_MAP_LOCATION_COL_COUNT | |
| DT_MAP_LOCATION_NUM_COLS | |
Definition at line 86 of file libs/map_locations.c.
|
static |
Definition at line 870 of file libs/map_locations.c.
References _display_buttons(), _force_selection_changed(), _pop_menu_view(), button_pressed(), d, dt_lib_module_t::data, dt_control_log(), dt_modifier_is(), FALSE, TRUE, and view().
Referenced by gui_init().
|
static |
Definition at line 374 of file libs/map_locations.c.
References _delete_tree_path(), dt_free, DT_MAP_LOCATION_COL_PATH, FALSE, model, and TRUE.
Referenced by _delete_tree_path(), _name_editing_done(), and _pop_menu_delete_location().
|
static |
Definition at line 259 of file libs/map_locations.c.
References d, dt_lib_module_t::data, and model.
Referenced by _click_on_view(), _name_editing_done(), _pop_menu_delete_location(), _pop_menu_edit_location(), _selection_changed(), _view_map_geotag_changed(), and gui_init().
|
static |
Definition at line 126 of file libs/map_locations.c.
References _find_tag_iter_id(), DT_MAP_LOCATION_COL_ID, FALSE, and model.
Referenced by _find_tag_iter_id(), _locations_tree_update(), and _view_map_geotag_changed().
|
static |
Definition at line 846 of file libs/map_locations.c.
References d, dt_lib_module_t::data, and FALSE.
Referenced by _click_on_view().
|
static |
Definition at line 151 of file libs/map_locations.c.
References _find_tag_iter_id(), d, dt_lib_module_t::data, dt_free, DT_MAP_LOCATION_COL_COUNT, DT_MAP_LOCATION_COL_ID, DT_MAP_LOCATION_COL_PATH, DT_MAP_LOCATION_COL_TAG, dt_map_location_free_result(), dt_map_location_get_locations_by_path(), DT_MAP_POSITION_SORT_NAME_ID, dt_sort_tag(), dt_util_dstrcat(), FALSE, i, IS_NULL_PTR, model, and TRUE.
Referenced by _name_editing_done(), _pop_menu_delete_location(), and gui_init().
|
static |
Definition at line 104 of file libs/map_locations.c.
References d, dt_lib_module_t::data, dt_conf_set_int(), dt_modifier_is(), DT_PIXEL_APPLY_DPI, FALSE, height, TRUE, and width.
Referenced by gui_init().
|
static |
Definition at line 501 of file libs/map_locations.c.
References _delete_tree_path(), _display_buttons(), _locations_tree_update(), _signal_location_change(), _update_tag_name_per_name(), d, darktable, dt_lib_module_t::data, dt_conf_get_int(), dt_control_log(), dt_free, DT_MAP_LOCATION_COL_COUNT, DT_MAP_LOCATION_COL_ID, DT_MAP_LOCATION_COL_PATH, DT_MAP_LOCATION_COL_TAG, dt_map_location_free_result(), dt_map_location_get_images_count(), dt_map_location_get_locations_by_path(), dt_map_location_new(), dt_map_location_rename(), FALSE, g, leave(), model, name, dt_loc_op_t::newtagname, dt_loc_op_t::oldtagname, reset(), dt_map_location_data_t::shape, TRUE, and darktable_t::view_manager.
Referenced by _name_start_editing().
|
static |
Definition at line 642 of file libs/map_locations.c.
References _name_editing_done(), d, dt_lib_module_t::data, dt_free, DT_MAP_LOCATION_COL_TAG, model, and name.
Referenced by gui_init().
|
static |
Definition at line 303 of file libs/map_locations.c.
References d, dt_lib_module_t::data, dt_free, DT_MAP_LOCATION_COL_COUNT, DT_MAP_LOCATION_COL_ID, DT_MAP_LOCATION_COL_PATH, DT_MAP_LOCATION_COL_TAG, dt_map_location_name_exists(), dt_util_dstrcat(), i, model, name, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 697 of file libs/map_locations.c.
References _delete_tree_path(), _display_buttons(), _locations_tree_update(), _signal_location_change(), d, darktable, dt_lib_module_t::data, DT_MAP_LOCATION_COL_ID, dt_map_location_delete(), MAP_LOCATION_ACTION_REMOVE, model, TRUE, and darktable_t::view_manager.
Referenced by _pop_menu_view().
|
static |
Definition at line 681 of file libs/map_locations.c.
References _display_buttons(), d, dt_lib_module_t::data, model, and TRUE.
Referenced by _pop_menu_view().
|
static |
Definition at line 790 of file libs/map_locations.c.
References _set_location_collection(), darktable, dt_view_manager_switch(), and darktable_t::view_manager.
Referenced by _pop_menu_view().
|
static |
Definition at line 785 of file libs/map_locations.c.
References _set_location_collection().
Referenced by _pop_menu_view().
|
static |
Definition at line 796 of file libs/map_locations.c.
References _pop_menu_delete_location(), _pop_menu_edit_location(), _pop_menu_goto_collection(), _pop_menu_update_filmstrip(), DT_MAP_LOCATION_COL_ID, FALSE, model, and view().
Referenced by _click_on_view().
|
static |
Definition at line 854 of file libs/map_locations.c.
References _display_buttons(), _show_location(), d, darktable, dt_lib_module_t::data, MAP_LOCATION_ACTION_REMOVE, model, and darktable_t::view_manager.
Referenced by gui_init().
|
static |
Definition at line 764 of file libs/map_locations.c.
References d, dt_lib_module_t::data, dt_collection_deserialize(), DT_COLLECTION_PROP_GEOTAGGING, dt_free, DT_MAP_LOCATION_COL_PATH, FALSE, model, name, and TRUE.
Referenced by _pop_menu_goto_collection(), and _pop_menu_update_filmstrip().
|
static |
Definition at line 349 of file libs/map_locations.c.
References d, dt_lib_module_t::data, dt_conf_get_int(), dt_conf_set_int(), dtgtk_togglebutton_set_paint(), FALSE, IS_NULL_PTR, location_shapes, and MAP_LOCATION_SHAPE_POLYGONS.
Referenced by gui_init().
|
static |
Definition at line 365 of file libs/map_locations.c.
References d, darktable, dt_lib_module_t::data, dt_conf_set_bool(), MAP_LOCATION_ACTION_UPDATE_OTHERS, and darktable_t::view_manager.
Referenced by gui_init().
|
static |
Definition at line 739 of file libs/map_locations.c.
References d, darktable, dt_lib_module_t::data, dt_free, DT_MAP_LOCATION_COL_ID, dt_map_location_get_data(), MAP_LOCATION_ACTION_REMOVE, model, p, and darktable_t::view_manager.
Referenced by _selection_changed(), and _view_map_geotag_changed().
|
static |
Definition at line 494 of file libs/map_locations.c.
References _view_map_geotag_changed(), darktable, dt_control_signal_block_by_func(), dt_control_signal_unblock_by_func(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_GEOTAG_CHANGED, and darktable_t::signals.
Referenced by _name_editing_done(), and _pop_menu_delete_location().
|
static |
Definition at line 665 of file libs/map_locations.c.
References dt_free, DT_MAP_LOCATION_COL_PATH, IS_NULL_PTR, and model.
Referenced by gui_init().
|
static |
Definition at line 275 of file libs/map_locations.c.
References dt_free, DT_MAP_LOCATION_COL_COUNT, DT_MAP_LOCATION_COL_ID, DT_MAP_LOCATION_COL_PATH, DT_MAP_LOCATION_COL_TAG, model, and name.
Referenced by gui_init().
|
static |
Definition at line 391 of file libs/map_locations.c.
References dt_free, DT_MAP_LOCATION_COL_PATH, DT_MAP_LOCATION_COL_TAG, FALSE, model, dt_loc_op_t::newtagname, and dt_loc_op_t::oldtagname.
Referenced by _name_editing_done().
|
static |
Definition at line 421 of file libs/map_locations.c.
References _display_buttons(), _find_tag_iter_id(), _show_location(), d, dt_lib_module_t::data, DT_MAP_LOCATION_COL_COUNT, dt_map_location_find_locations(), dt_map_location_free_result(), dt_map_location_get_locations_by_path(), dt_map_location_update_locations(), FALSE, model, and TRUE.
Referenced by _signal_location_change(), gui_cleanup(), and gui_init().
|
static |
Definition at line 479 of file libs/map_locations.c.
References d, dt_lib_module_t::data, dt_conf_get_int(), dt_conf_set_int(), dtgtk_togglebutton_set_paint(), IS_NULL_PTR, location_shapes, MAP_LOCATION_SHAPE_ELLIPSE, and MAP_LOCATION_SHAPE_POLYGONS.
Referenced by gui_cleanup(), and gui_init().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
Definition at line 55 of file libs/map_locations.c.
References DT_UI_CONTAINER_PANEL_RIGHT_CENTER.
| void gui_cleanup | ( | dt_lib_module_t * | self | ) |
Definition at line 1030 of file libs/map_locations.c.
References _view_map_geotag_changed(), _view_map_location_changed(), darktable, dt_lib_module_t::data, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, IS_NULL_PTR, and darktable_t::signals.
| void gui_init | ( | dt_lib_module_t * | self | ) |
Definition at line 929 of file libs/map_locations.c.
References _click_on_view(), _display_buttons(), _locations_tree_update(), _mouse_scroll(), _name_start_editing(), _new_button_clicked(), _selection_changed(), _shape_button_clicked(), _show_all_button_clicked(), _sort_position_names_func(), _tree_name_show(), _view_map_geotag_changed(), _view_map_location_changed(), d, darktable, dt_lib_module_t::data, dt_action_button_new(), dt_conf_get_int(), dt_conf_set_bool(), dt_conf_set_int(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), DT_GUI_BOX_SPACING, DT_MAP_LOCATION_COL_TAG, DT_MAP_LOCATION_NUM_COLS, DT_MAP_POSITION_SORT_NAME_ID, DT_PIXEL_APPLY_DPI, DT_SIGNAL_GEOTAG_CHANGED, DT_SIGNAL_LOCATION_CHANGED, dtgtk_togglebutton_new(), FALSE, height, location_shapes, MAP_LOCATION_SHAPE_ELLIPSE, MAP_LOCATION_SHAPE_POLYGONS, darktable_t::signals, TRUE, view(), and dt_lib_module_t::widget.
| const char * name | ( | struct dt_lib_module_t * | self | ) |
Definition at line 44 of file libs/map_locations.c.
| int position | ( | ) |
Definition at line 81 of file libs/map_locations.c.
| const char ** views | ( | dt_lib_module_t * | self | ) |
Definition at line 49 of file libs/map_locations.c.
References v.
| const DTGTKCairoPaintIconFunc location_shapes[] |
Definition at line 100 of file libs/map_locations.c.
Referenced by _shape_button_clicked(), _view_map_location_changed(), and gui_init().