Removed unneeded menu entries.
[pantumic.git] / src / setup.h
blob960bdf91575f581b6eb3a95550e2f9923170b651
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 char *setup_color_string;
61 extern char *term_color_string;
62 extern char *color_terminal_string;
63 extern int confirm_delete;
64 extern int confirm_directory_hotlist_delete;
65 extern int confirm_execute;
66 extern int confirm_exit;
67 extern int confirm_overwrite;
68 extern int confirm_history_cleanup;
69 extern int confirm_view_dir;
70 extern int safe_delete;
71 extern int clear_before_exec;
72 extern int auto_menu;
73 extern int drop_menus;
74 extern int verbose;
75 extern int select_flags;
76 extern int setup_copymove_persistent_attr;
77 extern int num_history_items_recorded;
78 extern int classic_progressbar;
79 extern int easy_patterns;
80 extern int option_tab_spacing;
81 extern int auto_save_setup;
82 extern int only_leading_plus_minus;
83 extern int cd_symlinks;
84 extern int show_all_if_ambiguous;
85 extern int auto_fill_mkdir_name;
86 extern int output_starts_shell;
87 extern int use_file_to_check_type;
88 extern int file_op_compute_totals;
90 extern panels_options_t panels_options;
92 extern panel_view_mode_t startup_left_mode;
93 extern panel_view_mode_t startup_right_mode;
94 extern gboolean boot_current_is_left;
96 /*** declarations of public functions ************************************************************/
98 char *setup_init (void);
99 void load_setup (void);
100 gboolean save_setup (gboolean save_options, gboolean save_panel_options);
101 void done_setup (void);
102 void save_config (void);
103 void setup_save_config_show_error (const char *filename, GError ** error);
105 void save_layout (void);
107 void load_key_defs (void);
108 #ifdef ENABLE_VFS_FTP
109 char *load_anon_passwd (void);
110 #endif /* ENABLE_VFS_FTP */
112 void load_keymap_defs (void);
113 void free_keymap_defs (void);
115 void panel_load_setup (WPanel * panel, const char *section);
116 void panel_save_setup (WPanel * panel, const char *section);
118 void panels_load_options (void);
119 void panels_save_options (void);
121 /*** inline functions ****************************************************************************/
123 #endif /* MC__SETUP_H */