Enlightenment CVS committal
Author : essiene
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
entrance_config.c
Log Message:
- Yay! Entrance now dynamically generates the session list. There are two fixed
"virtual" sessions,
- "Default" which currently does nothing but should be configurable
via entrance_edit*
- "FailSafe" which drops you into an arcane xterm (this should be
configurable too?)
Then comes the actual sessions found on your system. These are listed before
the "virtual" sessions
- Update AUTOFOO to allow ENTRANCE_SESSIONS_DIR
- Default value is $prefix/share/xsessions
- Can be overwritten with --with-sessions=foobar (incase you install
entrance in
$prefix=/usr/local, but you session are in
/usr/share/bleh)
- Update TODO file
- ONE MASSIVE todo has basically vanished... hurray! thnx to onefang
for the hardwork on ecore_desktop.
===================================================================
RCS file: /cvs/e/e17/apps/entrance/src/client/entrance_config.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- entrance_config.c 3 Jun 2006 07:24:49 -0000 1.33
+++ entrance_config.c 29 Aug 2006 00:29:38 -0000 1.34
@@ -1,10 +1,17 @@
+#include <Ecore_File.h>
+#include <Ecore_Data.h>
#include <Ecore_Config.h>
+#include <Ecore_Desktop.h>
#include "entrance.h"
#include "entrance_config.h"
#include "entrance_user.h"
#include "entrance_x_session.h"
+#include "../config.h"
+
+static void _cb_xsessions_foreach(void *list_data, void *data);
+
/**
@file entrance_config.c
@brief System-wide configuration options for various settings in Entrance
@@ -137,6 +144,12 @@
}
}
+
+ Ecore_List *xsessions = ecore_file_ls(ENTRANCE_SESSIONS_DIR);
+ if(xsessions)
+ ecore_list_for_each(xsessions, _cb_xsessions_foreach, e);
+
+
num_session = ecore_config_int_get("/entrance/session/count");
for (i = 0; i < num_session; i++)
{
@@ -154,6 +167,7 @@
evas_hash_add(e->sessions.hash, exs->name, exs);
}
}
+
#if 0
if (!e_db_int_get(db, "/entrance/xinerama/screens/w", &(e->screens.w)))
@@ -443,6 +457,36 @@
ecore_config_string_set(buf, user);
ecore_config_file_save(file);
}
+
+static void
+_cb_xsessions_foreach(void *list_data, void *data)
+{
+ const char* filename = list_data;
+ if(!filename)
+ return;
+
+ Entrance_Config *e = data;
+ if(!e)
+ return;
+
+ char path[PATH_MAX];
+ snprintf(path, PATH_MAX, ENTRANCE_SESSIONS_DIR "/%s", filename);
+
+ Ecore_Desktop *ed = ecore_desktop_get(path, "en_US");
+ if(!ed)
+ return;
+
+ Entrance_X_Session *exs = NULL;
+
+ if ((exs = entrance_x_session_new(ed->name, ed->icon, ed->exec)))
+ {
+ e->sessions.keys = evas_list_append(e->sessions.keys, ed->name);
+ e->sessions.hash =
+ evas_hash_add(e->sessions.hash, exs->name, exs);
+ }
+}
+
+
#if 0
int
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs