mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Remove unneded code
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
7896ea84f6
commit
c8857b3084
@ -294,7 +294,7 @@ sort_box (const panel_field_t *sort_format, int *reverse, int *case_sensitive, i
|
|||||||
/* 4 */
|
/* 4 */
|
||||||
QUICK_CHECKBOX (0, dlg_width, 3, dlg_height, N_("Executable &first"), exec_first),
|
QUICK_CHECKBOX (0, dlg_width, 3, dlg_height, N_("Executable &first"), exec_first),
|
||||||
/* 5 */
|
/* 5 */
|
||||||
QUICK_RADIO (4, dlg_width, 3, dlg_height, SORT_TYPES,
|
QUICK_RADIO (4, dlg_width, 3, dlg_height, 0,
|
||||||
NULL, &sort_idx),
|
NULL, &sort_idx),
|
||||||
QUICK_END
|
QUICK_END
|
||||||
};
|
};
|
||||||
@ -308,6 +308,7 @@ sort_box (const panel_field_t *sort_format, int *reverse, int *case_sensitive, i
|
|||||||
|
|
||||||
sort_orders_names = panel_get_sortable_fields(&sort_names_num);
|
sort_orders_names = panel_get_sortable_fields(&sort_names_num);
|
||||||
quick_widgets[5].u.radio.items = sort_orders_names;
|
quick_widgets[5].u.radio.items = sort_orders_names;
|
||||||
|
quick_widgets[5].u.radio.count = sort_names_num;
|
||||||
|
|
||||||
for (i = 0; i < sort_names_num; i++)
|
for (i = 0; i < sort_names_num; i++)
|
||||||
if (strcmp (sort_orders_names[i], _(sort_format->title_hotkey)) == 0 ) {
|
if (strcmp (sort_orders_names[i], _(sort_format->title_hotkey)) == 0 ) {
|
||||||
@ -332,7 +333,7 @@ sort_box (const panel_field_t *sort_format, int *reverse, int *case_sensitive, i
|
|||||||
for (i = 2; i < 5; i++)
|
for (i = 2; i < 5; i++)
|
||||||
max_check = max (max_check, str_term_width1 (quick_widgets[i].u.checkbox.text) + 4);
|
max_check = max (max_check, str_term_width1 (quick_widgets[i].u.checkbox.text) + 4);
|
||||||
/* radiobuttons */
|
/* radiobuttons */
|
||||||
for (i = 0; i < SORT_TYPES; i++)
|
for (i = 0; i < sort_names_num; i++)
|
||||||
max_radio = max (max_radio, str_term_width1 (sort_orders_names[i]) + 4);
|
max_radio = max (max_radio, str_term_width1 (sort_orders_names[i]) + 4);
|
||||||
|
|
||||||
/* dialog width */
|
/* dialog width */
|
||||||
|
15
src/dir.h
15
src/dir.h
@ -61,21 +61,6 @@ int sort_ctime (file_entry *a, file_entry *b);
|
|||||||
int sort_size (file_entry *a, file_entry *b);
|
int sort_size (file_entry *a, file_entry *b);
|
||||||
int sort_inode (file_entry *a, file_entry *b);
|
int sort_inode (file_entry *a, file_entry *b);
|
||||||
|
|
||||||
/* SORT_TYPES is used to build the nice dialog box entries */
|
|
||||||
#define SORT_TYPES 8
|
|
||||||
|
|
||||||
/* This is the number of sort types not available in that dialog box */
|
|
||||||
#define SORT_TYPES_EXTRA 0
|
|
||||||
|
|
||||||
/* The total nnumber of sort types */
|
|
||||||
#define SORT_TYPES_TOTAL (SORT_TYPES + SORT_TYPES_EXTRA)
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
const char *sort_name;
|
|
||||||
int (*sort_fn)(file_entry *, file_entry *);
|
|
||||||
} sort_orders_t;
|
|
||||||
|
|
||||||
// extern sort_orders_t sort_orders [SORT_TYPES_TOTAL];
|
|
||||||
|
|
||||||
int link_isdir (const file_entry *);
|
int link_isdir (const file_entry *);
|
||||||
int if_link_is_exe (const char *full_name, const file_entry *file);
|
int if_link_is_exe (const char *full_name, const file_entry *file);
|
||||||
|
Loading…
Reference in New Issue
Block a user