mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Refactoring: ret rid of set_basic_panel_listing_to().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
34aaab47ba
commit
9612df677a
@ -510,27 +510,6 @@ switch_to_listing (int panel_index)
|
||||
set_display_type (panel_index, view_listing);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/** Handle the tree internal listing modes switching */
|
||||
|
||||
static gboolean
|
||||
set_basic_panel_listing_to (int panel_index, int listing_mode)
|
||||
{
|
||||
WPanel *p;
|
||||
gboolean ok;
|
||||
|
||||
p = PANEL (get_panel_widget (panel_index));
|
||||
switch_to_listing (panel_index);
|
||||
p->list_type = listing_mode;
|
||||
|
||||
ok = set_panel_formats (p) == 0;
|
||||
|
||||
if (ok)
|
||||
do_refresh ();
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** public functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
@ -1647,7 +1626,10 @@ toggle_listing_cmd (void)
|
||||
current = get_current_index ();
|
||||
p = PANEL (get_panel_widget (current));
|
||||
|
||||
set_basic_panel_listing_to (current, (p->list_type + 1) % LIST_TYPES);
|
||||
p->list_type = (p->list_type + 1) % LIST_TYPES;
|
||||
|
||||
if (set_panel_formats (p) == 0)
|
||||
do_refresh ();
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user