Fixup update of command line after window resize.
[midnight-commander.git] / src / setup.h
blob5b2b2cccdae362c0e970f0c0a23441341763a822
1 /** \file setup.h
2 * \brief Header: setup loading/saving
3 */
5 #ifndef MC__SETUP_H
6 #define MC__SETUP_H
8 #include <config.h>
10 #include "lib/global.h" /* GError */
12 #include "filemanager/panel.h" /* WPanel, panel_view_mode_t */
14 /*** typedefs(not structures) and defined constants **********************************************/
16 /* TAB length for editor and viewer */
17 #define DEFAULT_TAB_SPACING 8
19 /*** enums ***************************************************************************************/
21 typedef enum
23 QSEARCH_CASE_INSENSITIVE = 0, /* quick search in case insensitive mode */
24 QSEARCH_CASE_SENSITIVE = 1, /* quick search in case sensitive mode */
25 QSEARCH_PANEL_CASE = 2, /* quick search get value from panel case_sensitive */
26 QSEARCH_NUM
27 } qsearch_mode_t;
29 /*** structures declarations (and typedefs of structures)*****************************************/
31 /* panels ini options; [Panels] section */
32 typedef struct
34 gboolean show_mini_info; /* If true, show the mini-info on the panel */
35 gboolean kilobyte_si; /* If TRUE, SI units (1000 based) will be used for larger units
36 * (kilobyte, megabyte, ...). If FALSE, binary units (1024 based) will be used */
37 gboolean mix_all_files; /* If FALSE then directories are shown separately from files */
38 gboolean show_backups; /* If TRUE, show files ending in ~ */
39 gboolean show_dot_files; /* If TRUE, show files starting with a dot */
40 gboolean fast_reload; /* If TRUE then use stat() on the cwd to determine directory changes */
41 gboolean fast_reload_msg_shown; /* Have we shown the fast-reload warning in the past? */
42 gboolean mark_moves_down; /* If TRUE, marking a files moves the cursor down */
43 gboolean reverse_files_only; /* If TRUE, only selection of files is inverted */
44 gboolean auto_save_setup;
45 gboolean navigate_with_arrows; /* If TRUE: l&r arrows are used to chdir if the input line is empty */
46 gboolean scroll_pages; /* If TRUE, panel is scrolled by half the display when the cursor reaches
47 the end or the beginning of the panel */
48 gboolean mouse_move_pages; /* Scroll page/item using mouse wheel */
49 gboolean filetype_mode; /* If TRUE then add per file type hilighting */
50 gboolean permission_mode; /* If TRUE, we use permission hilighting */
51 qsearch_mode_t qsearch_mode; /* Quick search mode */
52 gboolean torben_fj_mode; /* If TRUE, use some usability hacks by Torben */
53 } panels_options_t;
55 /*** global variables defined in .c file *********************************************************/
57 /* global paremeters */
58 extern char *profile_name;
59 extern char *global_profile_name;
60 extern int confirm_delete;
61 extern int confirm_directory_hotlist_delete;
62 extern int confirm_execute;
63 extern int confirm_exit;
64 extern int confirm_overwrite;
65 extern int confirm_view_dir;
66 extern int safe_delete;
67 extern int clear_before_exec;
68 extern int auto_menu;
69 extern int drop_menus;
70 extern int verbose;
71 extern int select_flags;
72 extern int setup_copymove_persistent_attr;
73 extern int classic_progressbar;
74 extern int easy_patterns;
75 extern int option_tab_spacing;
76 extern int auto_save_setup;
77 extern int only_leading_plus_minus;
78 extern int cd_symlinks;
79 extern int auto_fill_mkdir_name;
80 extern int output_starts_shell;
81 extern int use_file_to_check_type;
82 extern int file_op_compute_totals;
84 extern panels_options_t panels_options;
86 extern panel_view_mode_t startup_left_mode;
87 extern panel_view_mode_t startup_right_mode;
88 extern gboolean boot_current_is_left;
90 /*** declarations of public functions ************************************************************/
92 char *setup_init (void);
93 void load_setup (void);
94 gboolean save_setup (gboolean save_options, gboolean save_panel_options);
95 void done_setup (void);
96 void save_config (void);
97 void setup_save_config_show_error (const char *filename, GError ** error);
99 void save_layout (void);
101 void load_key_defs (void);
102 #ifdef ENABLE_VFS_FTP
103 char *load_anon_passwd (void);
104 #endif /* ENABLE_VFS_FTP */
106 void load_keymap_defs (gboolean load_from_file);
107 void free_keymap_defs (void);
109 void panel_load_setup (WPanel * panel, const char *section);
110 void panel_save_setup (WPanel * panel, const char *section);
112 void panels_load_options (void);
113 void panels_save_options (void);
115 /*** inline functions ****************************************************************************/
117 #endif /* MC__SETUP_H */