user_prefs.h File Reference

Header file for user preferences. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#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_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 (gchar *pathname, gchar *filename)
 Verify preference file presence and creates it if it does not already exists.
void init_preference_struct (heraia_struct_t *main_struct)
 Look out if the preference structure exists or not.
void save_preferences (heraia_struct_t *main_struct)
 Save all preferences to the user preference file.
void load_preferences (heraia_struct_t *main_struct)
 Sets up the preferences as loaded in the preference file.

Detailed Description

Header file for user preferences.

Definition in file user_prefs.h.


Define Documentation

#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"
#define GN_GLOBAL_PREFS   "Global Preferences"
Note:
GN == Group Name KN == Key Name Thoses variables are the ones to use in the main preference file Please do not translate them !

Definition at line 37 of file user_prefs.h.

Referenced by load_mp_file_preferences_options(), load_window_preferences(), save_mp_file_preferences_options(), 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"
#define KN_DATA_INTERPRETOR   "Data Interpretor"
#define KN_DI_ENDIANNESS   "Endianness"

Definition at line 56 of file user_prefs.h.

Referenced by load_di_preferences(), and save_di_preferences().

#define KN_DI_SELECTED_TAB   "Selected Tab"

Definition at line 54 of file user_prefs.h.

Referenced by load_di_preferences(), and save_di_preferences().

#define KN_DI_STREAM_SIZE   "Stream Size"

Definition at line 55 of file user_prefs.h.

Referenced by load_di_preferences(), and save_di_preferences().

#define KN_DISP_OFFSETS   "Offsets"
#define KN_DISP_THOUSAND   "Thousand"
#define KN_LDT   "List Data Types"
#define KN_LOG_BOX   "Log Box"
#define KN_MAIN_DIALOG   "Main Dialog"
#define KN_MAIN_PREFS   "Main Preferences"
#define KN_MPWP_SELECTED_TAB   "Selected Tab"

Definition at line 58 of file user_prefs.h.

Referenced by load_mpwp_preferences(), and save_mpwp_preferences().

#define KN_PLUGIN_LIST   "Plugin List"
#define KN_SAVE_WINDOW_PREFS   "Save Window Preferences"

Function Documentation

void init_preference_struct ( heraia_struct_t main_struct  ) 

Look out if the preference structure exists or not.

If not it creates it.

See also:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Parameters:
main_struct the main structure

Definition at line 121 of file user_prefs.c.

References prefs_t::file, prefs_t::filename, prefs_t::pathname, and heraia_struct_t::prefs.

Referenced by heraia_init_main_struct().

Here is the caller graph for this function:

void load_preferences ( heraia_struct_t main_struct  ) 

Sets up the preferences as loaded in the preference file.

Parameters:
main_struct the main structure

Definition at line 494 of file user_prefs.c.

References load_di_preferences(), load_mp_display_preferences_options(), load_mp_file_preferences_options(), and load_mpwp_preferences().

Referenced by load_heraia_ui().

Here is the call graph for this function:

Here is the caller graph for this function:

void save_preferences ( heraia_struct_t main_struct  ) 

Save all preferences to the user preference file.

Parameters:
main_struct the main structure

Definition at line 301 of file user_prefs.c.

References heraia_struct_t::prefs, save_di_preferences(), save_mp_display_preferences_options(), save_mp_file_preferences_options(), save_mpwp_preferences(), and save_preferences_to_file().

Referenced by close_heraia(), and pref_window_delete().

Here is the call graph for this function:

Here is the caller graph for this function:

void verify_preference_file ( gchar *  pathname,
gchar *  filename 
)

Verify preference file presence and creates it if it does not already exists.

Parameters:
pathname is the full pathname
filename is the filename containing the path itself

Definition at line 108 of file user_prefs.c.

References verify_preference_file_name_presence(), and verify_preference_file_path_presence().

Referenced by heraia_init_main_struct().

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Fri Aug 20 09:15:57 2010 for Heraia by  doxygen 1.6.3