Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e.h e_int_menus.c e_main.c
Log Message:
e17 can restart (from the menu) i NEED this now i'm using it... :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e.h 25 Nov 2004 03:37:44 -0000 1.1
+++ e.h 25 Nov 2004 04:07:48 -0000 1.2
@@ -59,6 +59,7 @@
extern E_Path *path_fonts;
extern E_Path *path_themes;
extern E_Path *path_init;
+extern int restart;
/* convenience macro to compress code and avoid typos */
#define E_FN_DEL(_fn, _h) \
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_menus.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_int_menus.c 25 Nov 2004 03:37:44 -0000 1.1
+++ e_int_menus.c 25 Nov 2004 04:07:48 -0000 1.2
@@ -11,6 +11,7 @@
/* local subsystem functions */
static void _e_int_menus_about_end (void *data, E_Menu *m);
static void _e_int_menus_about_about (void *data, E_Menu *m, E_Menu_Item
*mi);
+static void _e_int_menus_about_restart (void *data, E_Menu *m, E_Menu_Item
*mi);
static void _e_int_menus_about_exit (void *data, E_Menu *m, E_Menu_Item
*mi);
static void _e_int_menus_apps_scan (E_Menu *m);
static void _e_int_menus_apps_start (void *data, E_Menu *m);
@@ -47,6 +48,10 @@
e_menu_item_separator_set(mi, 1);
mi = e_menu_item_new(m);
+ e_menu_item_label_set(mi, "Restart Enlightement");
+ e_menu_item_callback_set(mi, _e_int_menus_about_restart, NULL);
+
+ mi = e_menu_item_new(m);
e_menu_item_label_set(mi, "Exit Enlightement");
e_menu_item_callback_set(mi, _e_int_menus_about_exit, NULL);
return m;
@@ -96,6 +101,14 @@
}
static void
+_e_int_menus_about_restart(void *data, E_Menu *m, E_Menu_Item *mi)
+{
+ printf("RESTART ON!\n");
+ restart = 1;
+ ecore_main_loop_quit();
+}
+
+static void
_e_int_menus_about_exit(void *data, E_Menu *m, E_Menu_Item *mi)
{
ecore_main_loop_quit();
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_main.c 25 Nov 2004 03:37:44 -0000 1.1
+++ e_main.c 25 Nov 2004 04:07:48 -0000 1.2
@@ -35,6 +35,7 @@
E_Path *path_fonts = NULL;
E_Path *path_themes = NULL;
E_Path *path_init = NULL;
+int restart = 0;
/* local subsystem functions */
#define MAX_LEVEL 32
@@ -273,6 +274,15 @@
/* unroll our stack of shutdown functions with exit code of 0 */
_e_main_shutdown(0);
+
+ /* if we were flagged to restart, then restart. */
+ if (restart)
+ {
+ printf("Restart...\n");
+ ecore_app_restart();
+ printf("eh? restart failed!\n");
+ }
+
/* just return 0 to keep the compiler quiet */
return 0;
}
@@ -334,7 +344,7 @@
}
for (i = _e_main_level - 1; i >= 0; i--)
(*_e_main_shutdown_func[i])();
- exit(errorcode);
+ if (errorcode < 0) exit(errorcode);
}
static int
-------------------------------------------------------
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