remove X resourcessupport
This commit is contained in:
parent
853a41afb4
commit
8be254e5cc
51
xmenu.c
51
xmenu.c
|
@ -10,7 +10,6 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xresource.h>
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
|
@ -183,55 +182,6 @@ initmonitor(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* read xrdb for configuration options */
|
||||
static void
|
||||
initresources(void)
|
||||
{
|
||||
long n;
|
||||
char *type;
|
||||
char *xrm;
|
||||
XrmDatabase xdb;
|
||||
XrmValue xval;
|
||||
|
||||
XrmInitialize();
|
||||
if ((xrm = XResourceManagerString(dpy)) == NULL)
|
||||
return;
|
||||
|
||||
xdb = XrmGetStringDatabase(xrm);
|
||||
|
||||
if (XrmGetResource(xdb, "xmenu.borderWidth", "*", &type, &xval) == True)
|
||||
if ((n = strtol(xval.addr, NULL, 10)) > 0)
|
||||
config.border_pixels = n;
|
||||
if (XrmGetResource(xdb, "xmenu.separatorWidth", "*", &type, &xval) == True)
|
||||
if ((n = strtol(xval.addr, NULL, 10)) > 0)
|
||||
config.separator_pixels = n;
|
||||
if (XrmGetResource(xdb, "xmenu.height", "*", &type, &xval) == True)
|
||||
if ((n = strtol(xval.addr, NULL, 10)) > 0)
|
||||
config.height_pixels = n;
|
||||
if (XrmGetResource(xdb, "xmenu.width", "*", &type, &xval) == True)
|
||||
if ((n = strtol(xval.addr, NULL, 10)) > 0)
|
||||
config.width_pixels = n;
|
||||
if (XrmGetResource(xdb, "xmenu.gap", "*", &type, &xval) == True)
|
||||
if ((n = strtol(xval.addr, NULL, 10)) > 0)
|
||||
config.gap_pixels = n;
|
||||
if (XrmGetResource(xdb, "xmenu.background", "*", &type, &xval) == True)
|
||||
config.background_color = strdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "xmenu.foreground", "*", &type, &xval) == True)
|
||||
config.foreground_color = strdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "xmenu.selbackground", "*", &type, &xval) == True)
|
||||
config.selbackground_color = strdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "xmenu.selforeground", "*", &type, &xval) == True)
|
||||
config.selforeground_color = strdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "xmenu.separator", "*", &type, &xval) == True)
|
||||
config.separator_color = strdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "xmenu.border", "*", &type, &xval) == True)
|
||||
config.border_color = strdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "xmenu.font", "*", &type, &xval) == True)
|
||||
config.font = strdup(xval.addr);
|
||||
|
||||
XrmDestroyDatabase(xdb);
|
||||
}
|
||||
|
||||
/* init draw context */
|
||||
static void
|
||||
initdc(void)
|
||||
|
@ -1299,7 +1249,6 @@ main(int argc, char *argv[])
|
|||
|
||||
/* initializers */
|
||||
initmonitor();
|
||||
initresources();
|
||||
initdc();
|
||||
initiconsize();
|
||||
initatoms();
|
||||
|
|
Loading…
Reference in New Issue