![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "gui/common/database_gui.h"#include "database/database.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "widgets/dialog.h"#include <glib/gi18n.h>#include <glib/gstdio.h>#include <stdio.h>
Include dependency graph for database_gui.c:Go to the source code of this file.
Functions | |
| gboolean | dt_database_show_error (void) |
| static dt_database_response_t | _prompt_upgrade (const dt_database_prompt_context_t *context) |
| static dt_database_response_t | _prompt_maintenance (const dt_database_prompt_context_t *context) |
| static dt_database_response_t | _database_prompt (const dt_database_prompt_context_t *context) |
| void | dt_database_gui_register_handlers (void) |
|
static |
Definition at line 181 of file database_gui.c.
References _prompt_maintenance(), _prompt_upgrade(), dt_database_prompt_context_t::dbfilename, DT_DATABASE_PROMPT_MAINTENANCE, DT_DATABASE_PROMPT_READONLY, DT_DATABASE_PROMPT_UPGRADE, DT_DATABASE_RESPONSE_CLOSE, DT_DATABASE_RESPONSE_DELETE, DT_DATABASE_RESPONSE_RESTORE, dt_free, IS_NULL_PTR, L, dt_database_prompt_context_t::prompt, dt_database_prompt_context_t::quick_check, and dt_database_prompt_context_t::snapshot_available.
Referenced by dt_database_gui_register_handlers().
|
static |
Definition at line 146 of file database_gui.c.
References dt_database_prompt_context_t::ask_on_close, dt_database_prompt_context_t::ask_on_startup, dt_database_prompt_context_t::at_close, DT_DATABASE_RESPONSE_CLOSE, DT_DATABASE_RESPONSE_PROCEED, dt_free, dt_gui_show_standalone_yes_no_dialog(), L, and dt_database_prompt_context_t::reclaimable_bytes.
Referenced by _database_prompt().
|
static |
Definition at line 126 of file database_gui.c.
References dt_database_prompt_context_t::dbfilename, DT_DATABASE_RESPONSE_CLOSE, DT_DATABASE_RESPONSE_PROCEED, dt_free, dt_gui_show_standalone_yes_no_dialog(), and L.
Referenced by _database_prompt().
Register the handler database/database.c puts its prompts through. Must be called BEFORE dt_database_open(), so darktable.c does it – dt_gui_gtk_init() runs too late. See dt_database_set_prompt_handler().
Definition at line 266 of file database_gui.c.
References _database_prompt(), and dt_database_set_prompt_handler().
Referenced by dt_init().
| gboolean dt_database_show_error | ( | void | ) |
Report why the database would not open, and offer to quit, retry, or delete the lock files. Consumes the database's pending error.
Returns TRUE if the failure is fatal, FALSE if the caller should try opening again – the caller's init loop in darktable.c closes and re-runs dt_database_open() on FALSE.
Postponed until after dbus has been tried, so another running instance gets the chance to answer first.
Definition at line 35 of file database_gui.c.
References dt_database_delete_lock_files(), dt_database_error_free(), dt_database_take_error(), dt_free, dt_gui_show_standalone_three_choice_dialog(), dt_gui_show_standalone_yes_no_dialog(), error(), FALSE, IS_NULL_PTR, L, and TRUE.
Referenced by dt_init().