mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0375: the footer feature is unused
Problem: The footer feature is unused. Solution: Remove FEAT_FOOTER and code.
This commit is contained in:
parent
3c7707680f
commit
c8ac3a072f
@ -5650,13 +5650,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
|||||||
0
|
0
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
{"footer",
|
{"footer", 0},
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
1
|
|
||||||
#else
|
|
||||||
0
|
|
||||||
#endif
|
|
||||||
},
|
|
||||||
{"fork",
|
{"fork",
|
||||||
#if !defined(USE_SYSTEM) && defined(UNIX)
|
#if !defined(USE_SYSTEM) && defined(UNIX)
|
||||||
1
|
1
|
||||||
|
@ -127,6 +127,8 @@
|
|||||||
* Support was removed in 8.1.1093.
|
* Support was removed in 8.1.1093.
|
||||||
* +farsi Farsi (Persian language) Keymap support.
|
* +farsi Farsi (Persian language) Keymap support.
|
||||||
* Removed in patch 8.1.0932
|
* Removed in patch 8.1.0932
|
||||||
|
* +footer Motif only: Add a message area at the bottom of the
|
||||||
|
* main window area.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1133,14 +1135,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
/*
|
|
||||||
* +footer Motif only: Add a message area at the bottom of the
|
|
||||||
* main window area.
|
|
||||||
*/
|
|
||||||
# define FEAT_FOOTER
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* +autochdir 'autochdir' option.
|
* +autochdir 'autochdir' option.
|
||||||
*/
|
*/
|
||||||
|
26
src/gui.c
26
src/gui.c
@ -445,9 +445,6 @@ gui_init_check(void)
|
|||||||
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU))
|
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU))
|
||||||
gui.toolbar_height = 0;
|
gui.toolbar_height = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF)
|
|
||||||
gui.footer_height = 0;
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_BEVAL_TIP
|
#ifdef FEAT_BEVAL_TIP
|
||||||
gui.tooltip_fontset = NOFONTSET;
|
gui.tooltip_fontset = NOFONTSET;
|
||||||
#endif
|
#endif
|
||||||
@ -1530,10 +1527,6 @@ gui_get_base_height(void)
|
|||||||
if (gui_has_tabline())
|
if (gui_has_tabline())
|
||||||
base_height += gui.tabline_height;
|
base_height += gui.tabline_height;
|
||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_FOOTER
|
|
||||||
if (vim_strchr(p_go, GO_FOOTER) != NULL)
|
|
||||||
base_height += gui.footer_height;
|
|
||||||
# endif
|
|
||||||
# if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
|
# if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
|
||||||
base_height += gui_mch_text_area_extra_height();
|
base_height += gui_mch_text_area_extra_height();
|
||||||
# endif
|
# endif
|
||||||
@ -3479,10 +3472,6 @@ gui_init_which_components(char_u *oldval UNUSED)
|
|||||||
#ifdef FEAT_GUI_TABLINE
|
#ifdef FEAT_GUI_TABLINE
|
||||||
int using_tabline;
|
int using_tabline;
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
static int prev_footer = -1;
|
|
||||||
int using_footer = FALSE;
|
|
||||||
#endif
|
|
||||||
#if defined(FEAT_MENU)
|
#if defined(FEAT_MENU)
|
||||||
static int prev_tearoff = -1;
|
static int prev_tearoff = -1;
|
||||||
int using_tearoff = FALSE;
|
int using_tearoff = FALSE;
|
||||||
@ -3556,11 +3545,6 @@ gui_init_which_components(char_u *oldval UNUSED)
|
|||||||
case GO_TOOLBAR:
|
case GO_TOOLBAR:
|
||||||
using_toolbar = TRUE;
|
using_toolbar = TRUE;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
case GO_FOOTER:
|
|
||||||
using_footer = TRUE;
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
case GO_TEAROFF:
|
case GO_TEAROFF:
|
||||||
#if defined(FEAT_MENU)
|
#if defined(FEAT_MENU)
|
||||||
@ -3661,16 +3645,6 @@ gui_init_which_components(char_u *oldval UNUSED)
|
|||||||
fix_size = TRUE;
|
fix_size = TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
if (using_footer != prev_footer)
|
|
||||||
{
|
|
||||||
gui_mch_enable_footer(using_footer);
|
|
||||||
prev_footer = using_footer;
|
|
||||||
need_set_size |= RESIZE_VERT;
|
|
||||||
if (using_footer)
|
|
||||||
fix_size = TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if defined(FEAT_MENU) && !(defined(MSWIN) && !defined(FEAT_TEAROFF))
|
#if defined(FEAT_MENU) && !(defined(MSWIN) && !defined(FEAT_TEAROFF))
|
||||||
if (using_tearoff != prev_tearoff)
|
if (using_tearoff != prev_tearoff)
|
||||||
{
|
{
|
||||||
|
@ -402,10 +402,6 @@ typedef struct Gui
|
|||||||
int tabline_height;
|
int tabline_height;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
int footer_height; // height of the message footer
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(FEAT_TOOLBAR) \
|
#if defined(FEAT_TOOLBAR) \
|
||||||
&& (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_MSWIN))
|
&& (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_MSWIN))
|
||||||
int toolbar_height; // height of the toolbar
|
int toolbar_height; // height of the toolbar
|
||||||
|
117
src/gui_motif.c
117
src/gui_motif.c
@ -75,9 +75,6 @@ static Widget tabLine;
|
|||||||
static Widget tabLine_menu = 0;
|
static Widget tabLine_menu = 0;
|
||||||
static int showing_tabline = 0;
|
static int showing_tabline = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
static Widget footer;
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_MENU
|
#ifdef FEAT_MENU
|
||||||
# if (XmVersion >= 1002)
|
# if (XmVersion >= 1002)
|
||||||
// remember the last set value for the tearoff item
|
// remember the last set value for the tearoff item
|
||||||
@ -87,10 +84,6 @@ static Widget menuBar;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_TOOLBAR
|
#ifdef FEAT_TOOLBAR
|
||||||
# ifdef FEAT_FOOTER
|
|
||||||
static void toolbarbutton_enter_cb(Widget, XtPointer, XEvent *, Boolean *);
|
|
||||||
static void toolbarbutton_leave_cb(Widget, XtPointer, XEvent *, Boolean *);
|
|
||||||
# endif
|
|
||||||
static void reset_focus(void);
|
static void reset_focus(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -574,25 +567,6 @@ gui_x11_create_widgets(void)
|
|||||||
XmNshadowThickness, 0,
|
XmNshadowThickness, 0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
/*
|
|
||||||
* Create the Footer.
|
|
||||||
*/
|
|
||||||
footer = XtVaCreateWidget("footer",
|
|
||||||
xmLabelGadgetClass, vimForm,
|
|
||||||
XmNalignment, XmALIGNMENT_BEGINNING,
|
|
||||||
XmNmarginHeight, 0,
|
|
||||||
XmNmarginWidth, 0,
|
|
||||||
XmNtraversalOn, False,
|
|
||||||
XmNrecomputeSize, False,
|
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
|
||||||
XmNleftOffset, 5,
|
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
|
||||||
XmNbottomAttachment, XmATTACH_FORM,
|
|
||||||
NULL);
|
|
||||||
gui_mch_set_footer((char_u *) "");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Install the callbacks.
|
* Install the callbacks.
|
||||||
*/
|
*/
|
||||||
@ -1315,12 +1289,6 @@ gui_mch_add_menu_item(vimmenu_T *menu, int idx)
|
|||||||
{
|
{
|
||||||
XtAddCallback(menu->id,
|
XtAddCallback(menu->id,
|
||||||
XmNactivateCallback, gui_x11_menu_cb, menu);
|
XmNactivateCallback, gui_x11_menu_cb, menu);
|
||||||
# ifdef FEAT_FOOTER
|
|
||||||
XtAddEventHandler(menu->id, EnterWindowMask, False,
|
|
||||||
toolbarbutton_enter_cb, menu);
|
|
||||||
XtAddEventHandler(menu->id, LeaveWindowMask, False,
|
|
||||||
toolbarbutton_leave_cb, menu);
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2855,58 +2823,6 @@ gui_mch_dialog(
|
|||||||
}
|
}
|
||||||
#endif // FEAT_GUI_DIALOG
|
#endif // FEAT_GUI_DIALOG
|
||||||
|
|
||||||
#if defined(FEAT_FOOTER) || defined(PROTO)
|
|
||||||
|
|
||||||
static int
|
|
||||||
gui_mch_compute_footer_height(void)
|
|
||||||
{
|
|
||||||
Dimension height; // total Toolbar height
|
|
||||||
Dimension top; // XmNmarginTop
|
|
||||||
Dimension bottom; // XmNmarginBottom
|
|
||||||
Dimension shadow; // XmNshadowThickness
|
|
||||||
|
|
||||||
XtVaGetValues(footer,
|
|
||||||
XmNheight, &height,
|
|
||||||
XmNmarginTop, &top,
|
|
||||||
XmNmarginBottom, &bottom,
|
|
||||||
XmNshadowThickness, &shadow,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
return (int) height + top + bottom + (shadow << 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gui_mch_enable_footer(int showit)
|
|
||||||
{
|
|
||||||
if (showit)
|
|
||||||
{
|
|
||||||
gui.footer_height = gui_mch_compute_footer_height();
|
|
||||||
XtManageChild(footer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gui.footer_height = 0;
|
|
||||||
XtUnmanageChild(footer);
|
|
||||||
}
|
|
||||||
XtVaSetValues(textAreaForm, XmNbottomOffset, gui.footer_height, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gui_mch_set_footer(char_u *s)
|
|
||||||
{
|
|
||||||
XmString xms;
|
|
||||||
|
|
||||||
xms = XmStringCreate((char *)s, STRING_TAG);
|
|
||||||
if (xms != NULL)
|
|
||||||
{
|
|
||||||
XtVaSetValues(footer, XmNlabelString, xms, NULL);
|
|
||||||
XmStringFree(xms);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(FEAT_TOOLBAR) || defined(PROTO)
|
#if defined(FEAT_TOOLBAR) || defined(PROTO)
|
||||||
void
|
void
|
||||||
gui_mch_show_toolbar(int showit)
|
gui_mch_show_toolbar(int showit)
|
||||||
@ -3131,39 +3047,6 @@ motif_get_toolbar_colors(
|
|||||||
XmNhighlightColor, hsp,
|
XmNhighlightColor, hsp,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef FEAT_FOOTER
|
|
||||||
/*
|
|
||||||
* The next toolbar enter/leave callbacks should really do balloon help. But
|
|
||||||
* I have to use footer help for backwards compatibility. Hopefully both will
|
|
||||||
* get implemented and the user will have a choice.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
toolbarbutton_enter_cb(
|
|
||||||
Widget w UNUSED,
|
|
||||||
XtPointer client_data,
|
|
||||||
XEvent *event UNUSED,
|
|
||||||
Boolean *cont UNUSED)
|
|
||||||
{
|
|
||||||
vimmenu_T *menu = (vimmenu_T *) client_data;
|
|
||||||
|
|
||||||
if (menu->strings[MENU_INDEX_TIP] != NULL)
|
|
||||||
{
|
|
||||||
if (vim_strchr(p_go, GO_FOOTER) != NULL)
|
|
||||||
gui_mch_set_footer(menu->strings[MENU_INDEX_TIP]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
toolbarbutton_leave_cb(
|
|
||||||
Widget w UNUSED,
|
|
||||||
XtPointer client_data UNUSED,
|
|
||||||
XEvent *event UNUSED,
|
|
||||||
Boolean *cont UNUSED)
|
|
||||||
{
|
|
||||||
gui_mch_set_footer((char_u *) "");
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
||||||
|
@ -254,12 +254,8 @@ static char *(features[]) =
|
|||||||
#else
|
#else
|
||||||
"-folding",
|
"-folding",
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_FOOTER
|
|
||||||
"+footer",
|
|
||||||
#else
|
|
||||||
"-footer",
|
"-footer",
|
||||||
#endif
|
// only interesting on Unix systems
|
||||||
// only interesting on Unix systems
|
|
||||||
#if !defined(USE_SYSTEM) && defined(UNIX)
|
#if !defined(USE_SYSTEM) && defined(UNIX)
|
||||||
"+fork()",
|
"+fork()",
|
||||||
#endif
|
#endif
|
||||||
@ -707,6 +703,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
375,
|
||||||
/**/
|
/**/
|
||||||
374,
|
374,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user