1
2
3
4
5 #ifndef MC__SETUP_H
6 #define MC__SETUP_H
7
8 #include <config.h>
9
10 #include "lib/global.h"
11
12 #include "filemanager/layout.h"
13 #include "filemanager/panel.h"
14
15
16
17
18 #define DEFAULT_TAB_SPACING 8
19
20 #define MAX_MACRO_LENGTH 1024
21
22
23
24 typedef enum
25 {
26 QSEARCH_CASE_INSENSITIVE = 0,
27 QSEARCH_CASE_SENSITIVE = 1,
28 QSEARCH_PANEL_CASE = 2,
29 QSEARCH_NUM
30 } qsearch_mode_t;
31
32
33
34
35 typedef struct
36 {
37 gboolean show_mini_info;
38 gboolean kilobyte_si;
39
40 gboolean mix_all_files;
41 gboolean show_backups;
42 gboolean show_dot_files;
43 gboolean fast_reload;
44 gboolean fast_reload_msg_shown;
45 gboolean mark_moves_down;
46 gboolean reverse_files_only;
47 gboolean auto_save_setup;
48 gboolean navigate_with_arrows;
49 gboolean scroll_pages;
50
51 gboolean scroll_center;
52 gboolean mouse_move_pages;
53 gboolean filetype_mode;
54 gboolean permission_mode;
55 qsearch_mode_t qsearch_mode;
56 gboolean torben_fj_mode;
57 select_flags_t select_flags;
58 } panels_options_t;
59
60 typedef struct macro_action_t
61 {
62 long action;
63 int ch;
64 } macro_action_t;
65
66 typedef struct macros_t
67 {
68 int hotkey;
69 GArray *macro;
70 } macros_t;
71
72 struct mc_fhl_struct;
73
74
75
76
77 extern gboolean confirm_delete;
78 extern gboolean confirm_directory_hotlist_delete;
79 extern gboolean confirm_execute;
80 extern gboolean confirm_exit;
81 extern gboolean confirm_overwrite;
82 extern gboolean confirm_view_dir;
83 extern gboolean safe_delete;
84 extern gboolean safe_overwrite;
85 extern gboolean clear_before_exec;
86 extern gboolean auto_menu;
87 extern gboolean drop_menus;
88 extern gboolean verbose;
89 extern gboolean copymove_persistent_attr;
90 extern gboolean classic_progressbar;
91 extern gboolean easy_patterns;
92 extern int option_tab_spacing;
93 extern gboolean auto_save_setup;
94 extern gboolean only_leading_plus_minus;
95 extern int cd_symlinks;
96 extern gboolean auto_fill_mkdir_name;
97 extern gboolean output_starts_shell;
98 #ifdef USE_FILE_CMD
99 extern gboolean use_file_to_check_type;
100 #endif
101 extern gboolean file_op_compute_totals;
102 extern gboolean editor_ask_filename_before_edit;
103
104 extern panels_options_t panels_options;
105
106 extern panel_view_mode_t startup_left_mode;
107 extern panel_view_mode_t startup_right_mode;
108 extern gboolean boot_current_is_left;
109 extern gboolean use_internal_view;
110 extern gboolean use_internal_edit;
111
112 #ifdef HAVE_CHARSET
113 extern int default_source_codepage;
114 extern char *autodetect_codeset;
115 extern gboolean is_autodetect_codeset_enabled;
116 #endif
117
118 #ifdef HAVE_ASPELL
119 extern char *spell_language;
120 #endif
121
122
123 extern char *saved_other_dir;
124
125
126 extern char *last_wd_string;
127
128 extern int quit;
129
130 extern gboolean print_last_revert;
131
132 #ifdef USE_INTERNAL_EDIT
133
134 extern int macro_index;
135
136
137 extern struct macro_action_t record_macro_buf[MAX_MACRO_LENGTH];
138
139 extern GArray *macros_list;
140 #endif
141
142 extern int saving_setup;
143
144
145
146 const char *setup_init (void);
147 void load_setup (void);
148 gboolean save_setup (gboolean save_options, gboolean save_panel_options);
149 void done_setup (void);
150 void setup_save_config_show_error (const char *filename, GError ** mcerror);
151
152 void load_key_defs (void);
153 #ifdef ENABLE_VFS_FTP
154 char *load_anon_passwd (void);
155 #endif
156
157 void panel_load_setup (WPanel * panel, const char *section);
158 void panel_save_setup (WPanel * panel, const char *section);
159
160
161
162 #endif