* src/widget.h (struct WRadio): Remove unused field

`upper_letter_is_hotkey'.
(radio_new): Remove the last argument from the function
declaration - it is unused.
* src/widget.c (radio_new): Remove the last argument from the
function declaration - it is unused.
* src/boxes.c: Adjust all callers to reflect the changes above.
* src/layout.c: Likewise.
* src/listmode.c: Likewise.
* src/option.c: Likewise.
* src/wtools.c: Likewise.
This commit is contained in:
Pavel Tsekov 2006-02-28 16:15:21 +00:00
parent 5d8f17a9c2
commit 049352e884
8 changed files with 25 additions and 13 deletions

View File

@ -1,3 +1,17 @@
2006-02-28 Pavel Tsekov <ptsekov@gmx.net>
* widget.h (struct WRadio): Remove unused field
`upper_letter_is_hotkey'.
(radio_new): Remove the last argument from the function
declaration - it is unused.
* widget.c (radio_new): Remove the last argument from the
function declaration - it is unused.
* boxes.c: Adjust all callers to reflect the changes above.
* layout.c: Likewise.
* listmode.c: Likewise.
* option.c: Likewise.
* wtools.c: Likewise.
2006-02-28 Pavel Tsekov <ptsekov@gmx.net>
* boxes.c (configure_vfs) [!USE_NETCODE]: Fix off-by-one error.

View File

@ -210,7 +210,7 @@ display_init (int radio_sel, char *init_text, int _check_status,
add_widget (dd, user);
input_set_point (user, 0);
my_radio = radio_new (3, 5, LIST_TYPES, displays, 1);
my_radio = radio_new (3, 5, LIST_TYPES, displays);
my_radio->sel = my_radio->pos = current_mode;
add_widget (dd, my_radio);
}
@ -343,7 +343,7 @@ sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive)
c = check_new (3, check_pos, *reverse, reverse_label);
add_widget (dd, c);
my_radio = radio_new (3, 3, SORT_TYPES, sort_orders_names, 1);
my_radio = radio_new (3, 3, SORT_TYPES, sort_orders_names);
my_radio->sel = my_radio->pos = current_mode;
add_widget (dd, my_radio);

View File

@ -486,7 +486,7 @@ init_layout (void)
_first_panel_size = first_panel_size;
_output_lines = output_lines;
add_widget (layout_dlg, check_options[6].widget);
radio_widget = radio_new (3, 6, 2, s_split_direction, 1);
radio_widget = radio_new (3, 6, 2, s_split_direction);
add_widget (layout_dlg, radio_widget);
radio_widget->sel = horizontal_split;
}

View File

@ -196,10 +196,10 @@ init_listmode (char *oldlistformat)
add_widget (listmode_dlg, pname);
}
radio_itemwidth = radio_new (UY + 9, UX + 22, 3, s_itemwidth, 1);
radio_itemwidth = radio_new (UY + 9, UX + 22, 3, s_itemwidth);
add_widget (listmode_dlg, radio_itemwidth);
radio_itemwidth = 0;
radio_justify = radio_new (UY + 5, UX + 22, 3, s_justify, 1);
radio_justify = radio_new (UY + 5, UX + 22, 3, s_justify);
add_widget (listmode_dlg, radio_justify);
radio_justify->sel = 1;
@ -230,10 +230,10 @@ init_listmode (char *oldlistformat)
/* add listbox to the dialogs */
add_widget (listmode_dlg, l_listmode);
radio_columns = radio_new (UY + 1, UX + 32, 2, s_columns, 1);
radio_columns = radio_new (UY + 1, UX + 32, 2, s_columns);
add_widget (listmode_dlg, radio_columns);
radio_columns->sel = format_columns;
radio_genwidth = radio_new (UY + 1, UX + 2, 2, s_genwidth, 1);
radio_genwidth = radio_new (UY + 1, UX + 2, 2, s_genwidth);
add_widget (listmode_dlg, radio_genwidth);
radio_genwidth->sel = format_width;

View File

@ -199,7 +199,7 @@ init_configure (void)
}
pause_radio =
radio_new (RY + 1, RX + 2, 3, pause_options, 1);
radio_new (RY + 1, RX + 2, 3, pause_options);
pause_radio->sel = pause_after_run;
add_widget (conf_dlg, pause_radio);

View File

@ -400,7 +400,7 @@ radio_event (Gpm_Event *event, void *data)
}
WRadio *
radio_new (int y, int x, int count, const char **texts, int use_hotkey)
radio_new (int y, int x, int count, const char **texts)
{
WRadio *r = g_new (WRadio, 1);
int i, max, m;
@ -419,7 +419,6 @@ radio_new (int y, int x, int count, const char **texts, int use_hotkey)
r->sel = 0;
r->count = count;
r->texts = texts;
r->upper_letter_is_hotkey = use_hotkey;
widget_want_hotkey (r->widget, 1);
return r;

View File

@ -31,7 +31,6 @@ typedef struct WRadio {
int pos, sel;
int count; /* number of members */
const char **texts; /* texts of labels */
int upper_letter_is_hotkey; /* If true, then the capital letter is a hk */
} WRadio;
typedef struct WCheck {
@ -126,7 +125,7 @@ typedef struct WGroupbox {
/* Constructors */
WButton *button_new (int y, int x, int action, int flags, const char *text,
bcback callback);
WRadio *radio_new (int y, int x, int count, const char **text, int use_hotkey);
WRadio *radio_new (int y, int x, int count, const char **text);
WCheck *check_new (int y, int x, int state, const char *text);
WInput *input_new (int y, int x, int color, int len, const char *text, const char *histname);
WLabel *label_new (int y, int x, const char *text);

View File

@ -343,7 +343,7 @@ quick_dialog_skip (QuickDialog *qd, int nskip)
break;
case quick_radio:
r = radio_new (ypos, xpos, qw->hotkey_pos, const_cast(const char **, qw->str_result), 1);
r = radio_new (ypos, xpos, qw->hotkey_pos, const_cast(const char **, qw->str_result));
r->pos = r->sel = qw->value;
widget = r;
break;