![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "system/macros.h"#include "common/act_on.h"#include "colorprofiles/colorspaces.h"#include "system/mem_alloc.h"#include "common/module_versioning.h"#include "common/paths.h"#include "widgets/gdkkeys.h"#include "common/datetime.h"#include "common/file_location.h"#include "common/image.h"#include "caches/image_cache.h"#include "common/variables.h"#include "control/control.h"#include "control/jobs.h"#include "control/signal.h"#include "gui/application.h"#include "widgets/gtkentry.h"#include "libs/lib.h"#include "views/view.h"#include <glib.h>#include <glib/gstdio.h>#include <limits.h>#include <stdlib.h>#include <string.h>#include "widgets/label.h"#include "widgets/popup.h"#include "widgets/scroll_wrap.h"#include "widgets/widget_settings.h"
Include dependency graph for textnotes.c:Go to the source code of this file.
Data Structures | |
| struct | dt_lib_textnotes_t |
| struct | dt_textnotes_load_job_t |
| struct | dt_textnotes_load_result_t |
Typedefs | |
| typedef struct dt_lib_textnotes_t | dt_lib_textnotes_t |
| typedef struct dt_textnotes_load_job_t | dt_textnotes_load_job_t |
| typedef struct dt_textnotes_load_result_t | dt_textnotes_load_result_t |
|
static |
Definition at line 1517 of file textnotes.c.
References d, FALSE, IS_NULL_PTR, and L.
Referenced by _load_for_image(), _textnotes_load_finish_idle(), and _update_mtime_label().
|
static |
Definition at line 1749 of file textnotes.c.
References d, dt_variables_params_destroy(), IS_NULL_PTR, and L.
Referenced by _load_for_image(), and gui_cleanup().
Definition at line 544 of file textnotes.c.
References dt_colorprofiles_srgb_to_display_strided(), IS_NULL_PTR, and L.
|
static |
Definition at line 355 of file textnotes.c.
References _completion_hide(), COMPL_VARNAME, d, dt_lib_module_t::data, dt_free, FALSE, IS_NULL_PTR, L, model, and TRUE.
Referenced by _completion_row_activated(), and _edit_key_press().
|
static |
Definition at line 294 of file textnotes.c.
References _completion_match(), COMPL_DESCRIPTION, COMPL_VARNAME, d, dt_gtkentry_get_default_path_compl_list(), IS_NULL_PTR, and L.
Referenced by _completion_update().
|
static |
Definition at line 310 of file textnotes.c.
References d, dt_free, FALSE, IS_NULL_PTR, L, p, and TRUE.
Referenced by _completion_update().
|
static |
Definition at line 445 of file textnotes.c.
References _completion_hide(), _save_now(), d, dt_lib_module_t::data, IS_NULL_PTR, and L.
Referenced by _textview_focus_out().
|
static |
Definition at line 257 of file textnotes.c.
References d, IS_NULL_PTR, and L.
Referenced by _completion_apply_selected(), _completion_focus_out_idle(), _completion_update(), _edit_key_press(), and _toggle_mode().
Definition at line 270 of file textnotes.c.
References dt_free, FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by _completion_fill().
|
static |
Definition at line 506 of file textnotes.c.
References _completion_apply_selected(), L, and void().
Referenced by _setup_completion().
|
static |
Definition at line 384 of file textnotes.c.
References _completion_fill(), _completion_find_prefix(), _completion_hide(), d, dt_lib_module_t::data, dt_free, dt_gui_get_popup_relative_widget(), IS_NULL_PTR, L, model, TRUE, rect::width, rect::x, and rect::y.
Referenced by _edit_button_release(), _edit_key_release(), and _textbuffer_changed().
|
static |
Definition at line 498 of file textnotes.c.
References _completion_update(), FALSE, and void().
Referenced by gui_init().
|
static |
Definition at line 467 of file textnotes.c.
References _completion_apply_selected(), _completion_hide(), d, dt_lib_module_t::data, dt_keys_mainpad_alternatives(), FALSE, IS_NULL_PTR, key, L, TRUE, and void().
Referenced by gui_init().
|
static |
Definition at line 490 of file textnotes.c.
References _completion_update(), FALSE, and void().
Referenced by gui_init().
|
static |
Definition at line 1710 of file textnotes.c.
References _update_for_current_image().
Referenced by gui_init().
Definition at line 1725 of file textnotes.c.
References dt_image_cache_get(), DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), DT_IMAGE_HAS_TXT, dt_image_t::flags, and IS_NULL_PTR.
Referenced by _save_and_render(), and _textnotes_load_finish_idle().
|
static |
Definition at line 580 of file textnotes.c.
References _set_image_paths(), d, dt_free, dt_variables_expand(), dt_variables_params_init(), dt_variables_params_t::escape_markup, FALSE, dt_variables_params_t::filename, dt_variables_params_t::imgid, IS_NULL_PTR, dt_variables_params_t::jobcode, L, dt_variables_params_t::sequence, and TRUE.
Referenced by _render_preview().
|
static |
Definition at line 138 of file textnotes.c.
Referenced by _get_edit_text(), and _toggle_checklist_at_line().
|
static |
Definition at line 145 of file textnotes.c.
References _get_buffer_text(), d, IS_NULL_PTR, and L.
Referenced by _render_preview_from_edit(), _save_and_render(), _toggle_mode(), and get_params().
Definition at line 2011 of file textnotes.c.
References _update_for_current_image().
Referenced by gui_cleanup(), and gui_init().
Definition at line 1738 of file textnotes.c.
References dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_HAS_TXT, FALSE, dt_image_t::flags, IS_NULL_PTR, and L.
Referenced by _load_for_image(), and _update_mtime_label().
|
static |
Definition at line 1715 of file textnotes.c.
References _update_for_current_image(), d, dt_lib_module_t::data, IS_NULL_PTR, and L.
Referenced by gui_init().
|
static |
Definition at line 1950 of file textnotes.c.
References _clear_mtime_label(), _clear_variables_cache(), _image_has_txt_flag(), _set_edit_text(), _text_sidecar_save_path(), _textnotes_load_job_cleanup(), _textnotes_load_job_run(), _textnotes_load_job_state(), d, dt_lib_module_t::data, dt_control_add_job(), dt_control_get_global(), dt_control_job_create(), dt_control_job_set_params(), dt_control_job_set_state_callback(), dt_free, DT_JOB_QUEUE_USER_BG, FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by _update_for_current_image().
Definition at line 2017 of file textnotes.c.
References _update_for_current_image().
Referenced by gui_cleanup(), and gui_init().
Definition at line 563 of file textnotes.c.
References dt_control_log(), dt_gui_get_global(), dt_gui_get_ui(), dt_gui_main_window(), error(), IS_NULL_PTR, and L.
Referenced by _preview_button_press().
|
static |
Definition at line 1616 of file textnotes.c.
References _open_uri(), _toggle_checklist_at_line(), FALSE, L, t, TRUE, and view.
Referenced by gui_init().
|
static |
Definition at line 1700 of file textnotes.c.
References _render_preview_from_edit(), d, dt_lib_module_t::data, IS_NULL_PTR, L, and void().
Referenced by gui_init().
|
static |
Definition at line 217 of file textnotes.c.
References d, IS_NULL_PTR, and L.
|
static |
Re-render the preview when the panel-given width changes, so embedded images rescale to fit the available width instead of forcing their parents to grow.
The handler is connected to the preview scrolled window, whose width is driven top-down by the panel (not by the rendered content), so it is a stable reference. We only re-render on a meaningful width change and never while a render is already running, which keeps this from looping (a re-render at an unchanged width produces the same layout, hence no further width change).
Definition at line 245 of file textnotes.c.
References _render_preview_from_edit(), ABS, d, dt_lib_module_t::data, DT_PIXEL_APPLY_DPI, IS_NULL_PTR, and L.
Referenced by gui_init().
|
static |
Definition at line 1687 of file textnotes.c.
References _render_preview_from_edit(), d, dt_lib_module_t::data, IS_NULL_PTR, and L.
|
static |
Definition at line 1330 of file textnotes.c.
References _expand_text_for_preview(), d, dt_free, dt_lib_gui_get_expanded(), FALSE, IS_NULL_PTR, L, t, and TRUE.
Referenced by _render_preview_from_edit(), _save_and_render(), _textnotes_load_finish_idle(), _toggle_checklist_at_line(), and _toggle_mode().
|
static |
Definition at line 228 of file textnotes.c.
References _get_edit_text(), _render_preview(), d, dt_free, and IS_NULL_PTR.
Referenced by _preview_map(), _preview_width_changed(), and _refresh_preview_idle().
|
static |
Definition at line 1829 of file textnotes.c.
References _ensure_has_txt_flag(), _get_edit_text(), _render_preview(), _update_mtime_label(), d, dt_lib_module_t::data, dt_control_log(), dt_free, error(), FALSE, IS_NULL_PTR, and L.
Referenced by _save_now(), and _save_timeout_cb().
|
static |
Definition at line 1864 of file textnotes.c.
References _save_and_render(), d, dt_lib_module_t::data, and L.
Referenced by _completion_focus_out_idle(), _update_for_current_image(), and set_params().
|
static |
Definition at line 1855 of file textnotes.c.
References _save_and_render(), d, dt_lib_module_t::data, and L.
Referenced by _textbuffer_changed().
|
static |
Definition at line 152 of file textnotes.c.
References d, FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by _load_for_image(), _textnotes_load_finish_idle(), and set_params().
|
static |
Definition at line 1756 of file textnotes.c.
References d, dt_free, dt_image_full_path(), DT_PATH_MAX, FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by _expand_text_for_preview(), and _text_sidecar_save_path().
|
static |
Definition at line 515 of file textnotes.c.
References _completion_row_activated(), COMPL_DESCRIPTION, d, dt_lib_module_t::data, dt_gui_get_popup_relative_widget(), FALSE, IS_NULL_PTR, and L.
Referenced by gui_init().
|
static |
Definition at line 1784 of file textnotes.c.
References _set_image_paths(), d, dt_image_build_text_path_from_path(), IS_NULL_PTR, and L.
Referenced by _load_for_image().
|
static |
Definition at line 1875 of file textnotes.c.
References _completion_update(), _save_timeout_cb(), d, dt_lib_module_t::data, L, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 1916 of file textnotes.c.
References _clear_mtime_label(), _ensure_has_txt_flag(), _render_preview(), _set_edit_text(), _toggle_mode(), _update_mtime_label(), cleanup(), d, dt_lib_module_t::data, dt_free, FALSE, IS_NULL_PTR, L, dt_textnotes_load_result_t::loaded, dt_textnotes_load_result_t::self, dt_textnotes_load_result_t::text, dt_textnotes_load_result_t::token, and TRUE.
Referenced by _textnotes_load_job_state().
Definition at line 1804 of file textnotes.c.
References dt_free, and IS_NULL_PTR.
Referenced by _load_for_image().
Definition at line 1792 of file textnotes.c.
References dt_control_job_get_params(), IS_NULL_PTR, L, and TRUE.
Referenced by _load_for_image().
|
static |
Definition at line 1813 of file textnotes.c.
References _textnotes_load_finish_idle(), dt_control_job_get_params(), DT_JOB_STATE_FINISHED, IS_NULL_PTR, L, dt_textnotes_load_result_t::loaded, dt_textnotes_load_result_t::self, state, dt_textnotes_load_result_t::text, and dt_textnotes_load_result_t::token.
Referenced by _load_for_image().
|
static |
Definition at line 1892 of file textnotes.c.
References _completion_focus_out_idle(), d, dt_lib_module_t::data, FALSE, L, and void().
Referenced by gui_init().
|
static |
Definition at line 1561 of file textnotes.c.
References _get_buffer_text(), _render_preview(), _toggle_mode(), d, dt_lib_module_t::data, dt_free, FALSE, L, and TRUE.
Referenced by _preview_button_press().
|
static |
Definition at line 1900 of file textnotes.c.
References _completion_hide(), _get_edit_text(), _render_preview(), d, dt_lib_module_t::data, dt_free, L, and preview.
Referenced by _textnotes_load_finish_idle(), _toggle_checklist_at_line(), and gui_init().
|
static |
Definition at line 2023 of file textnotes.c.
References _load_for_image(), _save_now(), d, dt_lib_module_t::data, dt_act_on_get_first_image(), dt_control_get_mouse_over_id(), dt_lib_gui_get_expanded(), IS_NULL_PTR, and L.
Referenced by _edit_map(), _image_changed_callback(), _initial_load_idle(), _mouse_over_image_callback(), and gui_init().
|
static |
Definition at line 1524 of file textnotes.c.
References _clear_mtime_label(), _image_has_txt_flag(), d, dt_lib_module_t::data, dt_datetime_gdatetime_to_local(), dt_free, dt_lib_gui_get_expanded(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by _save_and_render(), and _textnotes_load_finish_idle().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
Definition at line 100 of file textnotes.c.
References DT_UI_CONTAINER_PANEL_LEFT_CENTER.
| void * get_params | ( | dt_lib_module_t * | self, |
| int * | size | ||
| ) |
Definition at line 161 of file textnotes.c.
References _get_edit_text(), d, dt_lib_module_t::data, IS_NULL_PTR, L, and size.
| void gui_cleanup | ( | dt_lib_module_t * | self | ) |
Definition at line 2139 of file textnotes.c.
References _clear_variables_cache(), _image_changed_callback(), _mouse_over_image_callback(), d, dt_lib_module_t::data, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, IS_NULL_PTR, and L.
| void gui_init | ( | dt_lib_module_t * | self | ) |
Definition at line 2041 of file textnotes.c.
References _edit_button_release(), _edit_key_press(), _edit_key_release(), _edit_map(), _image_changed_callback(), _initial_load_idle(), _mouse_over_image_callback(), _preview_button_press(), _preview_map(), _preview_width_changed(), _setup_completion(), _textbuffer_changed(), _textview_focus_out(), _toggle_mode(), _update_for_current_image(), d, dt_lib_module_t::data, dt_accels_disconnect_on_text_input(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_GUI_BOX_SPACING, dt_gui_textview_set_padding(), DT_SIGNAL_DEVELOP_IMAGE_CHANGED, DT_SIGNAL_DEVELOP_INITIALIZE, DT_SIGNAL_MOUSE_OVER_IMAGE_CHANGE, DT_UI_RESIZE_STATIC, dt_ui_scroll_wrap(), dt_ui_scroll_wrap_get_scrolled_window(), FALSE, L, TRUE, and dt_lib_module_t::widget.
| void init_presets | ( | dt_lib_module_t * | self | ) |
Definition at line 190 of file textnotes.c.
References dt_lib_presets_add(), L, dt_lib_module_t::plugin_name, and TRUE.
| const char * name | ( | dt_lib_module_t * | self | ) |
Definition at line 89 of file textnotes.c.
References L.
| int position | ( | ) |
Definition at line 105 of file textnotes.c.
| int set_params | ( | dt_lib_module_t * | self, |
| const void * | params, | ||
| int | size | ||
| ) |
Definition at line 174 of file textnotes.c.
References _save_now(), _set_edit_text(), d, dt_lib_module_t::data, dt_free, IS_NULL_PTR, L, size, and TRUE.
| const char ** views | ( | dt_lib_module_t * | self | ) |
Definition at line 94 of file textnotes.c.