Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_alert.c
Log Message:
really - ignore is pointless. restart or exit now.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_alert.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_alert.c 10 Jan 2006 04:23:43 -0000 1.8
+++ e_alert.c 5 Jul 2006 19:38:59 -0000 1.9
@@ -17,11 +17,11 @@
/* local subsystem globals */
static Display *dd = NULL;
-static char *title = NULL, *str1 = NULL, *str2 = NULL, *str3 = NULL;
+static char *title = NULL, *str1 = NULL, *str2 = NULL;
static Font font = 0;
static XFontStruct *fs = NULL;
static GC gc = 0;
-static Window win = 0, b1 = 0, b2 = 0, b3 = 0;
+static Window win = 0, b1 = 0, b2 = 0;
static int ww = 600, hh = 440;
/* externally accessible functions */
@@ -40,9 +40,8 @@
/* dont i18n this - i dont want gettext doing anything as this is called
from a segv */
title = "Enlightenment Error";
- str1 = "(F1) Ignore";
- str2 = "(F2) Restart";
- str3 = "(F3) Exit";
+ str1 = "(F1) Restart";
+ str2 = "(F2) Exit";
wid = DisplayWidth(dd, DefaultScreen(dd));
hih = DisplayHeight(dd, DefaultScreen(dd));
@@ -60,11 +59,8 @@
InputOutput, CopyFromParent, mask, &att);
b2 = XCreateWindow(dd, win, -100, -100, 1, 1, 0, CopyFromParent,
InputOutput, CopyFromParent, mask, &att);
- b3 = XCreateWindow(dd, win, -100, -100, 1, 1, 0, CopyFromParent,
- InputOutput, CopyFromParent, mask, &att);
XMapWindow(dd, b1);
XMapWindow(dd, b2);
- XMapWindow(dd, b3);
gc = XCreateGC(dd, win, 0, &gcv);
XSetForeground(dd, gc, att.border_pixel);
@@ -83,7 +79,6 @@
title = NULL;
str1 = NULL;
str2 = NULL;
- str3 = NULL;
dd = NULL;
font = 0;
fs = NULL;
@@ -111,19 +106,16 @@
}
fh = fs->ascent + fs->descent;
- mh = ((ww - 20) / 3) - 20;
+ mh = ((ww - 20) / 2) - 20;
/* fixed size... */
- w = 5 + (((ww - 20 - mh) * 0) / 4);
+ w = 20;
XMoveResizeWindow(dd, b1, w, hh - 15 - fh, mh + 10, fh + 10);
XSelectInput(dd, b1, ButtonPressMask | ButtonReleaseMask | ExposureMask);
- w = 5 + (((ww - 20 - mh) * 1) / 2);
+ w = ww - 20 - mh;
XMoveResizeWindow(dd, b2, w, hh - 15 - fh, mh + 10, fh + 10);
XSelectInput(dd, b2, ButtonPressMask | ButtonReleaseMask | ExposureMask);
- w = 5 + (((ww - 20 - mh) * 2) / 2);
- XMoveResizeWindow(dd, b3, w, hh - 15 - fh, mh + 10, fh + 10);
- XSelectInput(dd, b3, ButtonPressMask | ButtonReleaseMask | ExposureMask);
-
+
XMapWindow(dd, win);
XGrabPointer(dd, win, True, ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
@@ -137,7 +129,7 @@
XNextEvent(dd, &ev);
switch (ev.type)
{
- case KeyPress:
+ case KeyPress:
key = XKeysymToKeycode(dd, XStringToKeysym("F1"));
if (key == ev.xkey.keycode)
{
@@ -150,26 +142,16 @@
button = 2;
break;
}
- key = XKeysymToKeycode(dd, XStringToKeysym("F3"));
- if (key == ev.xkey.keycode)
- {
- button = 3;
- break;
- }
break;
-
- case ButtonPress:
+ case ButtonPress:
if (ev.xbutton.window == b1)
button = 1;
else if (ev.xbutton.window == b2)
button = 2;
- else if (ev.xbutton.window == b3)
- button = 3;
break;
-
- case Expose:
+ case Expose:
while (XCheckTypedWindowEvent(dd, ev.xexpose.window, Expose, &ev));
-
+
/* outline */
XDrawRectangle(dd, win, gc, 0, 0, ww - 1, hh - 1);
@@ -200,10 +182,6 @@
XDrawRectangle(dd, b2, gc, 0, 0, mh - 1, fh + 10 - 1);
XDrawString(dd, b2, gc, 5 + ((mh - fw) / 2), 5 + fs->ascent, str2,
strlen(str2));
- fw = XTextWidth(fs, str3, strlen(str3));
- XDrawRectangle(dd, b3, gc, 0, 0, mh - 1, fh + 10 - 1);
- XDrawString(dd, b3, gc, 5 + ((mh - fw) / 2), 5 + fs->ascent, str3,
strlen(str3));
-
XSync(dd, False);
break;
@@ -216,15 +194,13 @@
switch (button)
{
- case 1:
- break;
- case 2:
+ case 1:
ecore_app_restart();
break;
- case 3:
+ case 2:
exit(-11);
break;
- default:
+ default:
break;
}
}
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs