Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        dialog.c dialog.h session.c 


Log Message:
Fix closing logout dialog when using key bindings.

===================================================================
RCS file: /cvs/e/e16/e/src/dialog.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -3 -r1.161 -r1.162
--- dialog.c    21 Jul 2006 03:17:17 -0000      1.161
+++ dialog.c    24 Jul 2006 20:53:49 -0000      1.162
@@ -201,6 +201,7 @@
 
    char                redraw;
    char                update;
+   char                close;
    int                 xu1, yu1, xu2, yu2;
 };
 
@@ -680,9 +681,15 @@
    DialogShowArranged(d, 1);
 }
 
-static void
+void
 DialogClose(Dialog * d)
 {
+   d->close = 1;
+}
+
+static void
+_DialogClose(Dialog * d)
+{
    if (!d)
       return;
 
@@ -2167,6 +2174,9 @@
        DialogEventKeyPress(d, ev);
        break;
      }
+
+   if (d->close)
+      _DialogClose(d);
 }
 
 static void
@@ -2493,6 +2503,9 @@
        if (db->close)
           DialogClose(d);
      }
+
+   if (d->close)
+      _DialogClose(d);
 }
 
 /*
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- dialog.h    21 Jul 2006 03:17:17 -0000      1.10
+++ dialog.h    24 Jul 2006 20:53:49 -0000      1.11
@@ -78,6 +78,7 @@
 void                DialogShowCentered(Dialog * d);
 void                DialogShowSimple(const DialogDef * dd, void *data);
 void                DialogRedraw(Dialog * d);
+void                DialogClose(Dialog * d);
 
 void                DialogAddButton(Dialog * d, const char *text,
                                    DialogCallbackFunc * func, char doclose,
@@ -86,6 +87,7 @@
                                    const char *txt);
 void                DialogAddFooter(Dialog * d, int flags,
                                    DialogCallbackFunc * cb);
+
 DItem              *DialogInitItem(Dialog * d);
 DItem              *DialogAddItem(DItem * dii, int type);
 Dialog             *DialogItemGetDialog(DItem * di);
===================================================================
RCS file: /cvs/e/e16/e/src/session.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -3 -r1.129 -r1.130
--- session.c   21 Jul 2006 03:17:18 -0000      1.129
+++ session.c   24 Jul 2006 20:53:49 -0000      1.130
@@ -602,7 +602,7 @@
 }
 
 static void
-LogoutCB(Dialog * d __UNUSED__, int val, void *data __UNUSED__)
+LogoutCB(Dialog * d, int val, void *data __UNUSED__)
 {
 #ifdef HAVE_X11_SM_SMLIB_H
    if (sm_conn)
@@ -630,6 +630,8 @@
             break;
          }
      }
+
+   DialogClose(d);
 }
 
 static void



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to