Minor fixes, cleanups.

SVN revision: 44038
This commit is contained in:
Kim Woelders 2009-11-29 10:35:52 +00:00
parent 316005b563
commit d2880aba94
9 changed files with 11 additions and 30 deletions

View File

@ -1756,7 +1756,8 @@ DeskDragStart(int desk)
{
Desk *dsk;
if (!(dsk = DeskGet(desk)))
dsk = DeskGet(desk);
if (!dsk)
return;
desks.drag_x0 = Mode.events.cx - EoGetX(dsk);

View File

@ -482,7 +482,6 @@ int EwinListStackIsRaised(const EWin * ewin);
EWin *GetZoomEWin(void);
void ReZoom(EWin * ewin);
char InZoom(void);
char CanZoom(void);
void ZoomInit(void);
void Zoom(EWin * ewin);

View File

@ -237,7 +237,7 @@ EwinIconImageGet(EWin * ewin, int size, int mode)
int i, type;
if (mode < 0 || mode >= N_MODES)
mode = 4;
mode = 1;
for (i = 0; i < N_TYPES; i++)
{

View File

@ -1779,10 +1779,11 @@ doEFuncDeferred(void *data)
ewin = (EWin *) prm[0];
if (ewin && !EwinFindByPtr(ewin))
return 0;
goto done;
EFunc(ewin, (const char *)prm[1]);
done:
Efree(prm[1]);
Efree(data);

View File

@ -323,7 +323,9 @@ FillFlatFileMenu(Menu * m, const char *file)
wd[0] = '\0';
parse(s, "%S%T%S%S", &txt, &icon, &act, &params);
if (icon && (icon = find_icon(icon)))
if (icon)
icon = find_icon(icon);
if (icon)
{
Esnprintf(wd, sizeof(wd), "__FM.%s", icon);
icc = ImageclassFind(wd, 0);

View File

@ -89,8 +89,6 @@ ProgressbarDestroy(Progressbar * p)
{
int i, j, dy;
ProgressbarHide(p);
dy = 2 * p->h;
EobjWindowDestroy(p->win);
EobjWindowDestroy(p->n_win);
@ -188,11 +186,3 @@ ProgressbarShow(Progressbar * p)
EobjsRepaint();
}
void
ProgressbarHide(Progressbar * p)
{
EobjUnmap(p->win);
EobjUnmap(p->n_win);
EobjUnmap(p->p_win);
}

View File

@ -30,6 +30,5 @@ Progressbar *ProgressbarCreate(const char *name, int width, int height);
void ProgressbarDestroy(Progressbar * p);
void ProgressbarSet(Progressbar * p, int progress);
void ProgressbarShow(Progressbar * p);
void ProgressbarHide(Progressbar * p);
#endif /* _PROGRESS_H_ */

View File

@ -334,7 +334,8 @@ ThemePathFind(void)
* Mode.theme.path may be assigned on the command line.
*/
name = (Mode.theme.path) ? Mode.theme.path : Conf.theme.name;
if (name && (s = strchr(name, '.')))
s = (name) ? strchr(name, '.') : NULL;
if (s)
{
*s = 0;
Efree(Mode.theme.variant);

View File

@ -164,12 +164,6 @@ InZoom(void)
return 0;
}
char
CanZoom(void)
{
return zoom_can;
}
void
ZoomInit(void)
{
@ -202,7 +196,7 @@ Zoom(EWin * ewin)
{
const XF86VidModeModeInfo *mode;
if (!CanZoom())
if (!zoom_can)
return;
if (!ewin)
@ -289,12 +283,6 @@ InZoom(void)
return 0;
}
char
CanZoom(void)
{
return 0;
}
void
ZoomInit(void)
{