Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/client


Modified Files:
        entrance_edit.c entrance_ipc.c entrance_session.c main.c 


Log Message:
indent!
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_edit.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- entrance_edit.c     11 Nov 2004 00:24:55 -0000      1.8
+++ entrance_edit.c     4 Dec 2004 04:26:13 -0000       1.9
@@ -168,222 +168,234 @@
    int size = 0;
 
    o = (Evas_Object *) data;
-      size = strlen(str);
+   size = strlen(str);
 #if DEBUG
-      if (!str)
-         fprintf(stderr, "STRING IS NULL!!!!\n");
-      else
-         fprintf(stderr, "Entry Sent %s(%d)\n", str, size);
+   if (!str)
+      fprintf(stderr, "STRING IS NULL!!!!\n");
+   else
+      fprintf(stderr, "Entry Sent %s(%d)\n", str, size);
 #endif
-      if (esmart_text_entry_edje_part_get(o))
-      {
+   if (esmart_text_entry_edje_part_get(o))
+   {
 #if DEBUG
-         fprintf(stderr, "%s set its text\n", 
esmart_text_entry_edje_part_get(o));
+      fprintf(stderr, "%s set its text\n",
+              esmart_text_entry_edje_part_get(o));
 #endif
-         if ((old = evas_hash_find(ecco.hashes, 
esmart_text_entry_edje_part_get(o))))
-         {
-            evas_hash_del(ecco.hashes, esmart_text_entry_edje_part_get(o), 
old);
-         }
-         else
-         {
-            fprintf(stderr, "Unable to find old entry for %s\n",
-                    esmart_text_entry_edje_part_get(o));
-         }
-         if (size > 0)
-         {
-            new_str = strdup(str);
-         }
-         else
+      if ((old =
+           evas_hash_find(ecco.hashes, esmart_text_entry_edje_part_get(o))))
+      {
+         evas_hash_del(ecco.hashes, esmart_text_entry_edje_part_get(o), old);
+      }
+      else
+      {
+         fprintf(stderr, "Unable to find old entry for %s\n",
+                 esmart_text_entry_edje_part_get(o));
+      }
+      if (size > 0)
+      {
+         new_str = strdup(str);
+      }
+      else
+      {
+         new_str = strdup("");
+      }
+      if ((old =
+           evas_hash_find(ecco.entries, esmart_text_entry_edje_part_get(o))))
+      {
+         if (!strcmp(old, "ecco,entry,focus,in,greeting,before"))
          {
-            new_str = strdup("");
+            if (ecco.config->before.string)
+               free(ecco.config->before.string);
+            ecco.config->before.string = new_str;
+            ecco.hashes =
+               evas_hash_add(ecco.hashes, esmart_text_entry_edje_part_get(o),
+                             new_str);
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,greeting,after"))
+         {
+            if (ecco.config->after.string)
+               free(ecco.config->after.string);
+            ecco.config->after.string = new_str;
+            ecco.hashes =
+               evas_hash_add(ecco.hashes, esmart_text_entry_edje_part_get(o),
+                             new_str);
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,date"))
+         {
+            if (ecco.config->date.string)
+               free(ecco.config->date.string);
+            ecco.config->date.string = new_str;
+            ecco.hashes =
+               evas_hash_add(ecco.hashes, esmart_text_entry_edje_part_get(o),
+                             new_str);
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,time"))
+         {
+            if (ecco.config->time.string)
+               free(ecco.config->time.string);
+            ecco.config->time.string = new_str;
+            ecco.hashes =
+               evas_hash_add(ecco.hashes, esmart_text_entry_edje_part_get(o),
+                             new_str);
          }
-         if ((old = evas_hash_find(ecco.entries, 
esmart_text_entry_edje_part_get(o))))
+         else if (!strcmp(old, "ecco,entry,focus,in,session,current,session"))
          {
-            if (!strcmp(old, "ecco,entry,focus,in,greeting,before"))
-            {
-               if (ecco.config->before.string)
-                  free(ecco.config->before.string);
-               ecco.config->before.string = new_str;
-               ecco.hashes =
-                  evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-            }
-            else if (!strcmp(old, "ecco,entry,focus,in,greeting,after"))
-            {
-               if (ecco.config->after.string)
-                  free(ecco.config->after.string);
-               ecco.config->after.string = new_str;
-               ecco.hashes =
-                  evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-            }
-            else if (!strcmp(old, "ecco,entry,focus,in,date"))
-            {
-               if (ecco.config->date.string)
-                  free(ecco.config->date.string);
-               ecco.config->date.string = new_str;
-               ecco.hashes =
-                  evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-            }
-            else if (!strcmp(old, "ecco,entry,focus,in,time"))
+            if (ecco.current_session)
             {
-               if (ecco.config->time.string)
-                  free(ecco.config->time.string);
-               ecco.config->time.string = new_str;
+               if (ecco.current_session->session)
+                  free(ecco.current_session->session);
+               ecco.current_session->session = new_str;
                ecco.hashes =
-                  evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-            }
-            else
-               if (!strcmp
-                   (old, "ecco,entry,focus,in,session,current,session"))
-            {
-               if (ecco.current_session)
-               {
-                  if (ecco.current_session->session)
-                     free(ecco.current_session->session);
-                  ecco.current_session->session = new_str;
-                  ecco.hashes =
-                     evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-               }
+                  evas_hash_add(ecco.hashes,
+                                esmart_text_entry_edje_part_get(o), new_str);
             }
-            else if (!strcmp(old, "ecco,entry,focus,in,session,current,name"))
-            {
-               Evas_List *l = NULL;
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,session,current,name"))
+         {
+            Evas_List *l = NULL;
 
-               if (ecco.current_session)
+            if (ecco.current_session)
+            {
+               fprintf(stderr, "%s:%s:%s\n", str, new_str,
+                       ecco.current_session->name);
+               if (strcmp(new_str, ecco.current_session->name))
                {
-                  fprintf(stderr, "%s:%s:%s\n", str, new_str,
-                          ecco.current_session->name);
-                  if (strcmp(new_str, ecco.current_session->name))
-                  {
-                     ecco.config->sessions.hash =
-                        evas_hash_del(ecco.config->sessions.hash,
-                                      ecco.current_session->name,
-                                      ecco.current_session);
-                     if ((l =
-                          evas_list_find_list(ecco.config->sessions.keys,
-                                              ecco.current_session->name)))
-                     {
-                        free(l->data);
-                        l->data = new_str;
-                     }
-                     ecco.current_session->name = new_str;
-                     ecco.config->sessions.hash =
-                        evas_hash_add(ecco.config->sessions.hash,
-                                      ecco.current_session->name,
-                                      ecco.current_session);
-
-                     esmart_container_empty(ecco.container.sessions);
-                     edje_object_signal_emit(ecco.edje, "ecco,show,sessions",
-                                             "");
-                     ecco.hashes =
-                        evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-                  }
-                  else
+                  ecco.config->sessions.hash =
+                     evas_hash_del(ecco.config->sessions.hash,
+                                   ecco.current_session->name,
+                                   ecco.current_session);
+                  if ((l =
+                       evas_list_find_list(ecco.config->sessions.keys,
+                                           ecco.current_session->name)))
                   {
-                     free(new_str);
+                     free(l->data);
+                     l->data = new_str;
                   }
+                  ecco.current_session->name = new_str;
+                  ecco.config->sessions.hash =
+                     evas_hash_add(ecco.config->sessions.hash,
+                                   ecco.current_session->name,
+                                   ecco.current_session);
+
+                  esmart_container_empty(ecco.container.sessions);
+                  edje_object_signal_emit(ecco.edje, "ecco,show,sessions",
+                                          "");
+                  ecco.hashes =
+                     evas_hash_add(ecco.hashes,
+                                   esmart_text_entry_edje_part_get(o),
+                                   new_str);
                }
                else
                {
                   free(new_str);
                }
             }
-            else if (!strcmp(old, "ecco,entry,focus,in,user,current,name"))
+            else
+            {
+               free(new_str);
+            }
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,user,current,name"))
+         {
+            if (ecco.current_user)
             {
-               if (ecco.current_user)
-               {
 
-                  Evas_List *l = NULL;
+               Evas_List *l = NULL;
 
-                  if (strcmp(new_str, ecco.current_user->name))
+               if (strcmp(new_str, ecco.current_user->name))
+               {
+                  fprintf(stderr, "%s:%s:%s\n", str, new_str,
+                          ecco.current_user->name);
+                  ecco.config->users.hash =
+                     evas_hash_del(ecco.config->users.hash,
+                                   ecco.current_user->name,
+                                   ecco.current_user);
+                  if ((l =
+                       evas_list_find_list(ecco.config->users.keys,
+                                           ecco.current_user->name)))
                   {
-                     fprintf(stderr, "%s:%s:%s\n", str, new_str,
-                             ecco.current_user->name);
-                     ecco.config->users.hash =
-                        evas_hash_del(ecco.config->users.hash,
-                                      ecco.current_user->name,
-                                      ecco.current_user);
-                     if ((l =
-                          evas_list_find_list(ecco.config->users.keys,
-                                              ecco.current_user->name)))
-                     {
-                        fprintf(stderr, "AAAH %s\n", (char *) l->data);
-                        free(l->data);
-                        l->data = new_str;
-                     }
-                     else
-                     {
-                        fprintf(stderr, "LEAKAGE !!!\n");
-                     }
-                     ecco.current_user->name = new_str;
-                     ecco.config->users.hash =
-                        evas_hash_add(ecco.config->users.hash,
-                                      ecco.current_user->name,
-                                      ecco.current_user);
-
-                     esmart_container_empty(ecco.container.users);
-                     edje_object_signal_emit(ecco.edje, "ecco,show,users",
-                                             "");
-                     ecco.hashes =
-                        evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
+                     fprintf(stderr, "AAAH %s\n", (char *) l->data);
+                     free(l->data);
+                     l->data = new_str;
                   }
                   else
                   {
-                     free(new_str);
+                     fprintf(stderr, "LEAKAGE !!!\n");
                   }
+                  ecco.current_user->name = new_str;
+                  ecco.config->users.hash =
+                     evas_hash_add(ecco.config->users.hash,
+                                   ecco.current_user->name,
+                                   ecco.current_user);
+
+                  esmart_container_empty(ecco.container.users);
+                  edje_object_signal_emit(ecco.edje, "ecco,show,users", "");
+                  ecco.hashes =
+                     evas_hash_add(ecco.hashes,
+                                   esmart_text_entry_edje_part_get(o),
+                                   new_str);
                }
                else
                {
                   free(new_str);
                }
             }
-            else if (!strcmp(old, "ecco,entry,focus,in,user,current,session"))
+            else
             {
-               if (ecco.current_user)
-               {
-                  if (ecco.current_user->session)
-                     free(ecco.current_user->session);
-                  ecco.current_user->session = new_str;
-                  ecco.hashes =
-                     evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-               }
+               free(new_str);
             }
-            else if (!strcmp(old, "ecco,entry,focus,in,remember,n"))
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,user,current,session"))
+         {
+            if (ecco.current_user)
             {
-               snprintf(buf, PATH_MAX, "%s", str);
-               ecco.config->users.remember_n = atoi(buf);
+               if (ecco.current_user->session)
+                  free(ecco.current_user->session);
+               ecco.current_user->session = new_str;
                ecco.hashes =
-                  evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
+                  evas_hash_add(ecco.hashes,
+                                esmart_text_entry_edje_part_get(o), new_str);
             }
-            else if (!strcmp(old, "ecco,entry,focus,in,theme"))
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,remember,n"))
+         {
+            snprintf(buf, PATH_MAX, "%s", str);
+            ecco.config->users.remember_n = atoi(buf);
+            ecco.hashes =
+               evas_hash_add(ecco.hashes, esmart_text_entry_edje_part_get(o),
+                             new_str);
+         }
+         else if (!strcmp(old, "ecco,entry,focus,in,theme"))
+         {
+            snprintf(buf, PATH_MAX, PACKAGE_DATA_DIR "/themes/%s", new_str);
+            if (is_valid_theme_eet(o, buf))
             {
-               snprintf(buf, PATH_MAX, PACKAGE_DATA_DIR "/themes/%s",
-                        new_str);
-               if (is_valid_theme_eet(o, buf))
-               {
-                  fprintf(stderr, "You found a valid eet\n");
-                  if (ecco.config->theme)
-                     free(ecco.config->theme);
-                  ecco.config->theme = new_str;
-                  ecco.hashes =
-                     evas_hash_add(ecco.hashes, 
esmart_text_entry_edje_part_get(o), new_str);
-               }
-               else
-               {
-                  fprintf(stderr, "You found a invalid eet\n");
-                  esmart_text_entry_text_set(o, ecco.config->theme);
-                  free(new_str);
-               }
+               fprintf(stderr, "You found a valid eet\n");
+               if (ecco.config->theme)
+                  free(ecco.config->theme);
+               ecco.config->theme = new_str;
+               ecco.hashes =
+                  evas_hash_add(ecco.hashes,
+                                esmart_text_entry_edje_part_get(o), new_str);
             }
             else
             {
-               fprintf(stderr, "Unknown signal, %s\n", old);
+               fprintf(stderr, "You found a invalid eet\n");
+               esmart_text_entry_text_set(o, ecco.config->theme);
+               free(new_str);
             }
          }
          else
          {
-            fprintf(stderr, "Unknown signal for %s\n", 
esmart_text_entry_edje_part_get(o));
+            fprintf(stderr, "Unknown signal, %s\n", old);
          }
       }
+      else
+      {
+         fprintf(stderr, "Unknown signal for %s\n",
+                 esmart_text_entry_edje_part_get(o));
+      }
+   }
 }
 
 /*=========================================================================
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_ipc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- entrance_ipc.c      29 Jul 2004 08:20:55 -0000      1.10
+++ entrance_ipc.c      4 Dec 2004 04:26:13 -0000       1.11
@@ -136,26 +136,28 @@
       return FALSE;
 
    memset(buf, 0, sizeof(buf));
-     {
-       struct stat st;
-       mode_t mask;
-       char *p;
-       
-       mask = S_IRUSR | S_IWUSR | S_IXUSR;
-       strncpy(buf, PACKAGE_STATE_DIR, sizeof(buf));
-       p = buf;
-       p = strchr(p, '/');
-       while (p)
-         {
-            *p = 0;
-            if (stat(buf, &st) < 0) mkdir(buf, mask);
-            *p = '/';
-            p++;
-            p = strchr(p, '/');
-         }
-       if (stat(buf, &st) < 0) mkdir(buf, mask);
-     }
-       
+   {
+      struct stat st;
+      mode_t mask;
+      char *p;
+
+      mask = S_IRUSR | S_IWUSR | S_IXUSR;
+      strncpy(buf, PACKAGE_STATE_DIR, sizeof(buf));
+      p = buf;
+      p = strchr(p, '/');
+      while (p)
+      {
+         *p = 0;
+         if (stat(buf, &st) < 0)
+            mkdir(buf, mask);
+         *p = '/';
+         p++;
+         p = strchr(p, '/');
+      }
+      if (stat(buf, &st) < 0)
+         mkdir(buf, mask);
+   }
+
    snprintf(buf, PATH_MAX, "%s_%d", PACKAGE_STATE_DIR "/" IPC_TITLE,
             server_pid);
    if (ipc_title)
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- entrance_session.c  4 Dec 2004 04:25:03 -0000       1.59
+++ entrance_session.c  4 Dec 2004 04:26:13 -0000       1.60
@@ -348,12 +348,13 @@
    {
       if (!strcmp(e->session, "default"))
          snprintf(buf, PATH_MAX, "%s", ENTRANCE_XSESSION);
-      else if(e->session[0] == '/')
-        snprintf(buf, PATH_MAX, "%s", e->session);
+      else if (e->session[0] == '/')
+         snprintf(buf, PATH_MAX, "%s", e->session);
       else
          snprintf(buf, PATH_MAX, "%s %s", ENTRANCE_XSESSION, e->session);
-   } 
-   else {
+   }
+   else
+   {
       /* Default session */
       snprintf(buf, PATH_MAX, "%s", ENTRANCE_XSESSION);
    }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- main.c      11 Nov 2004 00:24:55 -0000      1.57
+++ main.c      4 Dec 2004 04:26:13 -0000       1.58
@@ -108,28 +108,25 @@
    Evas_Object *oo = NULL;
 
    if (!strcmp(esmart_text_entry_edje_part_get(o), "EntrancePassEntry"))
-     {
-       if ((oo =
-            evas_object_name_find(evas_object_evas_get(o),
-                                  "EntranceUserEntry")))
-         {
-            esmart_text_entry_text_set(oo, "");
-         }
-       esmart_text_entry_text_set(o, "");
-     }
+   {
+      if ((oo =
+           evas_object_name_find(evas_object_evas_get(o),
+                                 "EntranceUserEntry")))
+      {
+         esmart_text_entry_text_set(oo, "");
+      }
+      esmart_text_entry_text_set(o, "");
+   }
    else if (!strcmp(esmart_text_entry_edje_part_get(o), "EntranceUserEntry"))
-     {
-       oo =
-         evas_object_name_find(evas_object_evas_get(o),
-                               "EntrancePassEntry");
-     }
+   {
+      oo =
+         evas_object_name_find(evas_object_evas_get(o), "EntrancePassEntry");
+   }
    if (oo)
-     {
-       selecto ? evas_object_focus_set(oo, 0) :
-       evas_object_focus_set(o, 0);
-       selecto ? evas_object_focus_set(o, 1) :
-       evas_object_focus_set(oo, 1);
-     }
+   {
+      selecto ? evas_object_focus_set(oo, 0) : evas_object_focus_set(o, 0);
+      selecto ? evas_object_focus_set(o, 1) : evas_object_focus_set(oo, 1);
+   }
 }
 
 /**
@@ -146,41 +143,44 @@
    o = (Evas_Object *) data;
 
    if (!strcmp(esmart_text_entry_edje_part_get(o), "EntranceUserEntry"))
-     {
-       if (!entrance_auth_set_user(session->auth, str))
-         {
-            edje_object_signal_emit(esmart_text_entry_edje_object_get(o), 
"EntranceUserAuth", "");
-            if ((eu = evas_hash_find(session->config->users.hash, str)))
-               entrance_session_user_set(session, eu);
-            focus_swap(o, 0);
-         }
-       else
-         {
-            esmart_text_entry_text_set(o, "");
-            entrance_session_user_reset(session);
-            edje_object_signal_emit(esmart_text_entry_edje_object_get(o), 
"EntranceUserFail", "");
-            focus_swap(o, 1);
-         }
-     }
+   {
+      if (!entrance_auth_set_user(session->auth, str))
+      {
+         edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
+                                 "EntranceUserAuth", "");
+         if ((eu = evas_hash_find(session->config->users.hash, str)))
+            entrance_session_user_set(session, eu);
+         focus_swap(o, 0);
+      }
+      else
+      {
+         esmart_text_entry_text_set(o, "");
+         entrance_session_user_reset(session);
+         edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
+                                 "EntranceUserFail", "");
+         focus_swap(o, 1);
+      }
+   }
    if (!strcmp(esmart_text_entry_edje_part_get(o), "EntrancePassEntry"))
-     {
-       if (session->auth->user && strlen(session->auth->user) > 0)
-         {
-            entrance_auth_set_pass(session->auth, str);
-            if (!entrance_session_auth_user(session))
-              {
-                 session->authed = 1;
-                 edje_object_signal_emit(esmart_text_entry_edje_object_get(o), 
"EntranceUserAuthSuccess",
-                                         "");
-              }
-            else
-              {
-                 entrance_session_user_reset(session);
-                 edje_object_signal_emit(esmart_text_entry_edje_object_get(o), 
"EntranceUserAuthFail", "");
-                 focus_swap(o, 0);
-              }
-         }
-     }
+   {
+      if (session->auth->user && strlen(session->auth->user) > 0)
+      {
+         entrance_auth_set_pass(session->auth, str);
+         if (!entrance_session_auth_user(session))
+         {
+            session->authed = 1;
+            edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
+                                    "EntranceUserAuthSuccess", "");
+         }
+         else
+         {
+            entrance_session_user_reset(session);
+            edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
+                                    "EntranceUserAuthFail", "");
+            focus_swap(o, 0);
+         }
+      }
+   }
 }
 
 /**




-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to