Add string and string list preferences with option

Where GKeyFile usually use the pref[locale] format to define
locale specific translated data, it is here hijacked to be used
as pref[option] in order to specialize a preference according
to an option:

open.url.cmd[pdf] = pdf-viewer
open.url.cmd[jpg] = image-viewer

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière
2020-06-12 09:07:59 +02:00
committed by Michael Vetter
parent 96c877de80
commit 7e652f4ca0
2 changed files with 89 additions and 1 deletions

View File

@@ -314,8 +314,12 @@ void prefs_save_win_placement(ProfWinPlacement *placement);
gboolean prefs_get_boolean(preference_t pref);
void prefs_set_boolean(preference_t pref, gboolean value);
char* prefs_get_string(preference_t pref);
char* prefs_get_string_with_option(preference_t pref, gchar *option);
char **prefs_get_string_list_with_option(preference_t pref, gchar *option);
void prefs_free_string(char *pref);
void prefs_set_string(preference_t pref, char *value);
void prefs_set_string_with_option(preference_t pref, char *option, char *value);
void prefs_set_string_list_with_option(preference_t pref, char *option, const gchar* const *values);
char* prefs_get_tls_certpath(void);