mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(get_display_type): rename to get_panel_type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
615f29d7d5
commit
846e2b9888
@ -457,7 +457,7 @@ nice_cd (const char *text, const char *xtext, const char *help,
|
|||||||
panel_view_mode_t save_type;
|
panel_view_mode_t save_type;
|
||||||
vfs_path_t *cd_vpath;
|
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)
|
if (save_type != view_listing)
|
||||||
create_panel (MENU_PANEL_IDX, 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
|
static void
|
||||||
switch_to_listing (int panel_index)
|
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);
|
create_panel (panel_index, view_listing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1535,9 +1535,9 @@ save_setup_cmd (void)
|
|||||||
void
|
void
|
||||||
info_cmd_no_menu (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);
|
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);
|
create_panel (1, view_listing);
|
||||||
else
|
else
|
||||||
create_panel (current_panel == left_panel ? 1 : 0, view_info);
|
create_panel (current_panel == left_panel ? 1 : 0, view_info);
|
||||||
@ -1548,9 +1548,9 @@ info_cmd_no_menu (void)
|
|||||||
void
|
void
|
||||||
quick_cmd_no_menu (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);
|
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);
|
create_panel (1, view_listing);
|
||||||
else
|
else
|
||||||
create_panel (current_panel == left_panel ? 1 : 0, view_quick);
|
create_panel (current_panel == left_panel ? 1 : 0, view_quick);
|
||||||
|
@ -587,7 +587,7 @@ init_layout (void)
|
|||||||
static void
|
static void
|
||||||
panel_do_cols (int idx)
|
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));
|
set_panel_formats (PANEL (panels[idx].widget));
|
||||||
else
|
else
|
||||||
panel_update_cols (panels[idx].widget, frame_half);
|
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;
|
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);
|
new_widget = restore_into_right_dir_panel (num, last_was_panel, y, x, lines, cols);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1237,7 +1237,7 @@ swap_panels (void)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
panel_view_mode_t
|
panel_view_mode_t
|
||||||
get_display_type (int idx)
|
get_panel_type (int idx)
|
||||||
{
|
{
|
||||||
return panels[idx].type;
|
return panels[idx].type;
|
||||||
}
|
}
|
||||||
@ -1307,7 +1307,7 @@ get_other_type (void)
|
|||||||
void
|
void
|
||||||
save_panel_dir (int idx)
|
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);
|
Widget *widget = get_panel_widget (idx);
|
||||||
|
|
||||||
if ((type == view_listing) && (widget != NULL))
|
if ((type == view_listing) && (widget != NULL))
|
||||||
@ -1336,7 +1336,7 @@ get_panel_dir_for (const WPanel * widget)
|
|||||||
if (i >= MAX_VIEWS)
|
if (i >= MAX_VIEWS)
|
||||||
return g_strdup (".");
|
return g_strdup (".");
|
||||||
|
|
||||||
if (get_display_type (i) == view_listing)
|
if (get_panel_type (i) == view_listing)
|
||||||
{
|
{
|
||||||
vfs_path_t *cwd_vpath;
|
vfs_path_t *cwd_vpath;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void destroy_panels (void);
|
|||||||
void setup_cmdline (void);
|
void setup_cmdline (void);
|
||||||
void create_panel (int num, panel_view_mode_t type);
|
void create_panel (int num, panel_view_mode_t type);
|
||||||
void swap_panels (void);
|
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_current_type (void);
|
||||||
panel_view_mode_t get_other_type (void);
|
panel_view_mode_t get_other_type (void);
|
||||||
int get_current_index (void);
|
int get_current_index (void);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#define MENU_PANEL (mc_global.widget.is_right ? right_panel : left_panel)
|
#define MENU_PANEL (mc_global.widget.is_right ? right_panel : left_panel)
|
||||||
#define MENU_PANEL_IDX (mc_global.widget.is_right ? 1 : 0)
|
#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()
|
#define other_panel get_other_panel()
|
||||||
|
|
||||||
|
@ -4014,7 +4014,7 @@ update_one_panel_widget (WPanel * panel, panel_update_flags_t flags, const char
|
|||||||
static void
|
static void
|
||||||
update_one_panel (int which, panel_update_flags_t flags, const char *current_file)
|
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;
|
WPanel *panel;
|
||||||
|
|
||||||
|
@ -996,11 +996,11 @@ save_panel_types (void)
|
|||||||
if (mc_global.mc_run_mode != MC_RUN_FULL)
|
if (mc_global.mc_run_mode != MC_RUN_FULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
type = get_display_type (0);
|
type = get_panel_type (0);
|
||||||
panel_save_type ("New Left Panel", type);
|
panel_save_type ("New Left Panel", type);
|
||||||
if (type == view_listing)
|
if (type == view_listing)
|
||||||
panel_save_setup (left_panel, left_panel->panel_name);
|
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);
|
panel_save_type ("New Right Panel", type);
|
||||||
if (type == view_listing)
|
if (type == view_listing)
|
||||||
panel_save_setup (right_panel, right_panel->panel_name);
|
panel_save_setup (right_panel, right_panel->panel_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user