Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        actions.c backgrounds.c desktops.c dialog.c dialog.h focus.c 
        fx.c groups.c iconify.c menus.c mod-trans.c pager.c session.c 
        settings.c snaps.c sound.c tooltips.c 


Log Message:
Trivial function rename, cleanups.

===================================================================
RCS file: /cvs/e/e16/e/src/actions.c,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -3 -r1.199 -r1.200
--- actions.c   21 Apr 2006 23:47:30 -0000      1.199
+++ actions.c   26 Apr 2006 23:43:07 -0000      1.200
@@ -288,7 +288,7 @@
    d = DialogFind("ABOUT_ENLIGHTENMENT");
    if (d)
      {
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
 
@@ -320,7 +320,7 @@
    DialogItemSetText(di, buf);
 
    DialogAddButton(d, _("OK"), NULL, 1, DLG_BUTTON_OK);
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 #if 0                          /* FIXME - Fix */
===================================================================
RCS file: /cvs/e/e16/e/src/backgrounds.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- backgrounds.c       25 Apr 2006 22:40:06 -0000      1.69
+++ backgrounds.c       26 Apr 2006 23:43:07 -0000      1.70
@@ -2000,7 +2000,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_BG");
@@ -2258,7 +2258,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureBG);
 
-   ShowDialog(d);
+   DialogShow(d);
 
    CB_DesktopMiniDisplayRedraw(NULL, 1, area);
    BGSettingsGoTo(tmp_bg);
===================================================================
RCS file: /cvs/e/e16/e/src/desktops.c,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -3 -r1.240 -r1.241
--- desktops.c  21 Apr 2006 22:52:58 -0000      1.240
+++ desktops.c  26 Apr 2006 23:43:07 -0000      1.241
@@ -2356,7 +2356,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_DESKTOPS");
@@ -2473,7 +2473,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureDesktops);
 
-   ShowDialog(d);
+   DialogShow(d);
 
    DialogItemSetCallback(slider, CB_DesktopDisplayRedraw, 0, (void *)area);
    CB_DesktopDisplayRedraw(d, 1, area);
@@ -2577,7 +2577,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_AREA");
@@ -2661,7 +2661,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureAreas);
 
-   ShowDialog(d);
+   DialogShow(d);
 
    CB_AreaDisplayRedraw(d, 1, area);
 }
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -3 -r1.150 -r1.151
--- dialog.c    25 Apr 2006 22:40:06 -0000      1.150
+++ dialog.c    26 Apr 2006 23:43:07 -0000      1.151
@@ -202,6 +202,7 @@
    int                 xu1, yu1, xu2, yu2;
 };
 
+static EWin        *FindEwinByDialog(Dialog * d);
 static int          FindADialog(void);
 
 static void         DialogHandleEvents(XEvent * ev, void *prm);
@@ -570,8 +571,8 @@
    EoSetLayer(ewin, 10);
 }
 
-void
-ShowDialog(Dialog * d)
+static void
+DialogShowArranged(Dialog * d, int center)
 {
    int                 i, w, h, mw, mh;
    EWin               *ewin;
@@ -652,10 +653,10 @@
    else
      {
        EwinResize(ewin, w, h);
-       if (FindADialog() > 1)
-          ArrangeEwin(ewin);
-       else
+       if (center || FindADialog() == 1)
           ArrangeEwinCentered(ewin);
+       else
+          ArrangeEwin(ewin);
      }
 
    DialogRedraw(d);
@@ -664,6 +665,18 @@
 }
 
 void
+DialogShow(Dialog * d)
+{
+   DialogShowArranged(d, 0);
+}
+
+void
+DialogShowCentered(Dialog * d)
+{
+   DialogShowArranged(d, 1);
+}
+
+static void
 DialogClose(Dialog * d)
 {
    if (!d)
@@ -2075,7 +2088,7 @@
    DialogAddButton(d, _("OK"), NULL, 1, DLG_BUTTON_OK);
    DialogBindKey(d, "Return", DialogCallbackClose, 0);
    DialogBindKey(d, "Escape", DialogCallbackClose, 0);
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 void
@@ -2510,7 +2523,7 @@
  * Finders
  */
 
-EWin               *
+static EWin        *
 FindEwinByDialog(Dialog * d)
 {
    EWin               *const *ewins;
@@ -2541,33 +2554,3 @@
 
    return n;
 }
-
-#if 0                          /* Unused */
-static int
-doAlert(EWin * edummy __UNUSED__, const char *params)
-{
-   char               *pp;
-   int                 i;
-
-   pp = Estrdup(params);
-   if (!pp)
-      return 1;
-   if (strlen(pp) <= 0)
-      return 1;
-
-   i = 1;
-   while (pp[i])
-     {
-       if ((pp[i - 1] == '\\') && (params[i] == 'n'))
-         {
-            pp[i - 1] = ' ';
-            pp[i] = '\n';
-         }
-       i++;
-     }
-   DialogAlertOK(pp);
-   Efree(pp);
-
-   return 0;
-}
-#endif
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- dialog.h    9 Apr 2006 10:18:33 -0000       1.7
+++ dialog.h    26 Apr 2006 23:43:07 -0000      1.8
@@ -65,9 +65,9 @@
 void                DialogSetData(Dialog * d, void *data);
 void               *DialogGetData(Dialog * d);
 
+void                DialogShow(Dialog * d);
+void                DialogShowCentered(Dialog * d);
 void                DialogRedraw(Dialog * d);
-void                ShowDialog(Dialog * d);
-void                DialogClose(Dialog * d);
 
 void                DialogAddButton(Dialog * d, const char *text,
                                    DialogCallbackFunc * func, char doclose,
@@ -128,7 +128,5 @@
 void                DialogCallbackClose(Dialog * d, int val, void *data);
 
 void                DialogsInit(void);
-
-EWin               *FindEwinByDialog(Dialog * d);
 
 #endif /* _DIALOG_H_ */
===================================================================
RCS file: /cvs/e/e16/e/src/focus.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -3 -r1.147 -r1.148
--- focus.c     23 Apr 2006 23:18:23 -0000      1.147
+++ focus.c     26 Apr 2006 23:43:07 -0000      1.148
@@ -685,7 +685,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_FOCUS");
@@ -851,7 +851,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureFocus);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /*
===================================================================
RCS file: /cvs/e/e16/e/src/fx.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- fx.c        21 Apr 2006 22:52:59 -0000      1.66
+++ fx.c        26 Apr 2006 23:43:07 -0000      1.67
@@ -981,7 +981,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_FX");
@@ -1018,7 +1018,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureFX);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e16/e/src/groups.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -3 -r1.80 -r1.81
--- groups.c    21 Apr 2006 22:52:59 -0000      1.80
+++ groups.c    26 Apr 2006 23:43:07 -0000      1.81
@@ -687,7 +687,7 @@
    if (d)
      {
        SoundPlay("GROUP_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
      }
    SoundPlay("SOUND_SETTINGS_GROUP");
 
@@ -730,7 +730,7 @@
 
    DialogAddFooter(d, DLG_OC, ChooseGroup);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 typedef struct
@@ -810,7 +810,7 @@
    if (d)
      {
        SoundPlay("GROUP_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
 
@@ -922,7 +922,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureGroup);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static GroupConfig  tmp_group_cfg;
@@ -949,7 +949,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_GROUP");
@@ -1031,7 +1031,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureDefaultGroupSettings);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /*
===================================================================
RCS file: /cvs/e/e16/e/src/iconify.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -3 -r1.201 -r1.202
--- iconify.c   21 Apr 2006 22:52:59 -0000      1.201
+++ iconify.c   26 Apr 2006 23:43:07 -0000      1.202
@@ -2134,7 +2134,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_ICONBOX");
@@ -2333,7 +2333,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureIconbox);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /*
===================================================================
RCS file: /cvs/e/e16/e/src/menus.c,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -3 -r1.240 -r1.241
--- menus.c     23 Apr 2006 23:18:23 -0000      1.240
+++ menus.c     26 Apr 2006 23:43:07 -0000      1.241
@@ -2037,7 +2037,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_MENUS");
@@ -2073,7 +2073,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureMenus);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e16/e/src/mod-trans.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- mod-trans.c 21 Apr 2006 22:52:59 -0000      1.18
+++ mod-trans.c 26 Apr 2006 23:43:07 -0000      1.19
@@ -119,7 +119,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_TRANS");
@@ -283,7 +283,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureTrans);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e16/e/src/pager.c,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -3 -r1.209 -r1.210
--- pager.c     23 Apr 2006 23:18:23 -0000      1.209
+++ pager.c     26 Apr 2006 23:43:07 -0000      1.210
@@ -1736,7 +1736,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_PAGER");
@@ -1890,7 +1890,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigurePager);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /*
===================================================================
RCS file: /cvs/e/e16/e/src/session.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -3 -r1.121 -r1.122
--- session.c   21 Apr 2006 23:47:30 -0000      1.121
+++ session.c   26 Apr 2006 23:43:07 -0000      1.122
@@ -633,7 +633,6 @@
 SessionLogoutConfirm(void)
 {
    Dialog             *d;
-   EWin               *ewin;
 
    d = DialogFind("LOGOUT_DIALOG");
    if (!d)
@@ -657,12 +656,7 @@
        DialogBindKey(d, "Return", LogoutCB, 0);
      }
 
-   ShowDialog(d);
-
-   ewin = FindEwinByDialog(d);
-   if (ewin)
-      ArrangeEwinCentered(ewin);
-   return;
+   DialogShowCentered(d);
 }
 
 void
@@ -760,7 +754,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_SESSION");
@@ -796,5 +790,5 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureSession);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
===================================================================
RCS file: /cvs/e/e16/e/src/settings.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -3 -r1.151 -r1.152
--- settings.c  8 Mar 2006 20:10:27 -0000       1.151
+++ settings.c  26 Apr 2006 23:43:07 -0000      1.152
@@ -52,7 +52,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_MOVERESIZE");
@@ -180,7 +180,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureMoveResize);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static char         tmp_with_leader;
@@ -241,7 +241,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_PLACEMENT");
@@ -410,7 +410,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigurePlacement);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static char         tmp_autoraise;
@@ -437,7 +437,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_AUTORAISE");
@@ -474,7 +474,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureAutoraise);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static char         tmp_dialog_headers;
@@ -505,7 +505,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_MISCELLANEOUS");
@@ -553,7 +553,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureMiscellaneous);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 #if USE_COMPOSITE
@@ -588,7 +588,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_COMPOSITE");
@@ -661,6 +661,6 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureComposite);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 #endif
===================================================================
RCS file: /cvs/e/e16/e/src/snaps.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -3 -r1.117 -r1.118
--- snaps.c     16 Apr 2006 13:27:38 -0000      1.117
+++ snaps.c     26 Apr 2006 23:43:07 -0000      1.118
@@ -680,7 +680,7 @@
    d = DialogFind(s);
    if (d)
      {
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    d = DialogCreate(s);
@@ -945,7 +945,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ApplySnap);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /* list of remembered items for the remember dialog -- it's either
@@ -1018,7 +1018,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_REMEMBER");
@@ -1096,7 +1096,7 @@
 
    DialogAddFooter(d, DLG_OC, CB_ApplyRemember);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /* ... combine writes, only save after a timeout */
===================================================================
RCS file: /cvs/e/e16/e/src/sound.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- sound.c     21 Apr 2006 22:52:59 -0000      1.42
+++ sound.c     26 Apr 2006 23:43:07 -0000      1.43
@@ -448,7 +448,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_AUDIO");
@@ -480,7 +480,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureAudio);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 /*
===================================================================
RCS file: /cvs/e/e16/e/src/tooltips.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -3 -r1.100 -r1.101
--- tooltips.c  23 Apr 2006 23:18:23 -0000      1.100
+++ tooltips.c  26 Apr 2006 23:43:07 -0000      1.101
@@ -847,7 +847,7 @@
    if (d)
      {
        SoundPlay("SOUND_SETTINGS_ACTIVE");
-       ShowDialog(d);
+       DialogShow(d);
        return;
      }
    SoundPlay("SOUND_SETTINGS_TOOLTIPS");
@@ -888,7 +888,7 @@
 
    DialogAddFooter(d, DLG_OAC, CB_ConfigureTooltips);
 
-   ShowDialog(d);
+   DialogShow(d);
 }
 
 static void




-------------------------------------------------------
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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to