Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
entrance_session.c entrance_session.h main.c
Log Message:
get rid of _entrance_test_en, and put it as an Entrance_Session member
variable, remove some code that isn't used anymore
===================================================================
RCS file:
/cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- entrance_session.c 4 Dec 2004 04:26:13 -0000 1.60
+++ entrance_session.c 4 Dec 2004 19:47:10 -0000 1.61
@@ -14,8 +14,6 @@
@brief Variables and Data relating to an instance of the application as a whole
*/
-extern int _entrance_test_en;
-
extern void session_item_selected_cb(void *data, Evas_Object * o,
const char *emission,
const char *source);
@@ -29,11 +27,12 @@
* entrance_session_new: allocate a new Entrance_Session
* @param config Parse this config file instead of the normal system one
* @param config The display this session will be running on
+ * @param testing Whether we're a real login app, or a test window
* @return a valid Entrance_Session
* Also Allocates the auth, and parse the config struct
*/
Entrance_Session *
-entrance_session_new(const char *config, char *display)
+entrance_session_new(const char *config, char *display, int testing)
{
Entrance_Session *e;
char *db;
@@ -58,7 +57,7 @@
exit(1);
}
e->session = strdup("");
-
+ e->testing = testing;
free(db);
return (e);
}
@@ -359,7 +358,7 @@
snprintf(buf, PATH_MAX, "%s", ENTRANCE_XSESSION);
}
- if (_entrance_test_en)
+ if (e->testing)
snprintf(buf, PATH_MAX, "/usr/X11R6/bin/xterm");
syslog(LOG_CRIT, "Executing %s", buf);
===================================================================
RCS file:
/cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- entrance_session.h 1 May 2004 20:44:52 -0000 1.18
+++ entrance_session.h 4 Dec 2004 19:47:10 -0000 1.19
@@ -34,11 +34,13 @@
int authed; /* whether or not the user has authenticated
* or not */
+ int testing; /* whether we're in X testing or not */
};
typedef struct _Entrance_Session Entrance_Session;
-Entrance_Session *entrance_session_new(const char *config, char *display);
+Entrance_Session *entrance_session_new(const char *config, char *display,
+ int testing);
void entrance_session_ecore_evas_set(Entrance_Session * e, Ecore_Evas * ee);
void entrance_session_free(Entrance_Session * e);
void entrance_session_run(Entrance_Session * e);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- main.c 4 Dec 2004 04:26:13 -0000 1.58
+++ main.c 4 Dec 2004 19:47:10 -0000 1.59
@@ -19,7 +19,6 @@
#define WINH 600
static Entrance_Session *session = NULL;
-int _entrance_test_en = 0;
/**
* get the hostname of the machine, surrounded by the before and after
@@ -365,7 +364,7 @@
reboot_cb(void *data, Evas_Object * o, const char *emission,
const char *source)
{
- if (session->config->reboot)
+ if ((session->config->reboot) && (!session->testing))
{
pid_t pid;
@@ -390,6 +389,10 @@
exit(EXITCODE);
}
}
+ else if (session->testing)
+ {
+ syslog(LOG_INFO, "Reboot Unsupported in testing mode");
+ }
}
/**
@@ -405,7 +408,7 @@
{
pid_t pid;
- if (session->config->halt)
+ if ((session->config->halt) && (!session->testing))
{
entrance_session_free(session);
session = NULL;
@@ -428,6 +431,10 @@
exit(EXITCODE);
}
}
+ else if (session->testing)
+ {
+ syslog(LOG_INFO, "Shutdown Unsupported in testing mode");
+ }
}
/**
@@ -569,8 +576,9 @@
int g_x = WINW, g_y = WINH;
char *theme = NULL;
char *config = NULL;
- int fs_en = 1;
+ int fullscreen = 1;
pid_t server_pid = 0;
+ int testing = 0;
/* Basic ecore initialization */
if (!ecore_init())
@@ -612,7 +620,7 @@
optarg);
return (-1);
}
- fs_en = 0;
+ fullscreen = 0;
}
break;
case 't':
@@ -633,8 +641,8 @@
}
break;
case 'T':
- _entrance_test_en = 1;
- fs_en = 0;
+ testing = 1;
+ fullscreen = 0;
break;
case 'c':
config = strdup(optarg);
@@ -651,7 +659,7 @@
if (!entrance_ipc_init(server_pid))
return -1;
- session = entrance_session_new(config, display);
+ session = entrance_session_new(config, display, testing);
if (config)
free(config);
@@ -698,7 +706,7 @@
}
ew = ecore_evas_software_x11_window_get(e);
- if (_entrance_test_en)
+ if (session->testing)
ecore_evas_title_set(e, "Entrance - Testing Mode");
else
ecore_evas_title_set(e, "Entrance");
@@ -839,13 +847,10 @@
/* set focus to user input by default */
edje_object_signal_emit(edje, "In", "EntranceUserEntry");
-#if (X_TESTING == 0)
- ecore_evas_resize(e, g_x, g_y);
- if (fs_en)
+ if (fullscreen)
ecore_evas_fullscreen_set(e, 1);
-#elif (X_TESTING == 1)
- ecore_evas_resize(e, g_x, g_y);
-#endif
+ else
+ ecore_evas_resize(e, g_x, g_y);
entrance_session_ecore_evas_set(session, e);
entrance_ipc_session_set(session);
-------------------------------------------------------
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