* chmod.c (chmod_toggle_select): Get id as argument.

This commit is contained in:
Pavel Roskin 2003-09-10 21:35:34 +00:00
parent 0c794a4e95
commit 683c686159
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,7 @@
2003-09-10 Pavel Roskin <proski@gnu.org> 2003-09-10 Pavel Roskin <proski@gnu.org>
* chmod.c (chmod_toggle_select): Get id as argument.
* dlg.h: Remove restroy callback. Widgets should use * dlg.h: Remove restroy callback. Widgets should use
WIDGET_DESTROY. Adjust all dependencies. WIDGET_DESTROY. Adjust all dependencies.

View File

@ -102,10 +102,8 @@ static struct {
{ B_ALL, NORMAL_BUTTON, 0, 0, N_("Set &all") }, { B_ALL, NORMAL_BUTTON, 0, 0, N_("Set &all") },
}; };
static void chmod_toggle_select (Dlg_head *h) static void chmod_toggle_select (Dlg_head *h, int Id)
{ {
int Id = h->current->dlg_id - BUTTONS + single_set * 2;
attrset (COLOR_NORMAL); attrset (COLOR_NORMAL);
check_perm[Id].selected ^= 1; check_perm[Id].selected ^= 1;
@ -163,7 +161,7 @@ chmod_callback (Dlg_head *h, dlg_msg_t msg, int parm)
c_stat ^= check_perm[id].mode; c_stat ^= check_perm[id].mode;
g_snprintf (buffer, sizeof (buffer), "%o", c_stat); g_snprintf (buffer, sizeof (buffer), "%o", c_stat);
label_set_text (statl, buffer); label_set_text (statl, buffer);
chmod_toggle_select (h); chmod_toggle_select (h, id);
mode_change = 1; mode_change = 1;
} }
return MSG_HANDLED; return MSG_HANDLED;
@ -171,7 +169,7 @@ chmod_callback (Dlg_head *h, dlg_msg_t msg, int parm)
case DLG_KEY: case DLG_KEY:
if ((parm == 'T' || parm == 't' || parm == KEY_IC) if ((parm == 'T' || parm == 't' || parm == KEY_IC)
&& h->current->dlg_id >= BUTTONS - single_set * 2) { && h->current->dlg_id >= BUTTONS - single_set * 2) {
chmod_toggle_select (h); chmod_toggle_select (h, id);
if (parm == KEY_IC) if (parm == KEY_IC)
dlg_one_down (h); dlg_one_down (h);
return MSG_HANDLED; return MSG_HANDLED;