summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-03 18:02:37 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-03 18:02:37 +0100
commit0b962e5685edd41b55d5427b894797e725707639 (patch)
tree0b6bddeb6a2c7da603b71474b87f185dc14a02ea /src/gui.c
parent292e1b9f681054a1de8fa22315ae6eedd7acb205 (diff)
patch 8.2.4677: the Athena GUI support is outdatedv8.2.4677
Problem: The Athena GUI support is outdated. Solution: Remove the Athena GUI code.
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c52
1 files changed, 12 insertions, 40 deletions
diff --git a/src/gui.c b/src/gui.c
index 3b8c0d0a80..68ac9d804a 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -53,15 +53,6 @@ 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.
*
* Careful: This function can be called recursively when there is a ":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.
*/
/*