Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
privacy_consent.c File Reference
#include "gui/privacy_consent.h"
#include <glib/gi18n.h>
#include <string.h>
#include "gui/application.h"
#include "common/conf.h"
#include "widgets/widget_settings.h"
+ Include dependency graph for privacy_consent.c:

Go to the source code of this file.

Macros

#define DT_PRIVACY_ASKED_KEY   "privacy/consent_asked"
 
#define DT_PRIVACY_DOC_URL   "https://ansel.photos/en/doc/data-privacy/"
 

Functions

void dt_privacy_ask_consent (const gboolean have_gui)
 

Macro Definition Documentation

◆ DT_PRIVACY_ASKED_KEY

#define DT_PRIVACY_ASKED_KEY   "privacy/consent_asked"

Definition at line 37 of file privacy_consent.c.

◆ DT_PRIVACY_DOC_URL

#define DT_PRIVACY_DOC_URL   "https://ansel.photos/en/doc/data-privacy/"

Definition at line 41 of file privacy_consent.c.

Function Documentation

◆ dt_privacy_ask_consent()

void dt_privacy_ask_consent ( const gboolean  have_gui)

Show, once, the combined privacy consent dialog.

On first launch (when no decision has been recorded yet) this presents a single dialog with one checkbox per opt-in data flow that was built in:

  • crash reporting (Sentry), writing sentry/enabled,
  • usage analytics (PostHog), writing telemetry/enabled. It links to the user-facing "Data privacy" documentation page so users can read exactly what is collected before deciding, then records the answer so it is never asked again (sentinel privacy/consent_asked).

Must be called BEFORE dt_sentry_init()/dt_telemetry_init() so the per-feature enabled flags are set when those modules read them. No dialog is shown when a decision already exists, when there is no GUI, or when neither crash reporting nor analytics was compiled in.

Parameters
have_guiwhether a GUI is up and a modal dialog may be shown.

Definition at line 43 of file privacy_consent.c.

References DT_BUILD_CHANNEL, dt_conf_get_bool(), dt_conf_key_exists(), dt_conf_set_bool(), dt_gui_get_global(), dt_gui_get_ui(), dt_gui_main_window(), DT_PIXEL_APPLY_DPI, DT_PRIVACY_ASKED_KEY, DT_PRIVACY_DOC_URL, FALSE, and TRUE.

Referenced by dt_init().