From 0b962e5685edd41b55d5427b894797e725707639 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 3 Apr 2022 18:02:37 +0100 Subject: patch 8.2.4677: the Athena GUI support is outdated Problem: The Athena GUI support is outdated. Solution: Remove the Athena GUI code. --- src/gui.c | 52 ++++++++++++---------------------------------------- 1 file changed, 12 insertions(+), 40 deletions(-) (limited to 'src/gui.c') diff --git a/src/gui.c b/src/gui.c index 3b8c0d0a80..68ac9d804a 100644 --- a/src/gui.c +++ b/src/gui.c @@ -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. */ /* -- cgit v1.2.3