Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
      Tag: branch-exp
        E.h Makefile.am aclass.c backgrounds.c buttons.c config.c 
        cursors.c ecore-e16.h emodule.c emodule.h ewins.c fx.c 
        groups.c icccm.c iclass.c iconify.c ipc.c main.c mod-desks.c 
        mod-menus.c mod-misc.c mod-trans.c mod-tt.c pager.c session.c 
        setup.c slideout.c sound.c tclass.c theme.c warp.c 
Added Files:
      Tag: branch-exp
        ecore-e16.c 


Log Message:
Modify configuration handling, various fixups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.47
retrieving revision 1.314.2.48
diff -u -3 -r1.314.2.47 -r1.314.2.48
--- E.h 24 Sep 2004 22:50:05 -0000      1.314.2.47
+++ E.h 25 Sep 2004 16:15:13 -0000      1.314.2.48
@@ -1304,8 +1304,9 @@
  */
 
 /* aclass.c */
-ActionClass        *CreateAclass(const char *name);
 int                 AclassConfigLoad(FILE * fs);
+int                 AclassConfigSave(FILE * fs);
+ActionClass        *CreateAclass(const char *name);
 Action             *CreateAction(char event, char anymod, int mod, int anybut,
                                 int but, char anykey, char *key,
                                 char *tooltipstring);
@@ -1380,6 +1381,8 @@
 Window              EPropWindowGet(Window win, Atom a);
 
 /* backgrounds.c */
+int                 BackgroundsConfigLoad(FILE * fs);
+int                 BackgroundsConfigSave(FILE * fs);
 char               *BackgroundGetUniqueString(Background * bg);
 void                BackgroundPixmapFree(Background * bg);
 void                BackgroundImagesFree(Background * bg, int free_pmap);
@@ -1425,6 +1428,8 @@
 void                HonorIclass(char *s, int id);
 
 /* buttons.c */
+int                 ButtonsConfigLoad(FILE * fs);
+int                 ButtonsConfigSave(FILE * fs);
 Button             *ButtonCreate(const char *name, int id, ImageClass * ic,
                                 ActionClass * aclass, TextClass * tclass,
                                 char *label, char ontop, int flags, int minw,
@@ -1495,7 +1500,7 @@
 int                 ConfigFileLoad(const char *name, const char *themepath,
                                   int (*parse) (FILE * fs));
 int                 ThemeConfigLoad(void);
-void                SaveUserControlConfig(FILE * autosavefile);
+void                SaveUserControlConfig(const char *file);
 void                RecoverUserConfig(void);
 
 /* config-edb.c */
@@ -1983,6 +1988,7 @@
 void                ICCCM_SetEInfoOnAll(void);
 
 /* iclass.c */
+int                 ImageclassConfigLoad(FILE * fs);
 void                TransparencySet(int transparency);
 int                 TransparencyEnabled(void);
 ImageState         *ImageclassGetImageState(ImageClass * ic, int state,
@@ -2181,6 +2187,7 @@
 void                MaxHeight(EWin * ewin, const char *resize_type);
 
 /* slideouts.c */
+int                 SlideoutsConfigLoad(FILE * fs);
 void                SlideoutShow(Slideout * s, EWin * ewin, Window win);
 void                SlideoutHide(Slideout * s);
 
@@ -2237,6 +2244,7 @@
 void                CreateStartupDisplay(char start);
 
 /* tclass.c */
+int                 TextclassConfigLoad(FILE * fs);
 TextClass          *TextclassFind(const char *name, int fallback);
 void                TextclassApply(ImageClass * ic, Window win, int w,
                                   int h, int active, int sticky, int state,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Makefile.am,v
retrieving revision 1.43.2.17
retrieving revision 1.43.2.18
diff -u -3 -r1.43.2.17 -r1.43.2.18
--- Makefile.am 19 Sep 2004 08:02:14 -0000      1.43.2.17
+++ Makefile.am 25 Sep 2004 16:15:14 -0000      1.43.2.18
@@ -39,6 +39,7 @@
        dock.c                  \
        draw.c                  \
        econfig.c               \
+       ecore-e16.c             \
        edge.c                  \
        emodule.c               \
        events.c                \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/aclass.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- aclass.c    19 Sep 2004 08:02:14 -0000      1.1.2.1
+++ aclass.c    25 Sep 2004 16:15:14 -0000      1.1.2.2
@@ -309,7 +309,7 @@
    return err;
 }
 
-static int
+int
 AclassConfigSave(FILE * fs)
 {
    ActionClass        *ac;
@@ -988,7 +988,6 @@
 EModule             ModAclass = {
    "aclass", "ac",
    NULL,
-   AclassConfigLoad, AclassConfigSave,
    {N_IPC_FUNCS, AclassIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.5.2.9
retrieving revision 1.5.2.10
diff -u -3 -r1.5.2.9 -r1.5.2.10
--- backgrounds.c       18 Sep 2004 13:32:25 -0000      1.5.2.9
+++ backgrounds.c       25 Sep 2004 16:15:14 -0000      1.5.2.10
@@ -898,7 +898,7 @@
  */
 #include "conf.h"
 
-static int
+int
 BackgroundsConfigLoad(FILE * fs)
 {
    int                 err = 0;
@@ -1136,7 +1136,7 @@
    return err;
 }
 
-static int
+int
 BackgroundsConfigSave(FILE * fs)
 {
    int                 i, num;
@@ -2609,6 +2609,7 @@
        num = desks.current;
        sscanf(p, "%d %n", &num, &len);
        DesktopSetBg(num, bg, 1);
+       autosave();
      }
    else if (!strncmp(cmd, "xget", 2))
      {
@@ -2716,7 +2717,6 @@
 EModule             ModBackgrounds = {
    "backgrounds", "bg",
    BackgroundsSighan,
-   BackgroundsConfigLoad, BackgroundsConfigSave,
    {N_IPC_FUNCS, BackgroundsIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/buttons.c,v
retrieving revision 1.36.2.7
retrieving revision 1.36.2.8
diff -u -3 -r1.36.2.7 -r1.36.2.8
--- buttons.c   1 Sep 2004 23:37:16 -0000       1.36.2.7
+++ buttons.c   25 Sep 2004 16:15:14 -0000      1.36.2.8
@@ -723,7 +723,7 @@
  */
 #include "conf.h"
 
-static int
+int
 ButtonsConfigLoad(FILE * ConfigFile)
 {
    int                 err = 0;
@@ -936,7 +936,7 @@
    return err;
 }
 
-static int
+int
 ButtonsConfigSave(FILE * fs)
 {
    int                 i, num;
@@ -1030,7 +1030,6 @@
 EModule             ModButtons = {
    "buttons", "btn",
    ButtonsSighan,
-   ButtonsConfigLoad, ButtonsConfigSave,
    {0, NULL},
    {0, NULL}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.111.2.20
retrieving revision 1.111.2.21
diff -u -3 -r1.111.2.20 -r1.111.2.21
--- config.c    19 Sep 2004 08:02:15 -0000      1.111.2.20
+++ config.c    25 Sep 2004 16:15:14 -0000      1.111.2.21
@@ -312,17 +312,17 @@
                       goto done;
 
                    case CONFIG_IMAGECLASS:
-                      err = ModuleConfigLoad("ic", fs);
+                      err = ImageclassConfigLoad(fs);
                       if (err)
                          ConfigAlertLoad(_("Image class"));
                       break;
                    case CONFIG_TOOLTIP:
-                      err = ModuleConfigLoad("tt", fs);
+                      err = TooltipConfigLoad(fs);
                       if (err)
                          ConfigAlertLoad(_("Tooltip"));
                       break;
                    case CONFIG_TEXT:
-                      err = ModuleConfigLoad("tc", fs);
+                      err = TextclassConfigLoad(fs);
                       if (err)
                          ConfigAlertLoad(_("Text class"));
                       break;
@@ -337,23 +337,15 @@
                          ConfigAlertLoad(_("Border"));
                       break;
                    case CONFIG_BUTTON:
-                      err = ModuleConfigLoad("btn", fs);
+                      err = ButtonsConfigLoad(fs);
                       if (err)
                          ConfigAlertLoad(_("Button"));
                       break;
                    case CONFIG_DESKTOP:
-                      err = ModuleConfigLoad("bg", fs);
+                      err = BackgroundsConfigLoad(fs);
                       if (err)
                          ConfigAlertLoad(_("Background"));
                       break;
-#if 1                          /* FIXME - Doesn't belong here */
-                   case CONFIG_IBOX:
-                   case CONFIG_ICONBOX:
-                      err = ModuleConfigLoad("ibox", fs);
-                      if (err)
-                         ConfigAlertLoad(_("Iconbox"));
-                      break;
-#endif
                    case CONFIG_WINDOWMATCH:
                       err = WindowMatchConfigLoad(fs);
                       if (err)
@@ -370,7 +362,7 @@
                          ConfigAlertLoad(_("Action class"));
                       break;
                    case CONFIG_SLIDEOUT:
-                      err = ModuleConfigLoad("slideouts", fs);
+                      err = SlideoutsConfigLoad(fs);
                       if (err)
                          ConfigAlertLoad(_("Slideout"));
                       break;
@@ -562,26 +554,24 @@
    EDBUG_RETURN(0);
 }
 
-/**************************************************************************/
-
-/* This is only called by the master_pid process (see session.c) */
 void
-SaveUserControlConfig(FILE * autosavefile)
+SaveUserControlConfig(const char *file)
 {
+   FILE               *fs;
+
    ConfigurationSave();
 
-   EDBUG(5, "SaveUserControlConfig");
-   if (!autosavefile)
-      EDBUG_RETURN_;
-
-   fprintf(autosavefile, "1001 0\n");
-
-   ModuleConfigSave("aclass", autosavefile);
-   ModuleConfigSave("btn", autosavefile);
-   ModuleConfigSave("ibox", autosavefile);
-   ModuleConfigSave("bg", autosavefile);
+   fs = fopen(file, "w");
+   if (!fs)
+      return;
+
+   fprintf(fs, "1001 0\n");
 
-   fclose(autosavefile);
+   AclassConfigSave(fs);
+   BackgroundsConfigSave(fs);
+   ButtonsConfigSave(fs);
+
+   fclose(fs);
 }
 
 void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/cursors.c,v
retrieving revision 1.20.2.4
retrieving revision 1.20.2.5
diff -u -3 -r1.20.2.4 -r1.20.2.5
--- cursors.c   18 Sep 2004 13:32:26 -0000      1.20.2.4
+++ cursors.c   25 Sep 2004 16:15:14 -0000      1.20.2.5
@@ -376,7 +376,6 @@
 EModule             ModCursors = {
    "cursor", "csr",
    CursorSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, CursorIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ecore-e16.h,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- ecore-e16.h 5 Sep 2004 11:46:44 -0000       1.1.2.4
+++ ecore-e16.h 25 Sep 2004 16:15:14 -0000      1.1.2.5
@@ -42,6 +42,18 @@
 void                ecore_x_grab(void);
 void                ecore_x_ungrab(void);
 
+int                 ecore_x_client_message32_send(Window win, Atom type,
+                                                 long d0, long d1, long d2,
+                                                 long d3, long d4);
+
+void                ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win);
+void                ecore_x_icccm_window_state_set_normal(Ecore_X_Window win);
+void                ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window
+                                                            win);
+
+void                ecore_x_icccm_send_delete_window(Ecore_X_Window win);
+void                ecore_x_icccm_send_take_focus(Ecore_X_Window win);
+
 #endif
 
 extern Atom         _ecore_x_atom_wm_state;
@@ -52,11 +64,3 @@
 #if 0
 extern Atom         _ecore_x_atom_wm_save_yourself;
 #endif
-
-void                ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win);
-void                ecore_x_icccm_window_state_set_normal(Ecore_X_Window win);
-void                ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window
-                                                            win);
-
-void                ecore_x_icccm_send_delete_window(Ecore_X_Window win);
-void                ecore_x_icccm_send_take_focus(Ecore_X_Window win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/emodule.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- emodule.c   1 Sep 2004 23:37:17 -0000       1.1.2.4
+++ emodule.c   25 Sep 2004 16:15:14 -0000      1.1.2.5
@@ -76,53 +76,6 @@
      }
 }
 
-#if 0
-int
-ModuleStart(const char *name)
-{
-   EModule            *em;
-
-   em = EModuleFind(name);
-   if (!em)
-      return -1;
-
-   if (em->Sighan)
-      em->Sighan(ESIGNAL_START);
-
-   return 0;
-}
-#endif
-
-int
-ModuleConfigLoad(const char *name, FILE * fs)
-{
-   const EModule      *em;
-
-   em = EModuleFind(name);
-   if (!em)
-      return -1;
-
-   if (em->ConfigLoad)
-      em->ConfigLoad(fs);
-
-   return 0;
-}
-
-int
-ModuleConfigSave(const char *name, FILE * fs)
-{
-   const EModule      *em;
-
-   em = EModuleFind(name);
-   if (!em)
-      return -1;
-
-   if (em->ConfigSave)
-      em->ConfigSave(fs);
-
-   return 0;
-}
-
 int
 ModuleConfigSet(const char *name, const char *item, const char *params)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/emodule.h,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -3 -r1.1.2.7 -r1.1.2.8
--- emodule.h   17 Sep 2004 14:28:34 -0000      1.1.2.7
+++ emodule.h   25 Sep 2004 16:15:14 -0000      1.1.2.8
@@ -30,8 +30,6 @@
    const char         *name;
    const char         *nick;
    void                (*Signal) (int sig, void *prm);
-   int                 (*ConfigLoad) (FILE * fs);
-   int                 (*ConfigSave) (FILE * fs);
    struct
    {
       int                 num;
@@ -84,8 +82,6 @@
 const EModule     **ModuleListGet(int *num);
 void                ModuleListFree(const EModule ** lst);
 
-int                 ModuleConfigLoad(const char *name, FILE * fs);
-int                 ModuleConfigSave(const char *name, FILE * fs);
 int                 ModuleConfigSet(const char *name, const char *item,
                                    const char *params);
 int                 ModuleConfigShow(const char *name, const char *item);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -u -3 -r1.1.2.18 -r1.1.2.19
--- ewins.c     24 Sep 2004 22:50:08 -0000      1.1.2.18
+++ ewins.c     25 Sep 2004 16:15:14 -0000      1.1.2.19
@@ -632,7 +632,7 @@
    /* grab that server */
    ecore_x_grab();
    speed = Conf.slidespeedmap;
-   doslide = Conf.mapslide;
+   doslide = Conf.mapslide && !Mode.wm.startup;
    manplace = 0;
    /* adopt the new baby */
    ewin = Adopt(win);
@@ -1908,10 +1908,6 @@
 static void
 EwinsInit(void)
 {
-   ecore_x_grab();
-   MapUnmap(0);
-   ecore_x_ungrab();
-
    EventCallbackRegister(VRoot.win, 0, EwinHandleEventsRoot, NULL);
 }
 
@@ -1928,6 +1924,7 @@
      case ESIGNAL_INIT:
        EwinsInit();
        break;
+#if 0
      case ESIGNAL_CONFIGURE:
        if (!Conf.mapslide || Mode.wm.restart)
           MapUnmap(1);
@@ -1936,6 +1933,7 @@
        if (Conf.mapslide && !Mode.wm.restart)
           MapUnmap(1);
        break;
+#endif
      }
 }
 
@@ -1954,7 +1952,6 @@
 EModule             ModEwins = {
    "ewins", NULL,
    EwinsSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, EwinsIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/fx.c,v
retrieving revision 1.41.2.10
retrieving revision 1.41.2.11
diff -u -3 -r1.41.2.10 -r1.41.2.11
--- fx.c        18 Sep 2004 13:32:27 -0000      1.41.2.10
+++ fx.c        25 Sep 2004 16:15:14 -0000      1.41.2.11
@@ -1130,7 +1130,6 @@
 EModule             ModEffects = {
    "effects", "efx",
    FxSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, FxIpcArray},
    {N_CFG_ITEMS, FxCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/groups.c,v
retrieving revision 1.57.2.5
retrieving revision 1.57.2.6
diff -u -3 -r1.57.2.5 -r1.57.2.6
--- groups.c    1 Sep 2004 23:37:17 -0000       1.57.2.5
+++ groups.c    25 Sep 2004 16:15:15 -0000      1.57.2.6
@@ -1247,7 +1247,6 @@
 EModule             ModGroups = {
    "groups", "grp",
    GroupsSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, GroupsIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.76.2.6
retrieving revision 1.76.2.7
diff -u -3 -r1.76.2.6 -r1.76.2.7
--- icccm.c     21 Sep 2004 19:28:55 -0000      1.76.2.6
+++ icccm.c     25 Sep 2004 16:15:16 -0000      1.76.2.7
@@ -37,17 +37,6 @@
 static Atom         E_XA_WM_CLIENT_LEADER = 0;
 static Atom         E_XA_WM_TRANSIENT_FOR = 0;
 
-#ifndef USE_ECORE_X
-Atom                _ecore_x_atom_wm_state = 0;
-Atom                _ecore_x_atom_wm_protocols = 0;
-Atom                _ecore_x_atom_wm_delete_window = 0;
-Atom                _ecore_x_atom_wm_take_focus = 0;
-
-#if 0
-Atom                _ecore_x_atom_wm_save_yourself = 0;
-#endif
-#endif
-
 void
 ICCCM_Init(void)
 {
@@ -1201,75 +1190,3 @@
 
    EDBUG_RETURN_;
 }
-
-#ifndef USE_ECORE_X
-
-static void
-ecore_x_icccm_window_state_set(Ecore_X_Window win, unsigned int state)
-{
-   unsigned long       c[2];
-
-   c[0] = state;
-   c[1] = 0;
-   XChangeProperty(_ecore_x_disp, win, _ecore_x_atom_wm_state,
-                  _ecore_x_atom_wm_state, 32, PropModeReplace,
-                  (unsigned char *)c, 2);
-}
-
-void
-ecore_x_icccm_window_state_set_iconic(Ecore_X_Window win)
-{
-   ecore_x_icccm_window_state_set(win, IconicState);
-}
-
-void
-ecore_x_icccm_window_state_set_normal(Ecore_X_Window win)
-{
-   ecore_x_icccm_window_state_set(win, NormalState);
-}
-
-void
-ecore_x_icccm_window_state_set_withdrawn(Ecore_X_Window win)
-{
-   ecore_x_icccm_window_state_set(win, WithdrawnState);
-}
-
-static void
-ecore_x_icccm_client_message_send(Ecore_X_Window win,
-                                 Ecore_X_Atom atom, Ecore_X_Time ts)
-{
-   XEvent              ev;
-
-   ev.type = ClientMessage;
-   ev.xclient.window = win;
-   ev.xclient.message_type = _ecore_x_atom_wm_protocols;
-   ev.xclient.format = 32;
-   ev.xclient.data.l[0] = atom;
-   ev.xclient.data.l[1] = ts;
-   XSendEvent(_ecore_x_disp, win, False, 0, &ev);
-}
-
-void
-ecore_x_icccm_send_delete_window(Ecore_X_Window win)
-{
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_delete_window,
-                                    CurrentTime);
-}
-
-void
-ecore_x_icccm_send_take_focus(Ecore_X_Window win)
-{
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_take_focus,
-                                    CurrentTime);
-}
-
-#if 0
-void
-ecore_x_icccm_send_save_yourself(Ecore_X_Window win)
-{
-   ecore_x_icccm_client_message_send(win, _ecore_x_atom_wm_save_yourself,
-                                    CurrentTime);
-}
-#endif
-
-#endif /* USE_ECORE_X */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v
retrieving revision 1.46.2.8
retrieving revision 1.46.2.9
diff -u -3 -r1.46.2.8 -r1.46.2.9
--- iclass.c    24 Sep 2004 22:40:32 -0000      1.46.2.8
+++ iclass.c    25 Sep 2004 16:15:16 -0000      1.46.2.9
@@ -383,7 +383,7 @@
    EDBUG_RETURN_;
 }
 
-static int
+int
 ImageclassConfigLoad(FILE * fs)
 {
    int                 err = 0;
@@ -1302,7 +1302,7 @@
    char                pq;
    ImageClass         *ic;
 
-   if (params)
+   if (!params)
      {
        IpcPrintf("Please specify...\n");
        return;
@@ -1483,7 +1483,6 @@
 EModule             ModImageclass = {
    "imageclass", "ic",
    ImageclassSighan,
-   ImageclassConfigLoad, NULL,
    {N_IPC_FUNCS, ImageclassIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.116.2.21
retrieving revision 1.116.2.22
diff -u -3 -r1.116.2.21 -r1.116.2.22
--- iconify.c   21 Sep 2004 21:57:19 -0000      1.116.2.21
+++ iconify.c   25 Sep 2004 16:15:16 -0000      1.116.2.22
@@ -26,6 +26,7 @@
 
 typedef struct _iconbox Iconbox;
 
+static void         IconboxesConfigSave(void);
 static void         UpdateAppIcon(EWin * ewin, int imode);
 static Iconbox     *SelectIconboxForEwin(EWin * ewin);
 
@@ -374,7 +375,7 @@
    AddItem(ib, ib->name, 0, LIST_TYPE_ICONBOX);
 
    if (ib->type == 1)
-      SystrayInit(ib, ib->icon_win, 0);
+      SystrayInit(ib, ib->icon_win, VRoot.scr);
 
    return ib;
 }
@@ -402,7 +403,7 @@
    EDestroyWindow(disp, ib->win);
 
    Efree(ib);
-   autosave();
+   IconboxesConfigSave();
 }
 
 #if 0                          /* Not used */
@@ -2523,7 +2524,7 @@
 static char         tmp_ib_animate;
 
 static void
-CB_ConfigureIconbox(int val, void *data)
+CB_ConfigureIconbox(int val, void *data __UNUSED__)
 {
    if (val < 2)
      {
@@ -2549,9 +2550,9 @@
        ib->auto_resize_anchor = tmp_ib_autoresize_anchor;
        ib->animate = tmp_ib_animate;
        IB_CompleteRedraw(ib);
+
+       IconboxesConfigSave();
      }
-   autosave();
-   data = NULL;
 }
 
 static void
@@ -2853,31 +2854,24 @@
  */
 #include "conf.h"
 
-static int
-IconboxesConfigLoad(FILE * fs)
+static void
+IconboxesConfigLoad(void)
 {
    int                 err = 0;
+   FILE               *fs;
    char                s[FILEPATH_LEN_MAX];
    char                s2[FILEPATH_LEN_MAX];
-   int                 i1;
+   int                 i1, i2;
    int                 fields;
    Iconbox            *ib;
 
-#if 0
-   int                 i, num;
-   Iconbox           **ibl;
-
-   ibl = IconboxesList(&num);
-   if (ibl)
-     {
-       for (i = 0; i < num; i++)
-          IconboxDestroy(ibl[i]);
-       Efree(ibl);
-     }
-#endif
+   Esnprintf(s, sizeof(s), "%s.ibox", EGetSavePrefix());
+   fs = fopen(s, "r");
+   if (!fs)
+      return;
 
    ib = NULL;
-   while (GetLine(s, sizeof(s), fs))
+   while (fgets(s, sizeof(s), fs))
      {
        s2[0] = 0;
        i1 = CONFIG_INVALID;
@@ -2893,6 +2887,17 @@
 
        switch (i1)
          {
+         case CONFIG_IBOX:
+            err = -1;
+            i2 = atoi(s2);
+            if (i2 != CONFIG_OPEN)
+               goto done;
+            break;
+         case CONFIG_CLOSE:
+            ib = NULL;
+            err = 0;
+            break;
+
          case CONFIG_CLASSNAME:        /* __NAME %s */
             ib = FindItem(s2, 0, LIST_FINDBY_NAME, LIST_TYPE_ICONBOX);
             if (ib)
@@ -2951,32 +2956,36 @@
             if (ib)
                ib->animate = (char)atoi(s2);
             break;
-         case CONFIG_CLOSE:
-            goto done;
          default:
-            Alert(_("Warning: unable to determine what to do with\n"
-                    "the following text in the middle of current "
-                    "Iconbox definition:\n"
-                    "%s\nWill ignore and continue...\n"), s);
+            Eprintf("Warning: Iconbox configuration, ignoring: %s\n", s);
             break;
          }
      }
-   err = -1;
+   if (err)
+      Eprintf("Error: Iconbox configuration file load problem.\n");
 
  done:
-   return err;
+   fclose(fs);
 }
 
-static int
-IconboxesConfigSave(FILE * fs)
+static void
+IconboxesConfigSave(void)
 {
+   char                s[FILEPATH_LEN_MAX];
+   FILE               *fs;
    int                 i, num;
    Iconbox           **iblist;
 
    iblist = IconboxesList(&num);
    if (!iblist)
-      return 0;
+      return;
 
+   Esnprintf(s, sizeof(s), "%s.ibox", EGetSavePrefix());
+   fs = fopen(s, "w");
+   if (!fs)
+      return;
+
+   /* We should check for errors... */
    for (i = num - 1; i >= 0; i--)
      {
        fprintf(fs, "19 999\n");
@@ -2998,7 +3007,7 @@
      }
    Efree(iblist);
 
-   return 0;
+   fclose(fs);
 }
 
 /*
@@ -3012,9 +3021,12 @@
 
    switch (sig)
      {
+     case ESIGNAL_CONFIGURE:
+       IconboxesConfigLoad();
+       IconboxesShow();
+       break;
      case ESIGNAL_START:
        /* We should create one if enabled and none existing */
-       IconboxesShow();
        break;
      case ESIGNAL_EWIN_ICONIFY:
        ewin = (EWin *) prm;
@@ -3092,6 +3104,7 @@
          }
        ib = IconboxCreate(prm);
        IconboxShow(ib);
+       IconboxesConfigSave();
      }
 }
 
@@ -3121,7 +3134,6 @@
 EModule             ModIconboxes = {
    "iconboxes", "ibox",
    IconboxesSighan,
-   IconboxesConfigLoad, IconboxesConfigSave,
    {N_IPC_FUNCS, IconboxesIpcArray},
    {0, NULL}
 };
@@ -3147,32 +3159,6 @@
 
 #define XEMBED_EMBEDDED_NOTIFY      0
 
-#ifndef USE_ECORE_X
-extern Display     *_ecore_x_disp;
-int                 ecore_x_client_message32_send(Window win, Atom type,
-                                                 long d0, long d1, long d2,
-                                                 long d3, long d4);
-
-int
-ecore_x_client_message32_send(Window win, Atom type, long d0, long d1,
-                             long d2, long d3, long d4)
-{
-   XEvent              xev;
-
-   xev.xclient.window = win;
-   xev.xclient.type = ClientMessage;
-   xev.xclient.message_type = type;
-   xev.xclient.format = 32;
-   xev.xclient.data.l[0] = d0;
-   xev.xclient.data.l[1] = d1;
-   xev.xclient.data.l[2] = d2;
-   xev.xclient.data.l[3] = d3;
-   xev.xclient.data.l[4] = d4;
-
-   return !XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
-}
-#endif
-
 static void
 SystrayEventClientMessage(void *ib, XClientMessageEvent * ev)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.174.2.26
retrieving revision 1.174.2.27
diff -u -3 -r1.174.2.26 -r1.174.2.27
--- ipc.c       24 Sep 2004 22:50:18 -0000      1.174.2.26
+++ ipc.c       25 Sep 2004 16:15:17 -0000      1.174.2.27
@@ -1208,40 +1208,6 @@
 }
 
 static void
-IPC_AutoSave(const char *params, Client * c)
-{
-   char                buf[FILEPATH_LEN_MAX];
-
-   buf[0] = 0;
-
-   if (!params)
-      return;
-
-   if (!strcmp(params, "?"))
-     {
-       if (Conf.autosave)
-          Esnprintf(buf, sizeof(buf), "Autosave : on");
-       else
-          Esnprintf(buf, sizeof(buf), "Autosave : off");
-     }
-   else if (!strcmp(params, "on"))
-     {
-       Conf.autosave = 1;
-     }
-   else if (!strcmp(params, "off"))
-     {
-       Conf.autosave = 0;
-     }
-   else
-     {
-       Esnprintf(buf, sizeof(buf), "Unknown autosave state: %s", params);
-     }
-
-   if (buf[0])
-      CommsSend(c, buf);
-}
-
-static void
 IPC_Copyright(const char *params, Client * c)
 {
    char                buf[FILEPATH_LEN_MAX];
@@ -2314,12 +2280,6 @@
     "displays copyright information for Enlightenment",
     NULL},
    {
-    IPC_AutoSave,
-    "autosave", NULL,
-    "toggle the Automatic Saving Feature",
-    "Use \"autosave ?\" to list the current status\n"
-    "use \"autosave on\" or \"autosave off\" to toggle the status"},
-   {
     IPC_Restart,
     "restart", NULL,
     "Restart Enlightenment",
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.99.2.24
retrieving revision 1.99.2.25
diff -u -3 -r1.99.2.24 -r1.99.2.25
--- main.c      19 Sep 2004 08:02:16 -0000      1.99.2.24
+++ main.c      25 Sep 2004 16:15:34 -0000      1.99.2.25
@@ -223,14 +223,17 @@
    Esetenv("ECONFDIR", EDirUser(), 1);
    Esetenv("ECACHEDIR", EDirUserCache(), 1);
 
+   /* Unmap the clients */
+   MapUnmap(0);
+
+   ModulesSignal(ESIGNAL_INIT, NULL);
+
    /* Move elsewhere... */
    HintsInit();
    CommsInit();
    SessionInit();
    LoadSnapInfo();
 
-   ModulesSignal(ESIGNAL_INIT, NULL);
-
    /* Load the theme */
    ThemeConfigLoad();
 
@@ -242,8 +245,6 @@
 
    CheckEvent();
 
-   CreateStartupDisplay(0);
-
 #ifdef USE_EXT_INIT_WIN
    /* Kill the E process owning the "init window" */
    if (Mode.wm.master && init_win_ext)
@@ -255,6 +256,12 @@
      }
 #endif
 
+   /* Map the clients */
+   MapUnmap(1);
+
+   if (!Mode.wm.restart)
+      CreateStartupDisplay(0);
+
    /* sync just to make sure */
    ecore_x_sync();
    Mode.queue_up = DRAW_QUEUE_ENABLE;
@@ -270,10 +277,10 @@
       kill(Mode.wm.children[i], SIGCONT);
 #endif
 
-   SpawnSnappedCmds();
-
    ModulesSignal(ESIGNAL_START, NULL);
 
+   SpawnSnappedCmds();
+
    Mode.wm.startup = 0;
 
    /* The primary event loop */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-desks.c,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -3 -r1.1.2.8 -r1.1.2.9
--- mod-desks.c 24 Sep 2004 22:40:33 -0000      1.1.2.8
+++ mod-desks.c 25 Sep 2004 16:15:34 -0000      1.1.2.9
@@ -674,7 +674,6 @@
 EModule             ModDesktops = {
    "desktops", "desk",
    DesktopsSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, DesktopsIpcArray},
    {N_CFG_ITEMS, DesktopsCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-menus.c,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -3 -r1.1.2.8 -r1.1.2.9
--- mod-menus.c 18 Sep 2004 13:32:28 -0000      1.1.2.8
+++ mod-menus.c 25 Sep 2004 16:15:34 -0000      1.1.2.9
@@ -90,7 +90,6 @@
 EModule             ModMenus = {
    "menus", "menu",
    MenusSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, MenusIpcArray},
    {N_CFG_ITEMS, MenusCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-misc.c,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -u -3 -r1.1.2.16 -r1.1.2.17
--- mod-misc.c  19 Sep 2004 08:02:17 -0000      1.1.2.16
+++ mod-misc.c  25 Sep 2004 16:15:34 -0000      1.1.2.17
@@ -255,7 +255,6 @@
 EModule             ModMisc = {
    "misc", NULL,
    MiscSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, MiscIpcArray}
    ,
    {N_CFG_ITEMS, cfg_items}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-trans.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- mod-trans.c 17 Sep 2004 16:13:43 -0000      1.1.2.4
+++ mod-trans.c 25 Sep 2004 16:15:34 -0000      1.1.2.5
@@ -420,7 +420,6 @@
 EModule             ModTransparency = {
    "transparency", "tr",
    TransparencySighan,
-   NULL, NULL,
    {N_IPC_FUNCS, TransIpcArray},
    {N_CFG_ITEMS, TransCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-tt.c,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -3 -r1.1.2.9 -r1.1.2.10
--- mod-tt.c    1 Sep 2004 23:37:20 -0000       1.1.2.9
+++ mod-tt.c    25 Sep 2004 16:15:34 -0000      1.1.2.10
@@ -253,7 +253,6 @@
 EModule             ModTooltips = {
    "tooltips", "tt",
    TooltipsSighan,
-   TooltipConfigLoad, NULL,
    {N_IPC_FUNCS, TooltipsIpcArray},
    {N_CFG_ITEMS, TooltipsCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.103.2.15
retrieving revision 1.103.2.16
diff -u -3 -r1.103.2.15 -r1.103.2.16
--- pager.c     18 Sep 2004 13:32:28 -0000      1.103.2.15
+++ pager.c     25 Sep 2004 16:15:34 -0000      1.103.2.16
@@ -2196,7 +2196,7 @@
      case ESIGNAL_INIT:
        EDirMake(EDirUserCache(), "cached/pager");
        break;
-     case ESIGNAL_START:
+     case ESIGNAL_CONFIGURE:
        if (!Conf.pagers.enable)
           break;
        Conf.pagers.enable = 0;
@@ -2381,7 +2381,6 @@
 EModule             ModPagers = {
    "pagers", "pg",
    PagersSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, PagersIpcArray},
    {N_CFG_ITEMS, PagersCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.75.2.11
retrieving revision 1.75.2.12
diff -u -3 -r1.75.2.11 -r1.75.2.12
--- session.c   7 Sep 2004 20:06:56 -0000       1.75.2.11
+++ session.c   25 Sep 2004 16:15:35 -0000      1.75.2.12
@@ -302,7 +302,7 @@
    Real_SaveSnapInfo(0, NULL);
 
    Etmp(s);
-   SaveUserControlConfig(fopen(s, "w"));
+   SaveUserControlConfig(s);
    if (EventDebug(EDBUG_TYPE_SESSION))
       Eprintf("autosave: save %s\n", EGetSavePrefix());
    E_mv(s, EGetSavePrefix());
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.139.2.16
retrieving revision 1.139.2.17
diff -u -3 -r1.139.2.16 -r1.139.2.17
--- setup.c     18 Sep 2004 13:32:28 -0000      1.139.2.16
+++ setup.c     25 Sep 2004 16:15:35 -0000      1.139.2.17
@@ -43,6 +43,7 @@
    switch (start)
      {
      case 0:
+       ecore_x_grab();
        XQueryTree(disp, VRoot.win, &rt, &par, &wlist, &num);
        if (wlist)
          {
@@ -68,6 +69,7 @@
                    }
               }
          }
+       ecore_x_ungrab();
        break;
      case 1:
        if (wlist)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v
retrieving revision 1.22.2.8
retrieving revision 1.22.2.9
diff -u -3 -r1.22.2.8 -r1.22.2.9
--- slideout.c  17 Sep 2004 16:13:43 -0000      1.22.2.8
+++ slideout.c  25 Sep 2004 16:15:35 -0000      1.22.2.9
@@ -409,7 +409,7 @@
  * Configuration load/save
  */
 #include "conf.h"
-static int
+int
 SlideoutsConfigLoad(FILE * fs)
 {
    int                 err = 0;
@@ -505,7 +505,6 @@
 EModule             ModSlideouts = {
    "slideouts", "slideout",
    SlideoutsSighan,
-   SlideoutsConfigLoad, NULL,
    {0, NULL}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/sound.c,v
retrieving revision 1.25.2.6
retrieving revision 1.25.2.7
diff -u -3 -r1.25.2.6 -r1.25.2.7
--- sound.c     19 Sep 2004 08:02:17 -0000      1.25.2.6
+++ sound.c     25 Sep 2004 16:15:35 -0000      1.25.2.7
@@ -606,7 +606,6 @@
 EModule             ModSound = {
    "sound", "audio",
    SoundSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, SoundIpcArray},
    {N_CFG_ITEMS, SoundCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tclass.c,v
retrieving revision 1.27.2.4
retrieving revision 1.27.2.5
diff -u -3 -r1.27.2.4 -r1.27.2.5
--- tclass.c    24 Sep 2004 22:40:33 -0000      1.27.2.4
+++ tclass.c    25 Sep 2004 16:15:35 -0000      1.27.2.5
@@ -186,7 +186,7 @@
    return tc;
 }
 
-static int
+int
 TextclassConfigLoad(FILE * fs)
 {
    int                 err = 0;
@@ -629,7 +629,6 @@
 EModule             ModTextclass = {
    "textclass", "tc",
    TextclassSighan,
-   TextclassConfigLoad, NULL,
    {N_IPC_FUNCS, TextclassIpcArray}
    ,
    {0, NULL}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/theme.c,v
retrieving revision 1.37.2.7
retrieving revision 1.37.2.8
diff -u -3 -r1.37.2.7 -r1.37.2.8
--- theme.c     19 Sep 2004 08:02:17 -0000      1.37.2.7
+++ theme.c     25 Sep 2004 16:15:35 -0000      1.37.2.8
@@ -502,7 +502,6 @@
 EModule             ModTheme = {
    "theme", "th",
    ThemesSighan,
-   NULL, NULL,
    {N_IPC_FUNCS, ThemeIpcArray},
    {N_CFG_ITEMS, ThemeCfgItems}
 };
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.49.2.5
retrieving revision 1.49.2.6
diff -u -3 -r1.49.2.5 -r1.49.2.6
--- warp.c      1 Sep 2004 23:37:21 -0000       1.49.2.5
+++ warp.c      25 Sep 2004 16:15:36 -0000      1.49.2.6
@@ -354,7 +354,6 @@
 EModule             ModWarplist = {
    "warplist", "warp",
    WarplistSighan,
-   NULL, NULL,
    {0, NULL},
    {N_CFG_ITEMS, WarplistCfgItems}
 };




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to