mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-09 01:21:25 +03:00
Use NULL as initial value for undefined user format.
(panel_load_setup): if user's format of file list and status line are undefined in the ini file, set them to NULL instead of DEFAULT_USER_FORMAT. Move definition of DEFAULT_USER_FORMAT macro from panel.h to panel.c. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9ba4691b57
commit
d7b14b8933
@ -98,6 +98,8 @@ typedef enum
|
||||
FATTR_STATUS
|
||||
} file_attr_t;
|
||||
|
||||
#define DEFAULT_USER_FORMAT "half type name | size | perm"
|
||||
|
||||
/* select/unselect dialog results */
|
||||
#define SELECT_RESET ((mc_search_t *)(-1))
|
||||
#define SELECT_ERROR ((mc_search_t *)(-2))
|
||||
|
@ -20,7 +20,6 @@
|
||||
/*** typedefs(not structures) and defined constants **********************************************/
|
||||
|
||||
#define PANEL(x) ((WPanel *)(x))
|
||||
#define DEFAULT_USER_FORMAT "half type name | size | perm"
|
||||
|
||||
#define LIST_FORMATS 4
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ panel_load_setup (WPanel * panel, const char *section)
|
||||
/* User formats */
|
||||
g_free (panel->user_format);
|
||||
panel->user_format =
|
||||
mc_config_get_string (mc_global.panels_config, section, "user_format", DEFAULT_USER_FORMAT);
|
||||
mc_config_get_string (mc_global.panels_config, section, "user_format", NULL);
|
||||
|
||||
for (i = 0; i < LIST_FORMATS; i++)
|
||||
{
|
||||
@ -1178,7 +1178,7 @@ panel_load_setup (WPanel * panel, const char *section)
|
||||
g_free (panel->user_status_format[i]);
|
||||
g_snprintf (buffer2, sizeof (buffer2), "user_status%lld", (long long) i);
|
||||
panel->user_status_format[i] =
|
||||
mc_config_get_string (mc_global.panels_config, section, buffer2, DEFAULT_USER_FORMAT);
|
||||
mc_config_get_string (mc_global.panels_config, section, buffer2, NULL);
|
||||
}
|
||||
|
||||
panel->user_mini_status =
|
||||
|
Loading…
x
Reference in New Issue
Block a user