Trivial cleanups.

SVN revision: 14211
This commit is contained in:
Kim Woelders 2005-04-15 21:07:46 +00:00
parent 3b30212a4d
commit 6b071fb6d2
9 changed files with 3 additions and 136 deletions

View File

@ -60,9 +60,6 @@
#include <Imlib2.h>
#define EAllocColor(pxc) \
XAllocColor(disp, VRoot.cmap, pxc)
#define ENABLE_TRANSPARENCY 1
#define ENABLE_THEME_TRANSPARENCY 1
@ -1067,9 +1064,6 @@ typedef struct
Colormap current_cmap;
Slideout *slideout;
Window context_win;
#if 1 /* Should be removed */
int context_w, context_h;
#endif
char constrained;
char nogroup;
char keybinds_changed;
@ -1735,7 +1729,6 @@ char *field(char *s, int fieldno);
int fillfield(char *s, int fieldno, char *buf);
void fword(char *s, int num, char *wd);
int findLocalizedFile(char *fname);
void rmrf(const char *s);
/* finders.c */
EWin *FindEwinByBase(Window win);
@ -2297,6 +2290,8 @@ Pixmap EWindowGetShapePixmap(Window win);
GC ECreateGC(Drawable d, unsigned long mask, XGCValues * val);
int EFreeGC(GC gc);
#define EAllocColor(pxc) \
XAllocColor(disp, VRoot.cmap, pxc)
void ESetColor(XColor * pxc, int r, int g, int b);
void EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);

View File

@ -110,20 +110,9 @@ BorderWinpartITclassApply(EWin * ewin, int i, int force)
ewb->is = is;
ewb->ts = ts;
#if 0 /* FIXME - Remove? */
ImageclassApply(ewin->border->part[i].iclass, ewb->win,
ewb->w, ewb->h, ewin->active,
EoIsSticky(ewin), ewb->state, ewb->expose, ST_BORDER);
if (ts)
TextclassApply(ewin->border->part[i].iclass, ewb->win,
ewb->w, ewb->h, ewin->active,
EoIsSticky(ewin), ewb->state, ewb->expose,
ewin->border->part[i].tclass, txt);
#else
ITApply(ewb->win, ewin->border->part[i].iclass, is, ewb->w, ewb->h,
ewb->state, ewin->active, EoIsSticky(ewin), ewb->expose, ST_BORDER,
ewin->border->part[i].tclass, ts, txt);
#endif
}
static int
@ -961,32 +950,6 @@ BorderWinpartEventLeave(EWinBit * wbit, XEvent * ev)
}
}
#if 0 /* FIXME */
/* This was in HandleMouseUp() */
{
#if 0
if ((Mode.last_bpress) && (Mode.last_bpress != win))
{
ev->xbutton.window = Mode.last_bpress;
BordersEventMouseOut2(ev);
ev->xbutton.window = win;
}
#endif
}
static void
BorderWinpartEventLeave2(EWinBit * wbit, XEvent * ev, EWin * ewin, int j)
{
ewin->bits[j].left = 0;
ewin->bits[j].state = STATE_NORMAL;
BorderWinpartChange(ewin, j, 0);
return;
ev = NULL;
}
#endif
static void
BorderFrameHandleEvents(XEvent * ev, void *prm)
{
@ -1009,10 +972,6 @@ BorderWinpartHandleEvents(XEvent * ev, void *prm)
switch (ev->type)
{
#if 0
case KeyPress:
break;
#endif
case ButtonPress:
BorderWinpartEventMouseDown(wbit, ev);
break;

View File

@ -28,9 +28,6 @@
struct _ecursor
{
char *name;
#if 0 /* Not used */
Imlib_Color fg, bg;
#endif
char *file;
Cursor cursor;
unsigned int ref_count;
@ -92,10 +89,6 @@ ECursorCreate(const char *name, const char *image, int native_id, XColor * fg,
ec = Emalloc(sizeof(ECursor));
ec->name = Estrdup(name);
ec->file = Estrdup(image);
#if 0 /* Not used */
ec->fg = *fg;
ec->bg = *bg;
#endif
ec->cursor = curs;
ec->ref_count = 0;
#if 0 /* Not used */

View File

@ -692,14 +692,6 @@ DesksControlsDestroy(void)
for (i = 0; i < Conf.desks.num; i++)
DeskControlsDestroy(_DeskGet(i));
#if 0
while ((b = RemoveItem("_DESKTOP_DRAG_CONTROL", 0,
LIST_FINDBY_NAME, LIST_TYPE_BUTTON)))
ButtonDestroy(b);
while ((b = RemoveItem("_DESKTOP_DESKRAY_DRAG_CONTROL", 0,
LIST_FINDBY_NAME, LIST_TYPE_BUTTON)))
ButtonDestroy(b);
#endif
}
static void

View File

@ -802,9 +802,6 @@ AddToFamily(EWin * ewin, Window win)
/* if the window asked to be iconified at the start */
if (ewin->client.start_iconified)
{
#if 0 /* FIXME - Remove? */
EwinBorderDraw(ewin, 1, 1, 0);
#endif
MoveEwinToDesktopAt(ewin, desk, x, y);
ecore_x_ungrab();
ewin->state = EWIN_STATE_MAPPED;
@ -834,9 +831,6 @@ AddToFamily(EWin * ewin, Window win)
ewin->client.already_placed = 1;
x = Mode.x + 1;
y = Mode.y + 1;
#if 0 /* FIXME - Remove? */
EwinBorderDraw(ewin, 1, 1, 0);
#endif
MoveEwinToDesktop(ewin, desk);
RaiseEwin(ewin);
MoveEwin(ewin, x, y);
@ -874,9 +868,6 @@ AddToFamily(EWin * ewin, Window win)
fx = VRoot.w;
fy = (rand() % (VRoot.h)) - EoGetH(ewin);
}
#if 0 /* FIXME - Remove? */
EwinBorderDraw(ewin, 1, 1, 0);
#endif
MoveEwinToDesktop(ewin, desk);
RaiseEwin(ewin);
MoveEwin(ewin, fx, fy);
@ -886,9 +877,6 @@ AddToFamily(EWin * ewin, Window win)
}
else
{
#if 0 /* FIXME - Remove? */
EwinBorderDraw(ewin, 1, 1, 0);
#endif
MoveEwinToDesktopAt(ewin, desk, x, y);
RaiseEwin(ewin);
ShowEwin(ewin);
@ -920,10 +908,6 @@ AddInternalToFamily(Window win, const char *bname, int type, void *ptr,
EoIsFloating(ewin));
#endif
#if 0 /* FIXME - Remove? */
EwinBorderDraw(ewin, 1, 1, 1);
#endif
EwinConformToDesktop(ewin);
EwinDetermineArea(ewin);

View File

@ -869,14 +869,3 @@ findLocalizedFile(char *fname)
return 0;
}
#if 0 /* Not used */
void
rmrf(const char *path)
{
char s[FILEPATH_LEN_MAX];
Esnprintf(s, sizeof(s), "/bin/rm -rf %s", path);
system(s);
}
#endif

View File

@ -162,7 +162,6 @@ void
SignalsSetup(void)
{
/* This function will set up all the signal handlers for E */
doSignalsSetup(1);
}
@ -170,28 +169,7 @@ void
SignalsRestore(void)
{
/* This function will restore all the signal handlers for E */
#if 0
signal(SIGHUP, SIG_DFL);
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
signal(SIGILL, SIG_DFL);
signal(SIGABRT, SIG_DFL);
signal(SIGFPE, SIG_IGN);
signal(SIGSEGV, SIG_IGN);
signal(SIGPIPE, SIG_DFL);
signal(SIGALRM, SIG_DFL);
signal(SIGTERM, SIG_DFL);
signal(SIGUSR1, SIG_DFL);
signal(SIGUSR2, SIG_DFL);
signal(SIGCHLD, SIG_DFL);
#ifdef SIGTSTP
signal(SIGTSTP, SIG_DFL);
#endif
signal(SIGBUS, SIG_IGN);
#else
doSignalsSetup(0);
#endif
}
void

View File

@ -1906,20 +1906,6 @@ PagersReArea(void)
Efree(pl);
}
#if 0
static int
PagersCountForDesktop(int desk)
{
Pager **pl;
int num;
pl = PagersForDesktop(desk, &num);
if (pl)
Efree(pl);
return num;
}
#endif
/*
* Configuration dialog
*/

View File

@ -27,7 +27,6 @@
static char *badtheme = NULL;
static char *badreason = NULL;
static char mustdel = 0;
static const char *const theme_files[] = {
#if ENABLE_THEME_SANITY_CHECKING
@ -260,13 +259,7 @@ ThemeGetDefault(void)
static void
ThemeCleanup(void)
{
if (!mustdel)
return;
/* We don't ever get here because mustdel is never set */
#if 0 /* Don't do recursive theme removal (risky?) */
rmrf(themepath);
#endif
/* TBD */
}
static char *
@ -279,8 +272,6 @@ ThemeExtract(const char *theme)
const char *oktheme = NULL;
char *name;
mustdel = 0;
/* its a directory - just use it "as is" */
if (isdir(theme))
{