* dlg.c: Don't supply ID of the current widget with any
callbacks. It's mostly useless and can be found by the callback. * layout.c: Likewise. * widget.c: Likewise. * chmod.c (chmod_callback): Adjust for the above.
Этот коммит содержится в:
родитель
5ed61a33b7
Коммит
e51f170ad9
@ -1,5 +1,12 @@
|
|||||||
2003-09-10 Pavel Roskin <proski@gnu.org>
|
2003-09-10 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* dlg.c: Don't supply ID of the current widget with any
|
||||||
|
callbacks. It's mostly useless and can be found by the
|
||||||
|
callback.
|
||||||
|
* layout.c: Likewise.
|
||||||
|
* widget.c: Likewise.
|
||||||
|
* chmod.c (chmod_callback): Adjust for the above.
|
||||||
|
|
||||||
* layout.c (layout_change): Make static.
|
* layout.c (layout_change): Make static.
|
||||||
* screen.c (paint_panel): Likewise.
|
* screen.c (paint_panel): Likewise.
|
||||||
* cmd.c (dirsizes_cmd): Use dirty flag.
|
* cmd.c (dirsizes_cmd): Use dirty flag.
|
||||||
|
@ -153,11 +153,14 @@ static cb_ret_t
|
|||||||
chmod_callback (Dlg_head *h, dlg_msg_t msg, int parm)
|
chmod_callback (Dlg_head *h, dlg_msg_t msg, int parm)
|
||||||
{
|
{
|
||||||
char buffer[BUF_TINY];
|
char buffer[BUF_TINY];
|
||||||
|
int id;
|
||||||
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case DLG_ACTION:
|
case DLG_ACTION:
|
||||||
if (parm >= BUTTONS - single_set * 2) {
|
id = h->current->dlg_id - BUTTONS + single_set * 2;
|
||||||
c_stat ^= check_perm[parm - BUTTONS + single_set * 2].mode;
|
|
||||||
|
if (id >= 0) {
|
||||||
|
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);
|
||||||
|
@ -348,7 +348,7 @@ int dlg_focus (Dlg_head *h)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (send_message (h->current->widget, WIDGET_FOCUS, 0)){
|
if (send_message (h->current->widget, WIDGET_FOCUS, 0)){
|
||||||
(*h->callback) (h, DLG_FOCUS, h->current->dlg_id);
|
(*h->callback) (h, DLG_FOCUS, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -361,7 +361,7 @@ dlg_unfocus (Dlg_head *h)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (send_message (h->current->widget, WIDGET_UNFOCUS, 0)){
|
if (send_message (h->current->widget, WIDGET_UNFOCUS, 0)){
|
||||||
(*h->callback) (h, DLG_UNFOCUS, h->current->dlg_id);
|
(*h->callback) (h, DLG_UNFOCUS, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -755,7 +755,7 @@ void init_dlg (Dlg_head *h)
|
|||||||
void dlg_run_done (Dlg_head *h)
|
void dlg_run_done (Dlg_head *h)
|
||||||
{
|
{
|
||||||
if (h->current)
|
if (h->current)
|
||||||
(*h->callback) (h, DLG_END, h->current->dlg_id);
|
(*h->callback) (h, DLG_END, 0);
|
||||||
|
|
||||||
current_dlg = (Dlg_head *) h->previous_dialog;
|
current_dlg = (Dlg_head *) h->previous_dialog;
|
||||||
}
|
}
|
||||||
|
@ -781,8 +781,7 @@ change_screen_size (void)
|
|||||||
setup_panels ();
|
setup_panels ();
|
||||||
|
|
||||||
/* Inform currently running dialog */
|
/* Inform currently running dialog */
|
||||||
(*current_dlg->callback) (current_dlg, DLG_RESIZE,
|
(*current_dlg->callback) (current_dlg, DLG_RESIZE, 0);
|
||||||
current_dlg->current->dlg_id);
|
|
||||||
|
|
||||||
#ifdef RESIZABLE_MENUBAR
|
#ifdef RESIZABLE_MENUBAR
|
||||||
menubar_arrange (the_menubar);
|
menubar_arrange (the_menubar);
|
||||||
|
@ -290,7 +290,7 @@ radio_callback (WRadio *r, int Msg, int Par)
|
|||||||
switch (Par){
|
switch (Par){
|
||||||
case ' ':
|
case ' ':
|
||||||
r->sel = r->pos;
|
r->sel = r->pos;
|
||||||
(*h->callback) (h, DLG_ACTION, h->current->dlg_id);
|
(*h->callback) (h, DLG_ACTION, 0);
|
||||||
radio_callback (r, WIDGET_FOCUS, ' ');
|
radio_callback (r, WIDGET_FOCUS, ' ');
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ radio_callback (WRadio *r, int Msg, int Par)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WIDGET_CURSOR:
|
case WIDGET_CURSOR:
|
||||||
(*h->callback) (h, DLG_ACTION, h->current->dlg_id);
|
(*h->callback) (h, DLG_ACTION, 0);
|
||||||
radio_callback (r, WIDGET_FOCUS, ' ');
|
radio_callback (r, WIDGET_FOCUS, ' ');
|
||||||
widget_move (&r->widget, r->pos, 1);
|
widget_move (&r->widget, r->pos, 1);
|
||||||
break;
|
break;
|
||||||
@ -417,7 +417,7 @@ check_callback (WCheck *c, int Msg, int Par)
|
|||||||
break;
|
break;
|
||||||
c->state ^= C_BOOL;
|
c->state ^= C_BOOL;
|
||||||
c->state ^= C_CHANGE;
|
c->state ^= C_CHANGE;
|
||||||
(*h->callback) (h, DLG_ACTION, h->current->dlg_id);
|
(*h->callback) (h, DLG_ACTION, 0);
|
||||||
check_callback (c, WIDGET_FOCUS, ' ');
|
check_callback (c, WIDGET_FOCUS, ' ');
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user