Definition in file user_prefs.c.
#include <libheraia.h>
Go to the source code of this file.
Functions | |
static void | verify_preference_file_path_presence (gchar *pathname) |
verify preference file path presence and creates it if it does not already exists | |
static void | verify_preference_file_name_presence (gchar *filename) |
Verify preference file's presence and creates it if it does not exists already. | |
static void | save_window_preferences (GKeyFile *file, gchar *name, window_prop_t *window_prop) |
Window preferences. | |
static void | save_mp_file_preferences_options (heraia_window_t *main_window) |
Save only file preferences related options. | |
static void | save_mp_display_preferences_options (heraia_window_t *main_window) |
Save only display related preferences. | |
static void | load_window_preferences (GKeyFile *file, gchar *name, window_prop_t *window_prop) |
window preferences | |
static void | load_mp_file_preferences_options (heraia_window_t *main_window) |
Load only main preferences related options. | |
static void | load_mp_display_preferences_options (heraia_window_t *main_window) |
Load display related preferences. | |
void | verify_preference_file (gchar *pathname, gchar *filename) |
Verify preference file presence and creates it if it does not already exists. | |
void | init_preference_struct (heraia_window_t *main_window) |
look out if the preference structure exists or not. | |
static void | save_di_preferences (heraia_window_t *main_window) |
Saves data interpretor state and preferences. | |
void | save_preferences (heraia_window_t *main_window) |
Save all preferences to the user preference file. | |
static void | load_di_preferences (heraia_window_t *main_window) |
Load data interpretor state and preferences. | |
void | load_preferences (heraia_window_t *main_window) |
Sets up the preferences as loaded in the preference file. |
void init_preference_struct | ( | heraia_window_t * | main_window | ) |
look out if the preference structure exists or not.
If not it creates it.
main_window | the main structure |
Definition at line 114 of file user_prefs.c.
References prefs_t::file, prefs_t::filename, prefs_t::pathname, and heraia_window_t::prefs.
Referenced by heraia_init_main_struct().
static void load_di_preferences | ( | heraia_window_t * | main_window | ) | [static] |
Load data interpretor state and preferences.
main_window | : main structure |
< data interpretor's notebook
< Selected tab in data interpretor's window
< structure for preferences
Definition at line 370 of file user_prefs.c.
References heraia_window_t::current_DW, prefs_t::file, GN_DI_PREFS, heraia_get_widget(), KN_DI_SELECTED_TAB, xml_t::main, heraia_window_t::prefs, data_window_t::tab_displayed, and heraia_window_t::xmls.
Referenced by load_preferences().
static void load_mp_display_preferences_options | ( | heraia_window_t * | main_window | ) | [static] |
Load display related preferences.
main_window | the main structure |
Definition at line 348 of file user_prefs.c.
References prefs_t::file, GN_DISPLAY_PREFS, heraia_get_widget(), KN_DISP_THOUSAND, xml_t::main, heraia_window_t::prefs, and heraia_window_t::xmls.
Referenced by load_preferences().
static void load_mp_file_preferences_options | ( | heraia_window_t * | main_window | ) | [static] |
Load only main preferences related options.
main_window | the main structure |
Definition at line 314 of file user_prefs.c.
References all_window_prop_t::about_box, all_window_prop_t::data_interpretor, prefs_t::file, GN_GLOBAL_PREFS, heraia_get_widget(), KN_ABOUT_BOX, KN_DATA_INTERPRETOR, KN_LDT, KN_LOG_BOX, KN_MAIN_DIALOG, KN_MAIN_PREFS, KN_PLUGIN_LIST, KN_SAVE_WINDOW_PREFS, all_window_prop_t::ldt, load_window_preferences(), all_window_prop_t::log_box, xml_t::main, all_window_prop_t::main_dialog, all_window_prop_t::main_pref_window, all_window_prop_t::plugin_list, heraia_window_t::prefs, heraia_window_t::win_prop, and heraia_window_t::xmls.
Referenced by load_preferences().
void load_preferences | ( | heraia_window_t * | main_window | ) |
Sets up the preferences as loaded in the preference file.
main_window | the main structure |
Definition at line 399 of file user_prefs.c.
References load_di_preferences(), load_mp_display_preferences_options(), and load_mp_file_preferences_options().
Referenced by load_heraia_ui().
static void load_window_preferences | ( | GKeyFile * | file, | |
gchar * | name, | |||
window_prop_t * | window_prop | |||
) | [static] |
window preferences
file | a GKeyFile where values are stored | |
name | a keyname (basically a window name) | |
window_prop | all window properties to save (structure window_prop_t) |
Definition at line 283 of file user_prefs.c.
References window_prop_t::displayed, GN_GLOBAL_PREFS, window_prop_t::height, window_prop_t::width, window_prop_t::x, and window_prop_t::y.
Referenced by load_mp_file_preferences_options().
static void save_di_preferences | ( | heraia_window_t * | main_window | ) | [static] |
Saves data interpretor state and preferences.
main_window | : main structure |
< data interpretor's notebook
< Selected tab in data interpretor's window
< structure for preferences
Definition at line 223 of file user_prefs.c.
References heraia_window_t::current_DW, prefs_t::file, GN_DI_PREFS, heraia_get_widget(), KN_DI_SELECTED_TAB, xml_t::main, heraia_window_t::prefs, and heraia_window_t::xmls.
Referenced by save_preferences().
static void save_mp_display_preferences_options | ( | heraia_window_t * | main_window | ) | [static] |
Save only display related preferences.
main_window | : main structure |
Definition at line 203 of file user_prefs.c.
References prefs_t::file, GN_DISPLAY_PREFS, is_toggle_button_activated(), KN_DISP_THOUSAND, xml_t::main, heraia_window_t::prefs, and heraia_window_t::xmls.
Referenced by save_preferences().
static void save_mp_file_preferences_options | ( | heraia_window_t * | main_window | ) | [static] |
Save only file preferences related options.
main_window | the main structure |
Definition at line 171 of file user_prefs.c.
References all_window_prop_t::about_box, all_window_prop_t::data_interpretor, prefs_t::file, GN_GLOBAL_PREFS, is_toggle_button_activated(), KN_ABOUT_BOX, KN_DATA_INTERPRETOR, KN_LDT, KN_LOG_BOX, KN_MAIN_DIALOG, KN_MAIN_PREFS, KN_PLUGIN_LIST, KN_SAVE_WINDOW_PREFS, all_window_prop_t::ldt, all_window_prop_t::log_box, xml_t::main, all_window_prop_t::main_dialog, all_window_prop_t::main_pref_window, all_window_prop_t::plugin_list, heraia_window_t::prefs, save_window_preferences(), heraia_window_t::win_prop, and heraia_window_t::xmls.
Referenced by save_preferences().
void save_preferences | ( | heraia_window_t * | main_window | ) |
Save all preferences to the user preference file.
main_window | the main structure |
Definition at line 252 of file user_prefs.c.
References heraia_window_t::prefs, save_di_preferences(), save_mp_display_preferences_options(), save_mp_file_preferences_options(), and save_preferences_to_file().
Referenced by close_heraia(), and pref_window_delete().
static void save_window_preferences | ( | GKeyFile * | file, | |
gchar * | name, | |||
window_prop_t * | window_prop | |||
) | [static] |
Window preferences.
file | a GKeyFile where values are stored | |
name | a keyname (basically a window name) | |
window_prop | all window properties to save (structure window_prop_t) |
Definition at line 142 of file user_prefs.c.
References window_prop_t::displayed, GN_GLOBAL_PREFS, window_prop_t::height, window_prop_t::width, window_prop_t::x, and window_prop_t::y.
Referenced by save_mp_file_preferences_options().
void verify_preference_file | ( | gchar * | pathname, | |
gchar * | filename | |||
) |
Verify preference file presence and creates it if it does not already exists.
pathname | is the full pathname | |
filename | is the filename containing the path itself |
Definition at line 101 of file user_prefs.c.
References verify_preference_file_name_presence(), and verify_preference_file_path_presence().
Referenced by heraia_init_main_struct().
static void verify_preference_file_name_presence | ( | gchar * | filename | ) | [static] |
Verify preference file's presence and creates it if it does not exists already.
filename | is a name of a file to look presence for |
Definition at line 69 of file user_prefs.c.
Referenced by verify_preference_file().
static void verify_preference_file_path_presence | ( | gchar * | pathname | ) | [static] |
verify preference file path presence and creates it if it does not already exists
pathname | is a path to look presence for |
Definition at line 49 of file user_prefs.c.
Referenced by verify_preference_file().