mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Fixed handling actions in chmod dialog
...in according with 7e6ff9caf9
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
4f5c2e1649
commit
7b28a01feb
@ -232,12 +232,26 @@ chmod_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
|
||||
/* handle checkboxes */
|
||||
if (id >= 0)
|
||||
{
|
||||
c_stat ^= check_perm[id].mode;
|
||||
g_snprintf (buffer, sizeof (buffer), "%o", (unsigned int) c_stat);
|
||||
label_set_text (statl, buffer);
|
||||
chmod_toggle_select (h, id);
|
||||
mode_change = TRUE;
|
||||
return MSG_HANDLED;
|
||||
gboolean sender_is_checkbox = FALSE;
|
||||
unsigned int i;
|
||||
|
||||
/* whether action was sent by checkbox? */
|
||||
for (i = 0; i < check_perm_num; i++)
|
||||
if (sender == (Widget *) check_perm[i].check)
|
||||
{
|
||||
sender_is_checkbox = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (sender_is_checkbox)
|
||||
{
|
||||
c_stat ^= check_perm[id].mode;
|
||||
g_snprintf (buffer, sizeof (buffer), "%o", (unsigned int) c_stat);
|
||||
label_set_text (statl, buffer);
|
||||
chmod_toggle_select (h, id);
|
||||
mode_change = TRUE;
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
}
|
||||
|
||||
return MSG_NOT_HANDLED;
|
||||
|
Loading…
Reference in New Issue
Block a user