Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/client


Modified Files:
        entrance_config.c entrance_user.c entrance_user.h 
        entrance_session.c 


Log Message:
fixups, and abstract user edje generation a bit more
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_config.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- entrance_config.c   7 Mar 2004 04:43:43 -0000       1.20
+++ entrance_config.c   7 Mar 2004 05:03:54 -0000       1.21
@@ -342,7 +342,7 @@
       for (i = 0, l = e->users.keys; l && i < e->users.remember_n;
            l = l->next, i++)
       {
-         if ((eu = evas_hash_find(e->users.hash, (char*)l->data)))
+         if ((eu = evas_hash_find(e->users.hash, (char *) l->data)))
          {
             if (eu->name)
             {
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_user.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- entrance_user.c     3 Mar 2004 18:16:15 -0000       1.4
+++ entrance_user.c     7 Mar 2004 05:03:54 -0000       1.5
@@ -82,17 +82,16 @@
  * @return NULL on failure, a valid Evas_Object on success
  */
 Evas_Object *
-entrance_user_edje_get(Entrance_User * e, Evas_Object * edje)
+entrance_user_edje_get(Entrance_User * e, Evas_Object * edje,
+                       const char *file)
 {
    Evas_Object *o = NULL;
    Evas_Object *oo = NULL;
-   const char *file = NULL;
    Evas_Coord w, h;
 
    if (e && edje)
    {
       o = edje_object_add(evas_object_evas_get(edje));
-      edje_object_file_get(edje, &file, NULL);
       if (edje_object_file_set(o, file, "User"))
       {
          evas_object_layer_set(o, 0);
@@ -127,7 +126,7 @@
       {
          fprintf(stderr, "Failed on: %s(%s)\n", e->name, e->icon);
          evas_object_del(o);
-         evas_object_del(oo);
+         o = NULL;
       }
    }
    return (o);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_user.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- entrance_user.h     3 Mar 2004 18:16:15 -0000       1.2
+++ entrance_user.h     7 Mar 2004 05:03:54 -0000       1.3
@@ -22,6 +22,7 @@
 Entrance_User *entrance_user_new(char *user, char *icon, char *session);
 void entrance_user_auto_login_set(Entrance_User * e, int allow);
 void entrance_user_free(Entrance_User * e);
-Evas_Object *entrance_user_edje_get(Entrance_User * e, Evas_Object * edje);
+Evas_Object *entrance_user_edje_get(Entrance_User * e, Evas_Object * edje,
+                                    const char *file);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- entrance_session.c  7 Mar 2004 04:43:43 -0000       1.38
+++ entrance_session.c  7 Mar 2004 05:03:54 -0000       1.39
@@ -173,6 +173,7 @@
 entrance_session_user_set(Entrance_Session * e, Entrance_User * eu)
 {
    Evas_Object *obj = NULL;
+   const char *file = NULL;
 
    if (e && eu)
    {
@@ -181,7 +182,8 @@
          edje_object_part_unswallow(e->edje, obj);
          evas_object_del(obj);
       }
-      if ((obj = entrance_user_edje_get(eu, e->edje)))
+      edje_object_file_get(e->edje, &file, NULL);
+      if ((obj = entrance_user_edje_get(eu, e->edje, file)))
       {
          if (!entrance_auth_set_user(e->auth, eu->name))
          {
@@ -496,6 +498,7 @@
 {
    char *str = NULL;
    Evas_Coord w, h;
+   const char *file = NULL;
    Entrance_User *key = NULL;
    Evas_List *l = NULL;
    Evas_Object *container = NULL, *edje;
@@ -519,12 +522,13 @@
          e_container_fill_policy_set(container, CONTAINER_FILL_POLICY_FILL_X);
          e_container_direction_set(container, 1);
       }
+      edje_object_file_get(e->edje, &file, NULL);
       for (l = e->config->users.keys; l; l = l->next)
       {
          str = (char *) l->data;
          if ((key = evas_hash_find(e->config->users.hash, str)))
          {
-            if ((edje = entrance_user_edje_get(key, e->edje)))
+            if ((edje = entrance_user_edje_get(key, e->edje, file)))
                e_container_element_append(container, edje);
          }
       }
@@ -688,7 +692,7 @@
    {
       for (l = e->config->users.keys; l; l = l->next)
       {
-         if (!strcmp(e->auth->user, ((Entrance_User *) l->data)->name))
+         if (!strcmp(e->auth->user, (char *) l->data))
          {
             if ((eu = evas_hash_find(e->config->users.hash, e->auth->user)))
             {
@@ -703,8 +707,8 @@
       snprintf(buf, PATH_MAX, "default.eet");
       if ((eu = entrance_user_new(e->auth->user, buf, e->session)))
       {
-         e->config->users.hash = evas_hash_add(e->config->users.hash,
-                                               eu->name, eu);
+         e->config->users.hash =
+            evas_hash_add(e->config->users.hash, eu->name, eu);
          e->config->users.keys =
             evas_list_prepend(e->config->users.keys, eu->name);
          entrance_config_user_list_write(e->config);




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to