mirror of https://github.com/MidnightCommander/mc
(dlg_get_current_widget_id): rename to group_get_current_widget_id.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
e9d23e90f0
commit
95b4a86d44
|
@ -147,12 +147,4 @@ void update_cursor (WDialog * h);
|
|||
/*** inline functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static inline unsigned long
|
||||
dlg_get_current_widget_id (const WDialog * h)
|
||||
{
|
||||
return WIDGET (GROUP (h)->current->data)->id;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
#endif /* MC__DIALOG_H */
|
||||
|
|
|
@ -113,4 +113,10 @@ group_select_current_widget (WGroup * g)
|
|||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static inline unsigned long
|
||||
group_get_current_widget_id (const WGroup * g)
|
||||
{
|
||||
return WIDGET (g->current->data)->id;
|
||||
}
|
||||
|
||||
#endif /* MC__GROUP_H */
|
||||
|
|
|
@ -1065,7 +1065,7 @@ menubar_activate (WMenuBar * menubar, gboolean dropped, int which)
|
|||
if (which >= 0)
|
||||
menubar->selected = (guint) which;
|
||||
|
||||
menubar->previous_widget = dlg_get_current_widget_id (DIALOG (w->owner));
|
||||
menubar->previous_widget = group_get_current_widget_id (w->owner);
|
||||
|
||||
/* Bring it to the top so it receives all mouse events before any other widget.
|
||||
* See also comment in menubar_finish(). */
|
||||
|
|
|
@ -215,6 +215,7 @@ chmod_refresh (WDialog * h)
|
|||
static cb_ret_t
|
||||
chmod_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data)
|
||||
{
|
||||
WGroup *g = GROUP (w);
|
||||
WDialog *h = DIALOG (w);
|
||||
|
||||
switch (msg)
|
||||
|
@ -254,7 +255,7 @@ chmod_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
|||
int i;
|
||||
unsigned long id;
|
||||
|
||||
id = dlg_get_current_widget_id (h);
|
||||
id = group_get_current_widget_id (g);
|
||||
for (i = 0; i < BUTTONS_PERM; i++)
|
||||
if (id == WIDGET (check_perm[i].check)->id)
|
||||
break;
|
||||
|
@ -263,7 +264,7 @@ chmod_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
|||
{
|
||||
chmod_toggle_select (h, i);
|
||||
if (parm == KEY_IC)
|
||||
group_select_next_widget (GROUP (h));
|
||||
group_select_next_widget (g);
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue