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_beval.c | 75 +++++++-------------------------------------------------- 1 file changed, 9 insertions(+), 66 deletions(-) (limited to 'src/gui_beval.c') diff --git a/src/gui_beval.c b/src/gui_beval.c index b460e36fc1..e1b0e4bfd9 100644 --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -24,22 +24,12 @@ # include #else # include -# ifdef FEAT_GUI_MOTIF -# include -# include -# include -# include -# include -# include -# else - // Assume Athena -# include -# ifdef FEAT_GUI_NEXTAW -# include -# else -# include -# endif -# endif +# include +# include +# include +# include +# include +# include #endif #ifndef FEAT_GUI_GTK @@ -618,7 +608,7 @@ pointerEvent(BalloonEval *beval, XEvent *event) break; /* - * Motif and Athena version: Keystrokes will be caught by the + * Motif version: Keystrokes will be caught by the * "textArea" widget, and handled in gui_x11_key_hit_cb(). */ case KeyPress: @@ -1072,11 +1062,10 @@ drawBalloon(BalloonEval *beval) if (beval->msg != NULL) { + XmString s; // Show the Balloon // Calculate the label's width and height -#ifdef FEAT_GUI_MOTIF - XmString s; // For the callback function we parse NL characters to create a // multi-line label. This doesn't work for all languages, but @@ -1101,21 +1090,6 @@ drawBalloon(BalloonEval *beval) h += gui.border_offset << 1; XtVaSetValues(beval->balloonLabel, XmNlabelString, s, NULL); XmStringFree(s); -#else // Athena - // Assume XtNinternational == True - XFontSet fset; - XFontSetExtents *ext; - - XtVaGetValues(beval->balloonLabel, XtNfontSet, &fset, NULL); - ext = XExtentsOfFontSet(fset); - h = ext->max_ink_extent.height; - w = XmbTextEscapement(fset, - (char *)beval->msg, - (int)STRLEN(beval->msg)); - w += gui.border_offset << 1; - h += gui.border_offset << 1; - XtVaSetValues(beval->balloonLabel, XtNlabel, beval->msg, NULL); -#endif // Compute position of the balloon area tx = beval->x_root + EVAL_OFFSET_X; @@ -1124,33 +1098,18 @@ drawBalloon(BalloonEval *beval) tx = beval->screen_width - w; if ((ty + h) > beval->screen_height) ty = beval->screen_height - h; -#ifdef FEAT_GUI_MOTIF XtVaSetValues(beval->balloonShell, XmNx, tx, XmNy, ty, NULL); -#else - // Athena - XtVaSetValues(beval->balloonShell, - XtNx, tx, - XtNy, ty, - NULL); -#endif // Set tooltip colors { Arg args[2]; -#ifdef FEAT_GUI_MOTIF args[0].name = XmNbackground; args[0].value = gui.tooltip_bg_pixel; args[1].name = XmNforeground; args[1].value = gui.tooltip_fg_pixel; -#else // Athena - args[0].name = XtNbackground; - args[0].value = gui.tooltip_bg_pixel; - args[1].name = XtNforeground; - args[1].value = gui.tooltip_fg_pixel; -#endif XtSetValues(beval->balloonLabel, &args[0], XtNumber(args)); } @@ -1198,22 +1157,14 @@ createBalloonEvalWindow(BalloonEval *beval) int n; n = 0; -#ifdef FEAT_GUI_MOTIF XtSetArg(args[n], XmNallowShellResize, True); n++; beval->balloonShell = XtAppCreateShell("balloonEval", "BalloonEval", overrideShellWidgetClass, gui.dpy, args, n); -#else - // Athena - XtSetArg(args[n], XtNallowShellResize, True); n++; - beval->balloonShell = XtAppCreateShell("balloonEval", "BalloonEval", - overrideShellWidgetClass, gui.dpy, args, n); -#endif - n = 0; -#ifdef FEAT_GUI_MOTIF { XmFontList fl; + n = 0; fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset); XtSetArg(args[n], XmNforeground, gui.tooltip_fg_pixel); n++; XtSetArg(args[n], XmNbackground, gui.tooltip_bg_pixel); n++; @@ -1222,14 +1173,6 @@ createBalloonEvalWindow(BalloonEval *beval) beval->balloonLabel = XtCreateManagedWidget("balloonLabel", xmLabelWidgetClass, beval->balloonShell, args, n); } -#else // FEAT_GUI_ATHENA - XtSetArg(args[n], XtNforeground, gui.tooltip_fg_pixel); n++; - XtSetArg(args[n], XtNbackground, gui.tooltip_bg_pixel); n++; - XtSetArg(args[n], XtNinternational, True); n++; - XtSetArg(args[n], XtNfontSet, gui.tooltip_fontset); n++; - beval->balloonLabel = XtCreateManagedWidget("balloonLabel", - labelWidgetClass, beval->balloonShell, args, n); -#endif } #endif // !FEAT_GUI_GTK -- cgit v1.2.3