Heraia
0.1.8
|
Header file for user preferences. More...
Go to the source code of this file.
Macros | |
#define | GN_GLOBAL_PREFS "Global Preferences" |
#define | GN_DISPLAY_PREFS "Display Preferences" |
#define | GN_DI_PREFS "Data Interpretor Preferences" |
#define | GN_MPWP_PREFS "Main Preferences Window Preferences" |
#define | KN_SAVE_WINDOW_PREFS "Save Window Preferences" |
#define | KN_ABOUT_BOX "About Box" |
#define | KN_DATA_INTERPRETOR "Data Interpretor" |
#define | KN_LOG_BOX "Log Box" |
#define | KN_MAIN_DIALOG "Main Dialog" |
#define | KN_PLUGIN_LIST "Plugin List" |
#define | KN_LDT "List Data Types" |
#define | KN_MAIN_PREFS "Main Preferences" |
#define | KN_GOTO_DIALOG "Goto Dialog" |
#define | KN_RESULT_WINDOW "Result Window" |
#define | KN_FIND_WINDOW "Find Window" |
#define | KN_FR_WINDOW "Find and Replace Window" |
#define | KN_FDFT_WINDOW "Find data from type Window" |
#define | KN_SAVE_OPENED_FILES_FILENAMES "Opened files filenames" |
#define | KN_FILES_FILENAMES "Files filenames" |
#define | KN_FILES_CURSOR_POSITIONS "Files cursor positions" |
#define | KN_CURRENT_TAB "Main current tab" |
#define | KN_DISP_THOUSAND "Thousand" |
#define | KN_DISP_OFFSETS "Offsets" |
#define | KN_DI_SELECTED_TAB "Selected Tab" |
#define | KN_DI_STREAM_SIZE "Stream Size" |
#define | KN_DI_ENDIANNESS "Endianness" |
#define | KN_MPWP_SELECTED_TAB "Selected Tab" |
Functions | |
void | verify_preference_file (prefs_t *prefs) |
Verify preference file presence and creates it if it does not already exists. More... | |
prefs_t * | init_preference_struct (gchar *pathname, gchar *filename) |
Look out if the preference structure exists or not. More... | |
void | free_preference_struct (prefs_t *prefs) |
Destroys a preference structure. More... | |
void | save_preferences (heraia_struct_t *main_struct, prefs_t *prefs) |
Save all preferences to the user preference file. More... | |
void | load_preferences (heraia_struct_t *main_struct, prefs_t *prefs) |
Sets up the preferences as loaded in the preference file. More... | |
Header file for user preferences.
Definition in file user_prefs.h.
#define GN_DI_PREFS "Data Interpretor Preferences" |
Definition at line 39 of file user_prefs.h.
Referenced by load_di_preferences(), and save_di_preferences().
#define GN_DISPLAY_PREFS "Display Preferences" |
Definition at line 38 of file user_prefs.h.
Referenced by load_mp_display_preferences_options(), and save_mp_display_preferences_options().
#define GN_GLOBAL_PREFS "Global Preferences" |
Definition at line 37 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), load_mp_files_filenames(), load_window_preferences(), save_mp_file_preferences_options(), save_mp_files_filenames(), and save_window_preferences().
#define GN_MPWP_PREFS "Main Preferences Window Preferences" |
Definition at line 40 of file user_prefs.h.
Referenced by load_mpwp_preferences(), and save_mpwp_preferences().
#define KN_ABOUT_BOX "About Box" |
Definition at line 43 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_CURRENT_TAB "Main current tab" |
Definition at line 59 of file user_prefs.h.
Referenced by load_mp_files_filenames(), and save_mp_files_filenames().
#define KN_DATA_INTERPRETOR "Data Interpretor" |
Definition at line 44 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_DI_ENDIANNESS "Endianness" |
Definition at line 67 of file user_prefs.h.
Referenced by load_di_preferences(), and save_di_preferences().
#define KN_DI_SELECTED_TAB "Selected Tab" |
Definition at line 65 of file user_prefs.h.
Referenced by load_di_preferences(), and save_di_preferences().
#define KN_DI_STREAM_SIZE "Stream Size" |
Definition at line 66 of file user_prefs.h.
Referenced by load_di_preferences(), and save_di_preferences().
#define KN_DISP_OFFSETS "Offsets" |
Definition at line 63 of file user_prefs.h.
Referenced by load_mp_display_preferences_options(), and save_mp_display_preferences_options().
#define KN_DISP_THOUSAND "Thousand" |
Definition at line 62 of file user_prefs.h.
Referenced by load_mp_display_preferences_options(), and save_mp_display_preferences_options().
#define KN_FDFT_WINDOW "Find data from type Window" |
Definition at line 54 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_FILES_CURSOR_POSITIONS "Files cursor positions" |
Definition at line 58 of file user_prefs.h.
Referenced by load_mp_files_filenames(), and save_mp_files_filenames().
#define KN_FILES_FILENAMES "Files filenames" |
Definition at line 57 of file user_prefs.h.
Referenced by load_mp_files_filenames(), and save_mp_files_filenames().
#define KN_FIND_WINDOW "Find Window" |
Definition at line 52 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_FR_WINDOW "Find and Replace Window" |
Definition at line 53 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_GOTO_DIALOG "Goto Dialog" |
Definition at line 50 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_LDT "List Data Types" |
Definition at line 48 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_LOG_BOX "Log Box" |
Definition at line 45 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_MAIN_DIALOG "Main Dialog" |
Definition at line 46 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_MAIN_PREFS "Main Preferences" |
Definition at line 49 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_MPWP_SELECTED_TAB "Selected Tab" |
Definition at line 69 of file user_prefs.h.
Referenced by load_mpwp_preferences(), and save_mpwp_preferences().
#define KN_PLUGIN_LIST "Plugin List" |
Definition at line 47 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_RESULT_WINDOW "Result Window" |
Definition at line 51 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_SAVE_OPENED_FILES_FILENAMES "Opened files filenames" |
Definition at line 56 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
#define KN_SAVE_WINDOW_PREFS "Save Window Preferences" |
Definition at line 42 of file user_prefs.h.
Referenced by load_mp_file_preferences_options(), and save_mp_file_preferences_options().
void free_preference_struct | ( | prefs_t * | prefs | ) |
Destroys a preference structure.
prefs | the preference structure to be freed |
Definition at line 148 of file user_prefs.c.
References prefs_t::file, prefs_t::filename, and prefs_t::pathname.
Referenced by close_a_project(), and on_projects_save_as_activate().
prefs_t* init_preference_struct | ( | gchar * | pathname, |
gchar * | filename | ||
) |
Look out if the preference structure exists or not.
If not it creates it.
pathname | is the pathname where the preference file is |
filename | is the filename of the preference file itself |
Definition at line 130 of file user_prefs.c.
References prefs_t::file, prefs_t::filename, and prefs_t::pathname.
Referenced by heraia_init_main_struct(), on_projects_open_activate(), and on_projects_save_as_activate().
void load_preferences | ( | heraia_struct_t * | main_struct, |
prefs_t * | prefs | ||
) |
Sets up the preferences as loaded in the preference file.
main_struct | the main structure |
prefs | is a 'prefs_t *' filled preference structure |
Definition at line 620 of file user_prefs.c.
References load_di_preferences(), load_mp_display_preferences_options(), load_mp_file_preferences_options(), load_mpwp_preferences(), load_preference_file(), and log_message().
Referenced by load_heraia_ui(), and on_projects_open_activate().
void save_preferences | ( | heraia_struct_t * | main_struct, |
prefs_t * | prefs | ||
) |
Save all preferences to the user preference file.
main_struct | the main structure |
prefs | is a 'prefs_t *' filled preference structure |
Definition at line 376 of file user_prefs.c.
References save_di_preferences(), save_mp_display_preferences_options(), save_mp_file_preferences_options(), save_mpwp_preferences(), and save_preferences_to_file().
Referenced by close_a_project(), on_projects_save_as_activate(), and pref_window_delete().
void verify_preference_file | ( | prefs_t * | prefs | ) |
Verify preference file presence and creates it if it does not already exists.
prefs | is a 'prefs_t *' filled preference structure |
Definition at line 113 of file user_prefs.c.
References prefs_t::filename, prefs_t::pathname, verify_preference_file_name_presence(), and verify_preference_file_path_presence().
Referenced by heraia_init_main_struct().