From 846e2b988856db3a008831855517e8b3752ce960 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 20 Jan 2019 12:13:00 +0300 Subject: [PATCH] (get_display_type): rename to get_panel_type. Signed-off-by: Andrew Borodin --- src/filemanager/cmd.c | 12 ++++++------ src/filemanager/layout.c | 10 +++++----- src/filemanager/layout.h | 2 +- src/filemanager/midnight.h | 2 +- src/filemanager/panel.c | 2 +- src/setup.c | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 00ead8b84..9fe726705 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -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); diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index 527d4b202..def688fa3 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -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; diff --git a/src/filemanager/layout.h b/src/filemanager/layout.h index 1502d8379..18ce3fbbb 100644 --- a/src/filemanager/layout.h +++ b/src/filemanager/layout.h @@ -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); diff --git a/src/filemanager/midnight.h b/src/filemanager/midnight.h index c3ed9c060..01f640f65 100644 --- a/src/filemanager/midnight.h +++ b/src/filemanager/midnight.h @@ -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() diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index 663a9eb62..8d8d9a6e9 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -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; diff --git a/src/setup.c b/src/setup.c index dec1accbd..c46841a0e 100644 --- a/src/setup.c +++ b/src/setup.c @@ -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);