Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
Tag: branch-exp
E.h backgrounds.c borders.c config.c desktops.c dialog.c
iconify.c menus-misc.c progress.c setup.c
Log Message:
Shuffle some things around.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.10
retrieving revision 1.314.2.11
diff -u -3 -r1.314.2.10 -r1.314.2.11
--- E.h 9 Aug 2004 22:35:19 -0000 1.314.2.10
+++ E.h 10 Aug 2004 19:36:24 -0000 1.314.2.11
@@ -499,23 +499,6 @@
}
PmapMask;
-typedef struct _icondef
-{
- char *title_match;
- char *name_match;
- char *class_match;
- char *icon_file;
-}
-Icondef;
-
-typedef struct _actiontype
-{
- void *params;
- struct _actiontype *Next;
- int Type;
-}
-ActionType;
-
typedef struct _list
{
char *name;
@@ -656,6 +639,14 @@
}
TextClass;
+typedef struct _actiontype
+{
+ void *params;
+ struct _actiontype *Next;
+ int Type;
+}
+ActionType;
+
typedef struct _action
{
char event;
@@ -916,14 +907,6 @@
GroupConfig cfg;
};
-typedef struct _awaiticlass
-{
- Window client_win;
- int ewin_bit;
- ImageClass *iclass;
-}
-AwaitIclass;
-
typedef struct _desk
{
char viewable;
@@ -1225,22 +1208,6 @@
}
Qentry;
-typedef struct _progressbar
-{
- char *name;
- int value;
- int x;
- int y;
- int w;
- int h;
- Window win;
- Window n_win;
- Window p_win;
- ImageClass *ic, *inc, *ipc;
- TextClass *tc, *tnc;
-}
-Progressbar;
-
struct _snapshot
{
char *name;
@@ -2279,13 +2246,15 @@
int PagersEventMouseOut(XEvent * ev);
/* progress.c */
-Progressbar *CreateProgressbar(char *name, int width, int height);
-void SetProgressbar(Progressbar * p, int progress);
-void ShowProgressbar(Progressbar * p);
-void HideProgressbar(Progressbar * p);
-void FreeProgressbar(Progressbar * p);
-Window *ListProgressWindows(int *num);
-void RaiseProgressbars(void);
+typedef struct _progressbar Progressbar;
+
+Progressbar *ProgressbarCreate(char *name, int width, int height);
+void ProgressbarDestroy(Progressbar * p);
+void ProgressbarSet(Progressbar * p, int progress);
+void ProgressbarShow(Progressbar * p);
+void ProgressbarHide(Progressbar * p);
+Window *ProgressbarsListWindows(int *num);
+void ProgressbarsRaise(void);
/* regex.c */
int matchregexp(const char *rx, const char *s);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -u -3 -r1.5.2.2 -r1.5.2.3
--- backgrounds.c 7 Aug 2004 15:34:26 -0000 1.5.2.2
+++ backgrounds.c 10 Aug 2004 19:36:26 -0000 1.5.2.3
@@ -704,6 +704,8 @@
void
BackgroundTouch(Background * bg)
{
+ if (bg == NULL)
+ return;
bg->last_viewed = time(NULL);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.221.2.3
retrieving revision 1.221.2.4
diff -u -3 -r1.221.2.3 -r1.221.2.4
--- borders.c 8 Aug 2004 22:31:40 -0000 1.221.2.3
+++ borders.c 10 Aug 2004 19:36:26 -0000 1.221.2.4
@@ -23,6 +23,14 @@
#include "E.h"
#include <sys/time.h>
+typedef struct _awaiticlass
+{
+ Window client_win;
+ int ewin_bit;
+ ImageClass *iclass;
+}
+AwaitIclass;
+
#define EWIN_TOP_EVENT_MASK \
(ButtonPressMask | ButtonReleaseMask | \
EnterWindowMask | LeaveWindowMask | PointerMotionMask /* | \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.111.2.7
retrieving revision 1.111.2.8
diff -u -3 -r1.111.2.7 -r1.111.2.8
--- config.c 8 Aug 2004 22:31:40 -0000 1.111.2.7
+++ config.c 10 Aug 2004 19:36:27 -0000 1.111.2.8
@@ -2770,9 +2770,9 @@
if ((i > 0) && (!p) && (!init_win_ext))
{
- p = CreateProgressbar(_("Enlightenment Starting..."), 400, 16);
+ p = ProgressbarCreate(_("Enlightenment Starting..."), 400, 16);
if (p)
- ShowProgressbar(p);
+ ProgressbarShow(p);
}
if (!strcmp(config_files[i], "...e_autosave.cfg"))
@@ -2793,12 +2793,12 @@
LoadConfigFile(config_files[i]);
if (p)
- SetProgressbar(p, (i * 100) /
+ ProgressbarSet(p, (i * 100) /
(int)(sizeof(config_files) / sizeof(char *)));
}
if (p)
- FreeProgressbar(p);
+ ProgressbarDestroy(p);
}
if (theme)
Efree(theme);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.95.2.5
retrieving revision 1.95.2.6
diff -u -3 -r1.95.2.5 -r1.95.2.6
--- desktops.c 8 Aug 2004 22:49:04 -0000 1.95.2.5
+++ desktops.c 10 Aug 2004 19:36:28 -0000 1.95.2.6
@@ -1051,7 +1051,7 @@
* Build the window stack, top to bottom
*/
- wl2 = ListProgressWindows(&wnum);
+ wl2 = ProgressbarsListWindows(&wnum);
if (wl2)
{
for (i = 0; i < wnum; i++)
@@ -1137,7 +1137,9 @@
XRestackWindows(disp, wl, tot);
EdgeWindowsShow();
- RaiseProgressbars();
+#if 0 /* FIXME Is this necessary? */
+ ProgressbarsRaise();
+#endif
HintsSetClientStacking();
if (wl)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v
retrieving revision 1.91.2.4
retrieving revision 1.91.2.5
diff -u -3 -r1.91.2.4 -r1.91.2.5
--- dialog.c 9 Aug 2004 22:35:19 -0000 1.91.2.4
+++ dialog.c 10 Aug 2004 19:36:29 -0000 1.91.2.5
@@ -2268,7 +2268,7 @@
DItem *di;
DialogDrawArea(d, ev->xexpose.x, ev->xexpose.y,
- ev->xexpose.width, ev->xexpose.height);
+ ev->xexpose.width, ev->xexpose.height);
di = DialogFindDItem(d, win);
if (!di)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.116.2.6
retrieving revision 1.116.2.7
diff -u -3 -r1.116.2.6 -r1.116.2.7
--- iconify.c 8 Aug 2004 22:31:41 -0000 1.116.2.6
+++ iconify.c 10 Aug 2004 19:36:30 -0000 1.116.2.7
@@ -82,6 +82,14 @@
};
+typedef struct
+{
+ char *title_match;
+ char *name_match;
+ char *class_match;
+ char *icon_file;
+} Icondef;
+
/* Silly hack to avoid name clash warning when using -Wshadow */
#define y1 y1_
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/menus-misc.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -3 -r1.1.2.3 -r1.1.2.4
--- menus-misc.c 8 Aug 2004 22:31:42 -0000 1.1.2.3
+++ menus-misc.c 10 Aug 2004 19:36:31 -0000 1.1.2.4
@@ -243,9 +243,9 @@
Esnprintf(s, sizeof(s), "Scanning %s", dir);
if (!init_win_ext)
- p = CreateProgressbar(s, 600, 16);
+ p = ProgressbarCreate(s, 600, 16);
if (p)
- ShowProgressbar(p);
+ ProgressbarShow(p);
f = fopen(cs, "w");
@@ -253,7 +253,7 @@
for (i = 0; i < num; i++)
{
if (p)
- SetProgressbar(p, (i * 100) / num);
+ ProgressbarSet(p, (i * 100) / num);
Esnprintf(ss, sizeof(ss), "%s/%s", dir, list[i]);
/* skip "dot" files and dirs - senisble */
if ((*(list[i]) == '.') || (stat(ss, &st) < 0))
@@ -331,7 +331,7 @@
if (f)
fclose(f);
if (p)
- FreeProgressbar(p);
+ ProgressbarDestroy(p);
if (list)
freestrlist(list, num);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/progress.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -3 -r1.16 -r1.16.2.1
--- progress.c 3 Jun 2004 18:04:46 -0000 1.16
+++ progress.c 10 Aug 2004 19:36:31 -0000 1.16.2.1
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2000-2004 Carsten Haitzler, Geoff Harrison and various contributors
*
@@ -23,11 +22,26 @@
*/
#include "E.h"
+struct _progressbar
+{
+ char *name;
+ int value;
+ int x;
+ int y;
+ int w;
+ int h;
+ Window win;
+ Window n_win;
+ Window p_win;
+ ImageClass *ic, *inc, *ipc;
+ TextClass *tc, *tnc;
+};
+
static int pnum = 0;
static Progressbar **plist = NULL;
Progressbar *
-CreateProgressbar(char *name, int width, int height)
+ProgressbarCreate(char *name, int width, int height)
{
Progressbar *p;
@@ -76,7 +90,73 @@
}
void
-SetProgressbar(Progressbar * p, int progress)
+ProgressbarDestroy(Progressbar * p)
+{
+ int i, j;
+
+ EDBUG(5, "ProgressbarDestroy");
+
+ if (p->name)
+ Efree(p->name);
+ if (p->win)
+ EDestroyWindow(disp, p->win);
+ if (p->win)
+ EDestroyWindow(disp, p->n_win);
+ if (p->win)
+ EDestroyWindow(disp, p->p_win);
+
+ for (i = 0; i < pnum; i++)
+ {
+ if (plist[i] == p)
+ {
+ for (j = i; j < (pnum - 1); j++)
+ {
+ plist[j] = plist[j + 1];
+ plist[j]->y -= p->h;
+ EMoveWindow(disp, p->win, plist[j]->x, plist[j]->y);
+ EMoveWindow(disp, p->n_win,
+ plist[j]->x + plist[j]->w - (plist[j]->h * 5),
+ plist[j]->y);
+ EMoveWindow(disp, p->p_win, plist[j]->x,
+ plist[j]->y + plist[j]->h);
+ }
+ i = pnum;
+ }
+ }
+
+ if (p->ic)
+ p->ic->ref_count--;
+ if (p->inc)
+ p->inc->ref_count--;
+ if (p->ipc)
+ p->ipc->ref_count--;
+
+ if (p->tc)
+ p->tc->ref_count--;
+ if (p->tnc)
+ p->tnc->ref_count--;
+
+ if (p)
+ Efree(p);
+
+ pnum--;
+ if (pnum <= 0)
+ {
+ pnum = 0;
+ if (plist)
+ Efree(plist);
+ plist = NULL;
+ }
+ else
+ {
+ plist = Erealloc(plist, pnum * sizeof(Progressbar *));
+ }
+
+ EDBUG_RETURN_;
+}
+
+void
+ProgressbarSet(Progressbar * p, int progress)
{
int w;
char s[64], pq;
@@ -106,7 +186,7 @@
}
void
-ShowProgressbar(Progressbar * p)
+ProgressbarShow(Progressbar * p)
{
int w;
char pq;
@@ -135,7 +215,7 @@
}
void
-HideProgressbar(Progressbar * p)
+ProgressbarHide(Progressbar * p)
{
EDBUG(5, "HideProgressbar");
EUnmapWindow(disp, p->win);
@@ -144,74 +224,8 @@
EDBUG_RETURN_;
}
-void
-FreeProgressbar(Progressbar * p)
-{
- int i, j;
-
- EDBUG(5, "FreeProgressbar");
-
- if (p->name)
- Efree(p->name);
- if (p->win)
- EDestroyWindow(disp, p->win);
- if (p->win)
- EDestroyWindow(disp, p->n_win);
- if (p->win)
- EDestroyWindow(disp, p->p_win);
-
- for (i = 0; i < pnum; i++)
- {
- if (plist[i] == p)
- {
- for (j = i; j < (pnum - 1); j++)
- {
- plist[j] = plist[j + 1];
- plist[j]->y -= p->h;
- EMoveWindow(disp, p->win, plist[j]->x, plist[j]->y);
- EMoveWindow(disp, p->n_win,
- plist[j]->x + plist[j]->w - (plist[j]->h * 5),
- plist[j]->y);
- EMoveWindow(disp, p->p_win, plist[j]->x,
- plist[j]->y + plist[j]->h);
- }
- i = pnum;
- }
- }
-
- if (p->ic)
- p->ic->ref_count--;
- if (p->inc)
- p->inc->ref_count--;
- if (p->ipc)
- p->ipc->ref_count--;
-
- if (p->tc)
- p->tc->ref_count--;
- if (p->tnc)
- p->tnc->ref_count--;
-
- if (p)
- Efree(p);
-
- pnum--;
- if (pnum <= 0)
- {
- pnum = 0;
- if (plist)
- Efree(plist);
- plist = NULL;
- }
- else
- {
- plist = Erealloc(plist, pnum * sizeof(Progressbar *));
- }
-
- EDBUG_RETURN_;
-}
-
Window *
-ListProgressWindows(int *num)
+ProgressbarsListWindows(int *num)
{
int i, j;
Window *wl;
@@ -234,7 +248,7 @@
}
void
-RaiseProgressbars(void)
+ProgressbarsRaise(void)
{
int i;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.139.2.2
retrieving revision 1.139.2.3
diff -u -3 -r1.139.2.2 -r1.139.2.3
--- setup.c 3 Aug 2004 23:19:06 -0000 1.139.2.2
+++ setup.c 10 Aug 2004 19:36:31 -0000 1.139.2.3
@@ -85,7 +85,9 @@
if (init_win_ext)
XRaiseWindow(disp, init_win_ext);
EdgeWindowsShow();
- RaiseProgressbars();
+#if 0 /* FIXME Is this necessary? */
+ ProgressbarsRaise();
+#endif
EMapWindow(disp, wlist[i]);
}
else
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs