(get_display_type): rename to get_panel_type.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2019-01-20 12:13:00 +03:00
parent 615f29d7d5
commit 846e2b9888
6 changed files with 16 additions and 16 deletions

View File

@ -457,7 +457,7 @@ nice_cd (const char *text, const char *xtext, const char *help,
panel_view_mode_t save_type;
vfs_path_t *cd_vpath;
save_type = get_display_type (MENU_PANEL_IDX);
save_type = get_panel_type (MENU_PANEL_IDX);
if (save_type != view_listing)
create_panel (MENU_PANEL_IDX, view_listing);
@ -514,7 +514,7 @@ configure_panel_listing (WPanel * p, int list_format, int brief_cols, gboolean u
static void
switch_to_listing (int panel_index)
{
if (get_display_type (panel_index) != view_listing)
if (get_panel_type (panel_index) != view_listing)
create_panel (panel_index, view_listing);
}
@ -1535,9 +1535,9 @@ save_setup_cmd (void)
void
info_cmd_no_menu (void)
{
if (get_display_type (0) == view_info)
if (get_panel_type (0) == view_info)
create_panel (0, view_listing);
else if (get_display_type (1) == view_info)
else if (get_panel_type (1) == view_info)
create_panel (1, view_listing);
else
create_panel (current_panel == left_panel ? 1 : 0, view_info);
@ -1548,9 +1548,9 @@ info_cmd_no_menu (void)
void
quick_cmd_no_menu (void)
{
if (get_display_type (0) == view_quick)
if (get_panel_type (0) == view_quick)
create_panel (0, view_listing);
else if (get_display_type (1) == view_quick)
else if (get_panel_type (1) == view_quick)
create_panel (1, view_listing);
else
create_panel (current_panel == left_panel ? 1 : 0, view_quick);

View File

@ -587,7 +587,7 @@ init_layout (void)
static void
panel_do_cols (int idx)
{
if (get_display_type (idx) == view_listing)
if (get_panel_type (idx) == view_listing)
set_panel_formats (PANEL (panels[idx].widget));
else
panel_update_cols (panels[idx].widget, frame_half);
@ -1035,7 +1035,7 @@ create_panel (int num, panel_view_mode_t type)
{
gboolean last_was_panel;
last_was_panel = old_widget != NULL && get_display_type (num) != view_listing;
last_was_panel = old_widget != NULL && get_panel_type (num) != view_listing;
new_widget = restore_into_right_dir_panel (num, last_was_panel, y, x, lines, cols);
break;
}
@ -1237,7 +1237,7 @@ swap_panels (void)
/* --------------------------------------------------------------------------------------------- */
panel_view_mode_t
get_display_type (int idx)
get_panel_type (int idx)
{
return panels[idx].type;
}
@ -1307,7 +1307,7 @@ get_other_type (void)
void
save_panel_dir (int idx)
{
panel_view_mode_t type = get_display_type (idx);
panel_view_mode_t type = get_panel_type (idx);
Widget *widget = get_panel_widget (idx);
if ((type == view_listing) && (widget != NULL))
@ -1336,7 +1336,7 @@ get_panel_dir_for (const WPanel * widget)
if (i >= MAX_VIEWS)
return g_strdup (".");
if (get_display_type (i) == view_listing)
if (get_panel_type (i) == view_listing)
{
vfs_path_t *cwd_vpath;

View File

@ -64,7 +64,7 @@ void destroy_panels (void);
void setup_cmdline (void);
void create_panel (int num, panel_view_mode_t type);
void swap_panels (void);
panel_view_mode_t get_display_type (int idx);
panel_view_mode_t get_panel_type (int idx);
panel_view_mode_t get_current_type (void);
panel_view_mode_t get_other_type (void);
int get_current_index (void);

View File

@ -16,7 +16,7 @@
#define MENU_PANEL (mc_global.widget.is_right ? right_panel : left_panel)
#define MENU_PANEL_IDX (mc_global.widget.is_right ? 1 : 0)
#define SELECTED_IS_PANEL (get_display_type (MENU_PANEL_IDX) == view_listing)
#define SELECTED_IS_PANEL (get_panel_type (MENU_PANEL_IDX) == view_listing)
#define other_panel get_other_panel()

View File

@ -4014,7 +4014,7 @@ update_one_panel_widget (WPanel * panel, panel_update_flags_t flags, const char
static void
update_one_panel (int which, panel_update_flags_t flags, const char *current_file)
{
if (get_display_type (which) == view_listing)
if (get_panel_type (which) == view_listing)
{
WPanel *panel;

View File

@ -996,11 +996,11 @@ save_panel_types (void)
if (mc_global.mc_run_mode != MC_RUN_FULL)
return;
type = get_display_type (0);
type = get_panel_type (0);
panel_save_type ("New Left Panel", type);
if (type == view_listing)
panel_save_setup (left_panel, left_panel->panel_name);
type = get_display_type (1);
type = get_panel_type (1);
panel_save_type ("New Right Panel", type);
if (type == view_listing)
panel_save_setup (right_panel, right_panel->panel_name);