0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.4677: the Athena GUI support is outdated

Problem:    The Athena GUI support is outdated.
Solution:   Remove the Athena GUI code.
This commit is contained in:
Bram Moolenaar
2022-04-03 18:02:37 +01:00
parent 292e1b9f68
commit 0b962e5685
33 changed files with 102 additions and 6823 deletions

View File

@@ -52,15 +52,6 @@ static void gui_attempt_start(void);
static int can_update_cursor = TRUE; // can display the cursor
static int disable_flush = 0; // If > 0, gui_mch_flush() is disabled.
/*
* The Athena scrollbars can move the thumb to after the end of the scrollbar,
* this makes the thumb indicate the part of the text that is shown. Motif
* can't do this.
*/
#if defined(FEAT_GUI_ATHENA)
# define SCROLL_PAST_END
#endif
/*
* gui_start -- Called when user wants to start the GUI.
*
@@ -445,8 +436,7 @@ gui_init_check(void)
gui.menu_width = 0;
# endif
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_HAIKU))
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_HAIKU))
gui.toolbar_height = 0;
#endif
#if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF)
@@ -789,7 +779,7 @@ gui_init(void)
balloonEval = gui_mch_create_beval_area(gui.drawarea, NULL,
&general_beval_cb, NULL);
# else
# if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# if defined(FEAT_GUI_MOTIF)
{
extern Widget textArea;
balloonEval = gui_mch_create_beval_area(textArea, NULL,
@@ -1441,11 +1431,11 @@ gui_position_components(int total_width UNUSED)
text_area_y += gui.tabline_height;
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_HAIKU) || defined(FEAT_GUI_MSWIN))
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
{
# if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_HAIKU)
# if defined(FEAT_GUI_HAIKU)
gui_mch_set_toolbar_pos(0, text_area_y,
gui.menu_width, gui.toolbar_height);
# endif
@@ -2043,10 +2033,10 @@ gui_write(
old_curwin = curwin;
/*
* We need to make sure this is cleared since Athena doesn't tell us when
* he is done dragging. Do the same for GTK.
* We need to make sure this is cleared since GTK doesn't tell us when
* the user is done dragging.
*/
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_GTK)
gui.dragged_sb = SBAR_NONE;
#endif
@@ -3410,10 +3400,10 @@ button_set:
prev_col = col;
/*
* We need to make sure this is cleared since Athena doesn't tell us when
* he is done dragging. Neither does GTK+ 2 -- at least for now.
* We need to make sure this is cleared since GTK doesn't tell us when
* the user is done dragging.
*/
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_GTK)
gui.dragged_sb = SBAR_NONE;
#endif
}
@@ -3952,9 +3942,6 @@ gui_create_scrollbar(scrollbar_T *sb, int type, win_T *wp)
sb->wp = wp;
sb->type = type;
sb->value = 0;
#ifdef FEAT_GUI_ATHENA
sb->pixval = 0;
#endif
sb->size = 1;
sb->max = 1;
sb->top = 0;
@@ -4336,7 +4323,7 @@ gui_update_scrollbars(
y += gui.menu_height;
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_ATHENA) \
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_HAIKU))
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
y += gui.toolbar_height;
@@ -4369,25 +4356,10 @@ gui_update_scrollbars(
}
}
// Reduce the number of calls to gui_mch_set_scrollbar_thumb() by
// checking if the thumb moved at least a pixel. Only do this for
// Athena, most other GUIs require the update anyway to make the
// arrows work.
#ifdef FEAT_GUI_ATHENA
if (max == 0)
y = 0;
else
y = (val * (sb->height + 2) * gui.char_height + max / 2) / max;
if (force || sb->pixval != y || sb->size != size || sb->max != max)
#else
if (force || sb->value != val || sb->size != size || sb->max != max)
#endif
{
// Thumb of scrollbar has moved
sb->value = val;
#ifdef FEAT_GUI_ATHENA
sb->pixval = y;
#endif
sb->size = size;
sb->max = max;
if (gui.which_scrollbars[SBAR_LEFT]
@@ -5122,7 +5094,7 @@ ex_gui(exarg_T *eap)
|| defined(FEAT_GUI_HAIKU)) \
&& defined(FEAT_TOOLBAR)) || defined(PROTO)
/*
* This is shared between Athena, Haiku, Motif, and GTK.
* This is shared between Haiku, Motif, and GTK.
*/
/*