mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
(info_new): use WRect to define a panel area.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
be148a0578
commit
46dde8697b
@ -361,15 +361,14 @@ info_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
WInfo *
|
||||
info_new (int y, int x, int lines, int cols)
|
||||
info_new (const WRect * r)
|
||||
{
|
||||
WRect r = { y, x, lines, cols };
|
||||
WInfo *info;
|
||||
Widget *w;
|
||||
|
||||
info = g_new (struct WInfo, 1);
|
||||
w = WIDGET (info);
|
||||
widget_init (w, &r, info_callback, NULL);
|
||||
widget_init (w, r, info_callback, NULL);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ typedef struct WInfo WInfo;
|
||||
|
||||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
WInfo *info_new (int y, int x, int lines, int cols);
|
||||
WInfo *info_new (const WRect * r);
|
||||
|
||||
/*** inline functions ****************************************************************************/
|
||||
#endif /* MC__INFO_H */
|
||||
|
@ -1188,7 +1188,7 @@ create_panel (int num, panel_view_mode_t type)
|
||||
}
|
||||
|
||||
case view_info:
|
||||
new_widget = WIDGET (info_new (r.y, r.x, r.lines, r.cols));
|
||||
new_widget = WIDGET (info_new (&r));
|
||||
break;
|
||||
|
||||
case view_tree:
|
||||
|
Loading…
Reference in New Issue
Block a user