79 if(strcmp(_backend_str,
"auto") == 0)
81 const gchar *desktop = getenv(
"XDG_CURRENT_DESKTOP");
82 if(g_strcmp0(desktop,
"KDE") == 0)
84 else if(g_strcmp0(desktop,
"GNOME") == 0)
86 else if(g_strcmp0(desktop,
"Unity") == 0)
88 else if(g_strcmp0(desktop,
"XFCE") == 0)
93 else if(strcmp(_backend_str,
"none") == 0)
96 else if(strcmp(_backend_str,
"libsecret") == 0)
100 else if(strcmp(_backend_str,
"kwallet") == 0)
103 else if(strcmp(_backend_str,
"gnome keyring") == 0)
105 fprintf(stderr,
"[pwstorage_new] GNOME Keyring backend is no longer supported.\n");
106 dt_control_log(_(
"GNOME Keyring backend is no longer supported. configure a different one"));
118 "please change in preferences, core tab.\n");
137 "[pwstorage_new] libsecret backend not available. using no storage backend.\n");
159 "[pwstorage_new] kwallet backend not available. using no storage backend.\n");
248 return g_hash_table_new(g_str_hash, g_str_equal);
const backend_kwallet_context_t * dt_pwstorage_kwallet_new()
void dt_pwstorage_kwallet_destroy(const backend_kwallet_context_t *context)
GHashTable * dt_pwstorage_kwallet_get(const backend_kwallet_context_t *context, const gchar *slot)
gboolean dt_pwstorage_kwallet_set(const backend_kwallet_context_t *context, const gchar *slot, GHashTable *table)
gboolean dt_pwstorage_libsecret_set(const backend_libsecret_context_t *context, const gchar *slot, GHashTable *attributes)
const backend_libsecret_context_t * dt_pwstorage_libsecret_new()
GHashTable * dt_pwstorage_libsecret_get(const backend_libsecret_context_t *context, const gchar *slot)
void dt_pwstorage_libsecret_destroy(const backend_libsecret_context_t *context)
void dt_conf_set_string(const char *name, const char *val)
const char * dt_conf_get_string_const(const char *name)
void dt_control_log(const char *msg,...)
void dt_capabilities_add(char *capability)
void dt_print(dt_debug_thread_t thread, const char *msg,...)
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
const dt_pwstorage_t * dt_pwstorage_new()
GHashTable * dt_pwstorage_get(const gchar *slot)
gboolean dt_pwstorage_set(const gchar *slot, GHashTable *table)
void dt_pwstorage_destroy(const dt_pwstorage_t *pwstorage)
@ PW_STORAGE_BACKEND_KWALLET
@ PW_STORAGE_BACKEND_LIBSECRET
@ PW_STORAGE_BACKEND_NONE
const struct dt_pwstorage_t * pwstorage
pw_storage_backend_t pw_storage_backend