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:
@ -24,22 +24,12 @@
|
||||
# include <gtk/gtk.h>
|
||||
#else
|
||||
# include <X11/keysym.h>
|
||||
# ifdef FEAT_GUI_MOTIF
|
||||
# include <Xm/PushB.h>
|
||||
# include <Xm/Separator.h>
|
||||
# include <Xm/List.h>
|
||||
# include <Xm/Label.h>
|
||||
# include <Xm/AtomMgr.h>
|
||||
# include <Xm/Protocols.h>
|
||||
# else
|
||||
// Assume Athena
|
||||
# include <X11/Shell.h>
|
||||
# ifdef FEAT_GUI_NEXTAW
|
||||
# include <X11/neXtaw/Label.h>
|
||||
# else
|
||||
# include <X11/Xaw/Label.h>
|
||||
# endif
|
||||
# endif
|
||||
# include <Xm/PushB.h>
|
||||
# include <Xm/Separator.h>
|
||||
# include <Xm/List.h>
|
||||
# include <Xm/Label.h>
|
||||
# include <Xm/AtomMgr.h>
|
||||
# include <Xm/Protocols.h>
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user