![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "gui/closing.h"#include "common/logging.h"#include "control/control.h"#include "control/jobs.h"#include "control/progress.h"#include "gui/application.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "widgets/dialog.h"#include "widgets/widget_settings.h"#include "widgets/widget_style.h"#include <glib/gi18n.h>#include <gtk/gtk.h>
Include dependency graph for closing.c:Go to the source code of this file.
Data Structures | |
| struct | dt_closing_t |
| struct | dt_closing_job_t |
Macros | |
| #define | DT_CLOSING_NOTICE_DELAY (G_USEC_PER_SEC) |
| #define | DT_CLOSING_POLL_INTERVAL 100 |
| #define | DT_CLOSING_KIND_DARKROOM DT_JOB_QUEUE_MAX |
Typedefs | |
| typedef enum dt_closing_mode_t | dt_closing_mode_t |
| typedef struct dt_closing_t | dt_closing_t |
| typedef struct dt_closing_job_t | dt_closing_job_t |
Enumerations | |
| enum | dt_closing_mode_t { DT_CLOSING_CONFIRM , DT_CLOSING_WAIT } |
| enum | { DT_CLOSING_COL_KIND , DT_CLOSING_COL_DESCRIPTION , DT_CLOSING_COLS } |
| #define DT_CLOSING_KIND_DARKROOM DT_JOB_QUEUE_MAX |
| #define DT_CLOSING_NOTICE_DELAY (G_USEC_PER_SEC) |
|
static |
Definition at line 91 of file closing.c.
References L, dt_closing_t::loop, and dt_closing_t::quit.
Referenced by _closing_back_clicked(), _closing_confirm_delete(), _closing_confirm_key(), _closing_confirm_poll(), and _closing_quit_clicked().
|
static |
Definition at line 102 of file closing.c.
References _closing_answer(), and FALSE.
Referenced by _closing_window_new().
|
static |
Definition at line 312 of file closing.c.
References description(), DT_CLOSING_KIND_DARKROOM, dt_closing_job_t::kind, and L.
Referenced by _closing_details_update().
Definition at line 461 of file closing.c.
References _closing_confirm_poll(), _closing_nothing_pending(), _closing_refresh(), _closing_window_new(), DT_CLOSING_CONFIRM, DT_CLOSING_POLL_INTERVAL, dt_free, dt_gui_main_window(), dt_gui_refocus_parent(), FALSE, L, dt_closing_t::listed, dt_closing_t::loop, dt_closing_t::mode, dt_closing_t::quit, TRUE, and dt_closing_t::window.
Referenced by dt_gui_closing_quit().
|
static |
Definition at line 108 of file closing.c.
References _closing_answer(), FALSE, and TRUE.
Referenced by _closing_window_new().
|
static |
Definition at line 115 of file closing.c.
References _closing_answer(), FALSE, L, and TRUE.
Referenced by _closing_window_new().
|
static |
Definition at line 447 of file closing.c.
References _closing_answer(), _closing_nothing_pending(), _closing_refresh(), L, and TRUE.
Referenced by _closing_confirm().
|
static |
Definition at line 380 of file closing.c.
Referenced by _closing_running_jobs().
|
static |
Definition at line 325 of file closing.c.
References _closing_collect_job(), _closing_job_clear(), _closing_kind_name(), dt_closing_job_t::description, dt_closing_t::details, dt_closing_t::dropped, DT_CLOSING_COL_DESCRIPTION, DT_CLOSING_COL_KIND, DT_CLOSING_CONFIRM, DT_CLOSING_KIND_DARKROOM, dt_control_get_global(), dt_control_queued_jobs_count(), dt_control_running_jobs_foreach(), dt_free, FALSE, i, dt_closing_job_t::kind, L, dt_closing_t::listed, dt_closing_t::mode, dt_closing_t::queued, dt_closing_t::store, and TRUE.
Referenced by _closing_refresh().
Definition at line 306 of file closing.c.
References dt_closing_job_t::description, and dt_free.
Referenced by _closing_details_update().
Definition at line 287 of file closing.c.
References DT_JOB_QUEUE_SYSTEM_BG, DT_JOB_QUEUE_SYSTEM_FG, DT_JOB_QUEUE_USER_BG, DT_JOB_QUEUE_USER_EXPORT, DT_JOB_QUEUE_USER_FG, kind, and L.
Referenced by _closing_details_update().
Definition at line 442 of file closing.c.
References _closing_running_jobs(), dt_control_get_global(), and dt_control_queued_jobs_count().
Referenced by _closing_confirm(), and _closing_confirm_poll().
|
static |
Definition at line 421 of file closing.c.
References _closing_refresh(), _closing_window_new(), DT_CLOSING_NOTICE_DELAY, dt_control_workers_alive(), IS_NULL_PTR, L, dt_closing_t::loop, dt_closing_t::start, and dt_closing_t::window.
Referenced by dt_gui_closing_wait().
|
static |
Definition at line 97 of file closing.c.
References _closing_answer(), and TRUE.
Referenced by _closing_window_new().
|
static |
Definition at line 401 of file closing.c.
References _closing_append_name(), _closing_details_update(), _closing_running_jobs(), dt_closing_t::count, DT_CLOSING_CONFIRM, dt_control_get_global(), dt_control_progress_foreach(), dt_control_workers_alive(), dt_free, L, dt_closing_t::mode, names, dt_closing_t::names, and TRUE.
Referenced by _closing_confirm(), _closing_confirm_poll(), and _closing_poll().
Definition at line 394 of file closing.c.
References _closing_count_job(), dt_control_get_global(), and dt_control_running_jobs_foreach().
Referenced by _closing_nothing_pending(), and _closing_refresh().
|
static |
Definition at line 123 of file closing.c.
References _closing_back_clicked(), _closing_confirm_delete(), _closing_confirm_key(), _closing_quit_clicked(), _closing_refuse_delete(), dt_closing_t::count, dt_closing_t::details, dt_closing_t::dropped, DT_CLOSING_COL_DESCRIPTION, DT_CLOSING_COL_KIND, DT_CLOSING_COLS, DT_CLOSING_CONFIRM, dt_free, dt_gui_add_class(), dt_gui_main_window(), dt_osx_disallow_fullscreen(), dt_osx_focus_window(), DT_PIXEL_APPLY_DPI, FALSE, L, dt_closing_t::mode, dt_closing_t::names, dt_closing_t::store, TRUE, view, and dt_closing_t::window.
Referenced by _closing_confirm(), and _closing_poll().
Quit, as the user asked from the window, the menu or the dock.
While jobs are running or queued – an export, a preload, a thumbnail being rendered: what the closing window would wait for or drop – a modal window first names them and asks whether to quit all the same or go back. Nothing is cancelled either way: a quit finishes the running jobs and drops the queued ones. With no job, the quit starts at once. GUI thread only.
Definition at line 487 of file closing.c.
References _closing_confirm(), and dt_control_quit().
Referenced by append_file(), and dt_gui_quit_callback().
Keep the GUI thread in its main loop until every control worker has returned.
Quitting hides the main window at once, but the jobs running at that moment – an export, the thumbnails being rendered, a pipeline – are finished, not abandoned. When that takes more than a moment, a small window says so, names the jobs that have a name, and goes away with the last of them.
This is the handler dt_control_shutdown() waits in: see dt_control_set_shutdown_wait_handler(). GUI thread only. Returns at once when nothing is running.
Definition at line 492 of file closing.c.
References _closing_poll(), DT_CLOSING_POLL_INTERVAL, DT_CLOSING_WAIT, dt_control_workers_alive(), DT_DEBUG_CONTROL, dt_free, dt_print(), FALSE, IS_NULL_PTR, L, dt_closing_t::listed, dt_closing_t::loop, dt_closing_t::mode, dt_closing_t::start, and dt_closing_t::window.
Referenced by dt_gui_gtk_init().