summaryrefslogtreecommitdiff
path: root/greeter
diff options
context:
space:
mode:
Diffstat (limited to 'greeter')
-rw-r--r--greeter/Login.c34
-rw-r--r--greeter/Login.h14
-rw-r--r--greeter/LoginP.h2
3 files changed, 11 insertions, 39 deletions
diff --git a/greeter/Login.c b/greeter/Login.c
index 400395f..f1aa4e7 100644
--- a/greeter/Login.c
+++ b/greeter/Login.c
@@ -72,13 +72,11 @@ from The Open Group.
#include "greet.h"
#include "LoginP.h"
-#ifdef XPM
-# include <sys/stat.h>
-# include <unistd.h>
-# include <X11/Xlib.h>
-# include <X11/xpm.h>
-# include <X11/extensions/shape.h>
-#endif /* XPM */
+#include <sys/stat.h>
+#include <unistd.h>
+#include <X11/Xlib.h>
+#include <X11/xpm.h>
+#include <X11/extensions/shape.h>
#include <X11/cursorfont.h>
@@ -140,7 +138,6 @@ static XtResource resources[] = {
/* end (caolan) */
#endif /* DANCING */
-#ifdef XPM
/* added by Ivan Griffin (ivan.griffin@ul.ie) */
{XtNlogoFileName, XtCLogoFileName, XtRString, sizeof(char*),
offset(logoFileName), XtRImmediate, (XtPointer)0},
@@ -149,7 +146,6 @@ static XtResource resources[] = {
{XtNlogoPadding, XtCLogoPadding, XtRInt, sizeof(int),
offset(logoPadding), XtRImmediate, (XtPointer) 5},
/* end (ivan) */
-#endif /* XPM */
/* added by Amit Margalit */
{XtNhiColor, XtCForeground, XtRPixel, sizeof (Pixel),
@@ -299,11 +295,7 @@ XmuXftTextWidth(Display *dpy, XftFont *font, FcChar8 *string, int len);
#define STRING_WIDTH(f, s) TEXT_WIDTH (f, s, strlen(s))
/* Padded width of logo image, if compiled with XPM support */
-#ifdef XPM
# define LOGO_W(w) ((w)->login.logoWidth + ((w)->login.logoPadding * 2))
-#else
-# define LOGO_W(w) 0
-#endif
#define TEXT_PROMPT_W(w, m) (STRING_WIDTH(prompt, m) + w->login.inframeswidth)
@@ -722,10 +714,8 @@ draw_it (LoginWidget w)
gr_line_y = GREET_Y(w) + GREET_Y_INC(w);
gr_line_w = w->core.width - 2*(w->login.outframewidth);
-#ifdef XPM
gr_line_x += w->login.logoPadding;
gr_line_w -= w->login.logoWidth + (3 * (w->login.logoPadding));
-#endif /* XPM */
for(i=1;i<=(w->login.sepwidth);i++)
{
@@ -788,9 +778,7 @@ draw_it (LoginWidget w)
if (GREETING(w)[0]) {
int gx = GREET_X(w);
-#ifdef XPM
gx -= ((w->login.logoWidth/2) + w->login.logoPadding);
-#endif
DRAW_STRING (greet, gx, GREET_Y(w), GREETING(w), strlen (GREETING(w)));
}
for (p = 0; p < NUM_PROMPTS ; p++) {
@@ -1751,7 +1739,6 @@ static void Initialize (
w->login.failGC = XtGetGC (gnew, xvaluemask, &myXGCV);
#endif /* USE_XFT */
-#ifdef XPM
w->login.logoValid = False;
if (NULL != w->login.logoFileName)
@@ -1806,7 +1793,6 @@ static void Initialize (
SkipXpmLoad:
-#endif /* XPM */
w->login.data.name[0] = '\0';
w->login.data.passwd[0] = '\0';
w->login.state = INITIALIZING;
@@ -1836,15 +1822,9 @@ SkipXpmLoad:
int fy = FAIL_Y(w);
int pady = PAD_Y(w);
-#ifndef XPM
- w->core.height = fy + pady; /* for stupid compilers */
-#else
-/* w->core.height = fy + pady; * for stupid compilers */
-
w->core.height = max(fy + pady,
(w->login.logoHeight + (2*w->login.logoPadding)) + pady);
-#endif /* XPM */
}
#ifdef USE_XINERAMA
if (
@@ -1897,7 +1877,6 @@ static void Realize (
cursor = XCreateFontCursor(XtDisplay(gw), XC_left_ptr);
XDefineCursor(XtDisplay(gw), DefaultRootWindow(XtDisplay(gw)), cursor);
-#ifdef XPM
/*
* Check if Pixmap was valid
*/
@@ -1941,7 +1920,6 @@ static void Realize (
w->login.logoPixmap);
XMapWindow(XtDisplay(w), w->login.logoWindow);
}
-#endif /* XPM */
}
static void Destroy (Widget gw)
@@ -1974,7 +1952,6 @@ static void Destroy (Widget gw)
XtReleaseGC(gw, w->login.shdGC);
XtReleaseGC(gw, w->login.inpGC);
-#ifdef XPM
if (True == w->login.logoValid)
{
if (w->login.logoPixmap != 0)
@@ -1983,7 +1960,6 @@ static void Destroy (Widget gw)
if (w->login.logoMask != 0)
XFreePixmap(XtDisplay(w), w->login.logoMask);
}
-#endif /* XPM */
}
/* ARGSUSED */
diff --git a/greeter/Login.h b/greeter/Login.h
index 6af3369..dc61955 100644
--- a/greeter/Login.h
+++ b/greeter/Login.h
@@ -124,14 +124,12 @@ from The Open Group.
/* caolan end */
# endif /* DANCING */
-# ifdef XPM
-# define XtNuseShape "useShape"
-# define XtCUseShape "UseShape"
-# define XtNlogoFileName "logoFileName"
-# define XtCLogoFileName "LogoFileName"
-# define XtNlogoPadding "logoPadding"
-# define XtCLogoPadding "LogoPadding"
-# endif /* XPM */
+# define XtNuseShape "useShape"
+# define XtCUseShape "UseShape"
+# define XtNlogoFileName "logoFileName"
+# define XtCLogoFileName "LogoFileName"
+# define XtNlogoPadding "logoPadding"
+# define XtCLogoPadding "LogoPadding"
# define XtCGreeting "Greeting"
# define XtCNamePrompt "NamePrompt"
diff --git a/greeter/LoginP.h b/greeter/LoginP.h
index 57ed182..ccd0edf 100644
--- a/greeter/LoginP.h
+++ b/greeter/LoginP.h
@@ -150,14 +150,12 @@ typedef struct {
int inframeswidth; /* inner frames thickness */
int sepwidth; /* width of separator line */
-# ifdef XPM
char *logoFileName;
unsigned int logoWidth, logoHeight, logoPadding, logoBorderWidth;
int logoX, logoY;
Window logoWindow;
Boolean useShape, logoValid;
Pixmap logoPixmap, logoMask;
-# endif /* XPM */
# ifdef USE_XFT
XftDraw *draw;
XftFont *textFace; /* font for text */