3 * \brief Header: setup loading/saving
11 #include "lib/global.h" /* GError */
13 #include "panel.h" /* WPanel, panel_view_mode_t */
15 /* global paremeters */
16 extern char *profile_name
;
17 extern char *global_profile_name
;
18 extern char *setup_color_string
;
19 extern char *term_color_string
;
20 extern char *color_terminal_string
;
22 extern int mouse_close_dialog
;
23 extern int select_flags
;
24 extern int setup_copymove_persistent_attr
;
25 extern int num_history_items_recorded
;
26 extern int classic_progressbar
;
28 /* TAB length for editor and viewer */
29 #define DEFAULT_TAB_SPACING 8
30 extern int option_tab_spacing
;
32 char *setup_init (void);
33 void load_setup (void);
34 gboolean
save_setup (void);
35 void done_setup (void);
36 void save_config (void);
37 void setup_save_config_show_error (const char *filename
, GError
**error
);
39 void save_layout (void);
41 void load_key_defs (void);
42 #if defined(ENABLE_VFS) && defined (USE_NETCODE)
43 char *load_anon_passwd (void);
44 #endif /* ENABLE_VFS && defined USE_NETCODE */
46 void load_keymap_defs (void);
47 void free_keymap_defs (void);
51 QSEARCH_CASE_INSENSITIVE
= 0, /* quick search in case insensitive mode */
52 QSEARCH_CASE_SENSITIVE
= 1, /* quick search in case sensitive mode */
53 QSEARCH_PANEL_CASE
= 2, /* quick search get value from panel case_sensitive */
57 /* panels ini options; [Panels] section */
60 gboolean kilobyte_si
; /* If TRUE, SI units (1000 based) will be used for larger units
61 * (kilobyte, megabyte, ...). If FALSE, binary units (1024 based) will be used */
62 gboolean mix_all_files
; /* If FALSE then directories are shown separately from files */
63 gboolean show_backups
; /* If TRUE, show files ending in ~ */
64 gboolean show_dot_files
; /* If TRUE, show files starting with a dot */
65 gboolean fast_reload
; /* If TRUE then use stat() on the cwd to determine directory changes */
66 gboolean fast_reload_msg_shown
; /* Have we shown the fast-reload warning in the past? */
67 gboolean mark_moves_down
; /* If TRUE, marking a files moves the cursor down */
68 gboolean reverse_files_only
; /* If TRUE, only selection of files is inverted */
69 gboolean auto_save_setup
;
70 gboolean navigate_with_arrows
; /* If TRUE: l&r arrows are used to chdir if the input line is empty */
71 gboolean scroll_pages
; /* If TRUE, panel is scrolled by half the display when the cursor reaches
72 the end or the beginning of the panel */
73 gboolean mouse_move_pages
; /* Scroll page/item using mouse wheel */
74 gboolean filetype_mode
; /* If TRUE then add per file type hilighting */
75 gboolean permission_mode
; /* If TRUE, we use permission hilighting */
76 qsearch_mode_t qsearch_mode
; /* Quick search mode */
79 extern panels_options_t panels_options
;
81 extern panel_view_mode_t startup_left_mode
;
82 extern panel_view_mode_t startup_right_mode
;
84 void panel_load_setup (struct WPanel
*panel
, const char *section
);
85 void panel_save_setup (struct WPanel
*panel
, const char *section
);
86 void save_panel_types (void);
88 void panels_load_options (void);
89 void panels_save_options (void);
91 #endif /* MC_SETUP_H */