Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h alert.c dialog.c setup.c
Log Message:
GSOD: Don't show unused buttons, don't try restarting/exiting E after forking.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.390
retrieving revision 1.391
diff -u -3 -r1.390 -r1.391
--- E.h 12 Mar 2005 15:27:30 -0000 1.390
+++ E.h 13 Mar 2005 12:05:22 -0000 1.391
@@ -1006,6 +1006,7 @@
char master; /* We are the master E */
char single; /* No slaves */
char window; /* Running in virtual root window */
+ pid_t pid;
pid_t master_pid;
int master_screen;
char session_start;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/alert.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- alert.c 2 Mar 2005 19:20:26 -0000 1.41
+++ alert.c 13 Mar 2005 12:05:23 -0000 1.42
@@ -183,12 +183,14 @@
str3 = ExitText;
if (!title)
title = _("Enlightenment Error");
+#if 0
if (!str1)
str1 = _("Ignore");
if (!str2)
str2 = _("Restart");
if (!str3)
str3 = _("Exit");
+#endif
cnum = 0;
colorful = 0;
@@ -239,19 +241,19 @@
win = XCreateWindow(dd, DefaultRootWindow(dd), -100, -100, 1, 1, 0,
CopyFromParent, InputOutput, CopyFromParent, mask, &att);
- if (sscanf(str1, "%s", line) > 0)
+ if (str1 && sscanf(str1, "%s", line) > 0)
{
b1 = XCreateWindow(dd, win, -100, -100, 1, 1, 0, CopyFromParent,
InputOutput, CopyFromParent, mask, &att);
XMapWindow(dd, b1);
}
- if (sscanf(str2, "%s", line) > 0)
+ if (str2 && sscanf(str2, "%s", line) > 0)
{
b2 = XCreateWindow(dd, win, -100, -100, 1, 1, 0, CopyFromParent,
InputOutput, CopyFromParent, mask, &att);
XMapWindow(dd, b2);
}
- if (sscanf(str3, "%s", line) > 0)
+ if (str3 && sscanf(str3, "%s", line) > 0)
{
b3 = XCreateWindow(dd, win, -100, -100, 1, 1, 0, CopyFromParent,
InputOutput, CopyFromParent, mask, &att);
@@ -311,29 +313,39 @@
XUngrabServer(dd);
XSync(dd, False);
- ExTextExtents(xfs, str1, strlen(str1), &rect1, &rect2);
- mh = rect2.width;
- ExTextExtents(xfs, str2, strlen(str2), &rect1, &rect2);
- mh = (rect2.width > mh) ? rect2.width : mh;
- ExTextExtents(xfs, str3, strlen(str3), &rect1, &rect2);
- mh = (rect2.width > mh) ? rect2.width : mh;
+ mh = 0;
+ if (str1)
+ {
+ ExTextExtents(xfs, str1, strlen(str1), &rect1, &rect2);
+ mh = (rect2.width > mh) ? rect2.width : mh;
+ }
+ if (str2)
+ {
+ ExTextExtents(xfs, str2, strlen(str2), &rect1, &rect2);
+ mh = (rect2.width > mh) ? rect2.width : mh;
+ }
+ if (str3)
+ {
+ ExTextExtents(xfs, str3, strlen(str3), &rect1, &rect2);
+ mh = (rect2.width > mh) ? rect2.width : mh;
+ }
mh += 10;
- if (sscanf(str1, "%s", line) > 0)
+ if (str1 && sscanf(str1, "%s", line) > 0)
{
w = 5 + (((580 - mh) * 0) / 4);
XMoveResizeWindow(dd, b1, w, 440 - 15 - fh, mh + 10, fh + 10);
XSelectInput(dd, b1,
ButtonPressMask | ButtonReleaseMask | ExposureMask);
}
- if (sscanf(str2, "%s", line) > 0)
+ if (str2 && sscanf(str2, "%s", line) > 0)
{
w = 5 + (((580 - mh) * 1) / 2);
XMoveResizeWindow(dd, b2, w, 440 - 15 - fh, mh + 10, fh + 10);
XSelectInput(dd, b2,
ButtonPressMask | ButtonReleaseMask | ExposureMask);
}
- if (sscanf(str3, "%s", line) > 0)
+ if (str3 && sscanf(str3, "%s", line) > 0)
{
w = 5 + (((580 - mh) * 2) / 2);
XMoveResizeWindow(dd, b3, w, 440 - 15 - fh, mh + 10, fh + 10);
@@ -443,7 +455,7 @@
k += fh + 2;
}
}
- if (sscanf(str1, "%s", line) > 0)
+ if (str1 && sscanf(str1, "%s", line) > 0)
{
ExTextExtents(xfs, str1, strlen(str1), &rect1, &rect2);
h = rect2.width;
@@ -453,7 +465,7 @@
DRAW_THIN_BOX_IN(dd, gc, win, w, 440 - 17 - fh, mh + 14,
fh + 14);
}
- if (sscanf(str2, "%s", line) > 0)
+ if (str2 && sscanf(str2, "%s", line) > 0)
{
ExTextExtents(xfs, str2, strlen(str2), &rect1, &rect2);
h = rect2.width;
@@ -463,7 +475,7 @@
DRAW_THIN_BOX_IN(dd, gc, win, w, 440 - 17 - fh, mh + 14,
fh + 14);
}
- if (sscanf(str3, "%s", line) > 0)
+ if (str3 && sscanf(str3, "%s", line) > 0)
{
ExTextExtents(xfs, str3, strlen(str3), &rect1, &rect2);
h = rect2.width;
@@ -486,10 +498,12 @@
case 1:
break;
case 2:
- SessionExit(EEXIT_RESTART, NULL);
+ if (getpid() == Mode.wm.pid)
+ SessionExit(EEXIT_RESTART, NULL);
break;
case 3:
- SessionExit(EEXIT_EXIT, NULL);
+ if (getpid() == Mode.wm.pid)
+ SessionExit(EEXIT_EXIT, NULL);
break;
default:
break;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- dialog.c 10 Mar 2005 20:00:59 -0000 1.102
+++ dialog.c 13 Mar 2005 12:05:23 -0000 1.103
@@ -2087,7 +2087,7 @@
va_start(ap, fmt);
Evsnprintf(text, 10240, fmt, ap);
va_end(ap);
- AlertX(_("Attention !!!"), _("OK"), " ", " ", text);
+ AlertX(_("Attention !!!"), _("OK"), NULL, NULL, text);
}
/*
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- setup.c 6 Mar 2005 11:17:04 -0000 1.153
+++ setup.c 13 Mar 2005 12:05:31 -0000 1.154
@@ -120,7 +120,7 @@
/* In case we are going to fork, set up the master pid */
Mode.wm.master = 1;
- Mode.wm.master_pid = getpid();
+ Mode.wm.master_pid = Mode.wm.pid = getpid();
/* Open a connection to the diplay nominated by the DISPLAY variable */
disp = EDisplayOpen(dstr);
@@ -177,6 +177,7 @@
/* We are a slave */
EDisplayDisconnect();
Mode.wm.master = 0;
+ Mode.wm.pid = getpid();
VRoot.scr = i;
#ifdef SIGSTOP
kill(getpid(), SIGSTOP);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs