Enlightenment CVS committal

Author  : jeoparde
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/client


Modified Files:
        entrance_theme.h intro.c sys_callbacks.c sys_callbacks.h 
        ui_callbacks.c ui_callbacks.h 


Log Message:
Move things around a bit...Enter key callback should be in ui_callbacks
A little bit of cleanup


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_theme.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- entrance_theme.h    31 Jan 2003 21:57:06 -0000      1.1
+++ entrance_theme.h    4 Feb 2003 17:19:55 -0000       1.2
@@ -3,6 +3,7 @@
 
 #include <Edb.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <limits.h>
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/intro.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- intro.c     31 Jan 2003 21:57:06 -0000      1.1
+++ intro.c     4 Feb 2003 17:19:55 -0000       1.2
@@ -47,7 +47,6 @@
 void
 show_error_description(char *err_str)
 {
-   int x, y;
    int w, h;
    double tw, th;
    Evas_Object *o = _o_err_str;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/sys_callbacks.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- sys_callbacks.c     31 Jan 2003 21:57:06 -0000      1.1
+++ sys_callbacks.c     4 Feb 2003 17:19:55 -0000       1.2
@@ -2,13 +2,6 @@
 #include "entrance_session.h"
 #include "entrance_fx.h"
 
-extern void hide_text_description(void);
-extern void show_text_description(void);
-extern void show_password_description(void);
-extern void show_error_description(char *);
-
-static void entrance_start_x(Entrance_Session e);
-
 void
 entrance_select_next_session(Entrance_Session e)
 {
@@ -59,57 +52,7 @@
            i);
 }
 
-int
-entrance_return_key_cb(Entrance_Session e, char *buffer)
-{
-   static int return_request = 0;
-
-   if (!e)
-      return (return_request);
-   if (!e->auth)
-      e->auth = entrance_auth_new();
-
-   switch (return_request++)
-   {
-     case 0:
-        if (entrance_auth_set_user(e->auth, buffer))
-        {
-           show_error_description("Unknown User");
-           entrance_session_reset_user(e);
-           return_request = 0;
-        }
-        else
-        {
-           hide_text_description();
-           update_login_face(e, buffer);
-           show_password_description();
-        }
-        break;
-     case 1:
-        entrance_auth_set_pass(e->auth, buffer);
-        if (!entrance_auth_cmp(e->auth))
-        {
-           entrance_start_x(e);
-        }
-        else
-        {
-           show_error_description("Login failed");
-           fx_fade_out(e->face, 0.2);
-           fx_fade_out(e->face_shadow, 0.2);
-           entrance_session_reset_user(e);
-        }
-        return_request = 0;
-        break;
-     default:
-        fprintf(stderr, "Entrance return request too high");
-        evas_object_hide(e->face);
-        evas_object_hide(e->face_shadow);
-        break;
-   }
-   return (return_request);
-}
-
-static void
+void
 entrance_start_x(Entrance_Session e)
 {
    char buf[PATH_MAX];
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/sys_callbacks.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- sys_callbacks.h     31 Jan 2003 21:57:06 -0000      1.1
+++ sys_callbacks.h     4 Feb 2003 17:19:56 -0000       1.2
@@ -3,11 +3,10 @@
 
 #include "entrance.h"
 
-int entrance_return_key_cb(Entrance_Session e, char *buffer);
-
 void entrance_select_next_session(Entrance_Session e);
 void entrance_select_prev_session(Entrance_Session e);
 void entrance_select_session(Entrance_Session e, int index);
 void entrance_select_named_session(Entrance_Session e, char *name);
+void entrance_start_x(Entrance_Session e);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/ui_callbacks.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ui_callbacks.c      31 Jan 2003 21:57:06 -0000      1.1
+++ ui_callbacks.c      4 Feb 2003 17:19:56 -0000       1.2
@@ -2,6 +2,13 @@
 #include "sys_callbacks.h"
 #include "entrance_fx.h"
 
+/* For some reason I don't exactly feel like
+ * adding an intro.h */
+extern void hide_text_description(void);
+extern void show_text_description(void);
+extern void show_password_description(void);
+extern void show_error_description(char *);
+
 void
 hide_session_list(Entrance_Session e)
 {
@@ -205,3 +212,54 @@
 //    snprintf(timer, PATH_MAX, "%s timer", str);
 //    ecore_add_event_timer(timer, 0.1, entrance_update_time_cb, val, data);
 }
+
+int
+entrance_return_key_cb(Entrance_Session e, char *buffer)
+{
+   static int return_request = 0;
+
+   if (!e)
+      return (return_request);
+   if (!e->auth)
+      e->auth = entrance_auth_new();
+
+   switch (return_request++)
+   {
+     case 0:
+        if (entrance_auth_set_user(e->auth, buffer))
+        {
+           show_error_description("Unknown User");
+           entrance_session_reset_user(e);
+           return_request = 0;
+        }
+        else
+        {
+           hide_text_description();
+           update_login_face(e, buffer);
+           show_password_description();
+        }
+        break;
+     case 1:
+        entrance_auth_set_pass(e->auth, buffer);
+        if (!entrance_auth_cmp(e->auth))
+        {
+           entrance_start_x(e);
+        }
+        else
+        {
+           show_error_description("Login failed");
+           fx_fade_out(e->face, 0.2);
+           fx_fade_out(e->face_shadow, 0.2);
+           entrance_session_reset_user(e);
+        }
+        return_request = 0;
+        break;
+     default:
+        fprintf(stderr, "Entrance return request too high");
+        evas_object_hide(e->face);
+        evas_object_hide(e->face_shadow);
+        break;
+   }
+   return (return_request);
+}
+
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/ui_callbacks.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ui_callbacks.h      31 Jan 2003 21:57:06 -0000      1.1
+++ ui_callbacks.h      4 Feb 2003 17:19:57 -0000       1.2
@@ -27,4 +27,7 @@
     (void *_data, Evas *e, Evas_Object *_o, void *event_info);
 
 void entrance_update_time_cb (int val, void *data);
+
+int entrance_return_key_cb(Entrance_Session e, char *buffer);
+
 #endif




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to