Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        Makefile.am e_actions.c e_ilist.c e_ilist.h e_includes.h 
        e_int_menus.c e_main.c e_widget_ilist.c e_widget_ilist.h 
Added Files:
        e_sys.c e_sys.h e_sys_main.c 


Log Message:


lots of freaky stuff.

1. cleaned up actions for restart and exit
2. made main menu cleaner in just using the actions
3. added ilits unselect calls for ilist smart and widget
4. patch for cpufreq to set all cpu clocks
5. fix battery module to handle broken acpi impl's that don't report drain rate
6. add e_sys subsystem - for executing system sensitive stuff like halt, reboot
   suspend, hibernate etc. this also covers exit, restart and logout. logout
   is currently dormant and just an action - not bound or in a menu. not
   complete anyway (no code for it). halt and reboot should probably use
   logout logic to shut down apps - i will recycle it. i added a suid root
   binary to do the actions - uses a system config (default one supplied that
   is secure - root will need to modify it to allow things).
7. fixed suid install hook for cpufreq
8. added sysconf dir to build for sys config file.
9. pants on

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/Makefile.am,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- Makefile.am 1 Sep 2006 17:21:23 -0000       1.146
+++ Makefile.am 3 Sep 2006 08:51:31 -0000       1.147
@@ -10,7 +10,8 @@
           -DPACKAGE_BIN_DIR=\"@[EMAIL PROTECTED]" \
           -DPACKAGE_LIB_DIR=\"@[EMAIL PROTECTED]" \
           -DPACKAGE_DATA_DIR=\"@[EMAIL PROTECTED]" \
-          -DLOCALE_DIR=\"@[EMAIL PROTECTED]"
+          -DLOCALE_DIR=\"@[EMAIL PROTECTED]" \
+          -DPACKAGE_SYSCONF_DIR=\"@[EMAIL PROTECTED]"
 
 bin_PROGRAMS = \
 enlightenment \
@@ -19,7 +20,8 @@
 enlightenment_eapp_cache_gen \
 enlightenment_imc \
 enlightenment_start \
-enlightenment_thumb
+enlightenment_thumb \
+enlightenment_sys
 
 ENLIGHTENMENTHEADERS = \
 e.h \
@@ -178,8 +180,9 @@
 e_int_config_wallpaper_import.h \
 e_int_config_wallpaper_gradient.h \
 e_color_dialog.h  \
-e_fdo_menu_to_order.h
-
+e_fdo_menu_to_order.h \
+e_sys.h
+ 
 enlightenment_src = \
 e_user.c \
 e_manager.c \
@@ -333,6 +336,7 @@
 e_int_config_wallpaper_gradient.c \
 e_color_dialog.c \
 e_fdo_menu_to_order.c \
+e_sys.c \
 $(ENLIGHTENMENTHEADERS)
 
 enlightenment_SOURCES = \
@@ -378,6 +382,15 @@
 e_sha1.h
 
 enlightenment_thumb_LDFLAGS = @e_libs@ @dlopen_libs@
+
+enlightenment_sys_SOURCES = \
+e_sys_main.c
+
+enlightenment_sys_LDFLAGS = @e_libs@ @dlopen_libs@
+
+setuid_root_mode = a=rx,u+s
+install-exec-hook:
+       @chmod $(setuid_root_mode) 
$(DESTDIR)$(bindir)/enlightenment_sys$(EXEEXT) || true
 
 installed_headersdir = $(prefix)/include/enlightenment
 installed_headers_DATA = $(ENLIGHTENMENTHEADERS)
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- e_actions.c 21 Aug 2006 04:35:52 -0000      1.79
+++ e_actions.c 3 Sep 2006 08:51:31 -0000       1.80
@@ -66,8 +66,6 @@
 static Evas_Bool _e_actions_cb_free(Evas_Hash *hash, const char *key, void 
*data, void *fdata);
 static E_Maximize _e_actions_maximize_parse(const char *maximize);
 
-static E_Dialog *exit_dialog = NULL;
-
 /* to save writing this in N places - the sctions are defined here */
 /***************************************************************************/
 ACT_FN_GO(window_move)
@@ -1364,14 +1362,16 @@
        e_desk_deskshow(zone);
      }
 }
+
 /***************************************************************************/
+static E_Dialog *exit_dialog = NULL;
 
 static void
 _e_actions_cb_exit_dialog_ok(void *data, E_Dialog *dia)
 {
-   ecore_main_loop_quit();
    e_object_del(E_OBJECT(exit_dialog));
    exit_dialog = NULL;
+   e_sys_action_do(E_SYS_EXIT, NULL);
 }
 
 static void
@@ -1415,10 +1415,261 @@
 /***************************************************************************/
 ACT_FN_GO(restart)
 {
-   restart = 1;
-   ecore_main_loop_quit();
+   e_sys_action_do(E_SYS_RESTART, NULL);
+}
+
+/***************************************************************************/
+ACT_FN_GO(exit_now)
+{
+   e_sys_action_do(E_SYS_EXIT_NOW, NULL);
+}
+
+/***************************************************************************/
+static E_Dialog *logout_dialog = NULL;
+
+static void
+_e_actions_cb_logout_dialog_ok(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(logout_dialog));
+   logout_dialog = NULL;
+   e_sys_action_do(E_SYS_LOGOUT, NULL);
+}
+
+static void
+_e_actions_cb_logout_dialog_cancel(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(logout_dialog));
+   logout_dialog = NULL;
+}
+
+static void
+_e_actions_cb_logout_dialog_delete(E_Win *win)
+{
+   E_Dialog *dia;
+
+   dia = win->data;
+   _e_actions_cb_logout_dialog_cancel(NULL, dia);
+}
+
+ACT_FN_GO(logout)
+{
+   if (logout_dialog) e_object_del(E_OBJECT(logout_dialog));
+   logout_dialog = 
e_dialog_new(e_container_current_get(e_manager_current_get()), "E", 
"_logout_dialog");
+   if (!logout_dialog) return;
+   e_win_delete_callback_set(logout_dialog->win, 
_e_actions_cb_logout_dialog_delete);
+   e_dialog_title_set(logout_dialog, _("Are you sure you want to log out?"));
+   e_dialog_text_set(logout_dialog,
+                    _("You are about to log out.<br>"
+                      "<br>"
+                      "Are you sure you want to do this?"
+                      ));
+   e_dialog_icon_set(logout_dialog, "enlightenment/logout", 64);
+   e_dialog_button_add(logout_dialog, _("Yes"), NULL,
+                      _e_actions_cb_logout_dialog_ok, NULL);
+   e_dialog_button_add(logout_dialog, _("No"), NULL,
+                      _e_actions_cb_logout_dialog_cancel, NULL);
+   e_dialog_button_focus_num(logout_dialog, 1);
+   e_win_centered_set(logout_dialog->win, 1);
+   e_dialog_show(logout_dialog);
+}
+
+/***************************************************************************/
+static E_Dialog *halt_dialog = NULL;
+
+static void
+_e_actions_cb_halt_dialog_ok(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(halt_dialog));
+   halt_dialog = NULL;
+   e_sys_action_do(E_SYS_HALT, NULL);
+}
+
+static void
+_e_actions_cb_halt_dialog_cancel(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(halt_dialog));
+   halt_dialog = NULL;
+}
+
+static void
+_e_actions_cb_halt_dialog_delete(E_Win *win)
+{
+   E_Dialog *dia;
+
+   dia = win->data;
+   _e_actions_cb_halt_dialog_cancel(NULL, dia);
+}
+
+ACT_FN_GO(halt)
+{
+   if (halt_dialog) e_object_del(E_OBJECT(halt_dialog));
+   halt_dialog = 
e_dialog_new(e_container_current_get(e_manager_current_get()), "E", 
"_halt_dialog");
+   if (!halt_dialog) return;
+   e_win_delete_callback_set(halt_dialog->win, 
_e_actions_cb_halt_dialog_delete);
+   e_dialog_title_set(halt_dialog, _("Are you sure you want to turn off?"));
+   e_dialog_text_set(halt_dialog,
+                    _("You requested to turn off your Computer.<br>"
+                      "<br>"
+                      "Are you sure you want to shut down?"
+                      ));
+   e_dialog_icon_set(halt_dialog, "enlightenment/halt", 64);
+   e_dialog_button_add(halt_dialog, _("Yes"), NULL,
+                      _e_actions_cb_halt_dialog_ok, NULL);
+   e_dialog_button_add(halt_dialog, _("No"), NULL,
+                      _e_actions_cb_halt_dialog_cancel, NULL);
+   e_dialog_button_focus_num(halt_dialog, 1);
+   e_win_centered_set(halt_dialog->win, 1);
+   e_dialog_show(halt_dialog);
+}
+
+/***************************************************************************/
+static E_Dialog *reboot_dialog = NULL;
+
+static void
+_e_actions_cb_reboot_dialog_ok(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(reboot_dialog));
+   reboot_dialog = NULL;
+   e_sys_action_do(E_SYS_REBOOT, NULL);
+}
+
+static void
+_e_actions_cb_reboot_dialog_cancel(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(reboot_dialog));
+   reboot_dialog = NULL;
+}
+
+static void
+_e_actions_cb_reboot_dialog_delete(E_Win *win)
+{
+   E_Dialog *dia;
+
+   dia = win->data;
+   _e_actions_cb_reboot_dialog_cancel(NULL, dia);
+}
+
+ACT_FN_GO(reboot)
+{
+   if (reboot_dialog) e_object_del(E_OBJECT(reboot_dialog));
+   reboot_dialog = 
e_dialog_new(e_container_current_get(e_manager_current_get()), "E", 
"_reboot_dialog");
+   if (!reboot_dialog) return;
+   e_win_delete_callback_set(reboot_dialog->win, 
_e_actions_cb_reboot_dialog_delete);
+   e_dialog_title_set(reboot_dialog, _("Are you sure you want to reboot?"));
+   e_dialog_text_set(reboot_dialog,
+                    _("You requested to reboot your Computer.<br>"
+                      "<br>"
+                      "Are you sure you want to restart it?"
+                      ));
+   e_dialog_icon_set(reboot_dialog, "enlightenment/reboot", 64);
+   e_dialog_button_add(reboot_dialog, _("Yes"), NULL,
+                      _e_actions_cb_reboot_dialog_ok, NULL);
+   e_dialog_button_add(reboot_dialog, _("No"), NULL,
+                      _e_actions_cb_reboot_dialog_cancel, NULL);
+   e_dialog_button_focus_num(reboot_dialog, 1);
+   e_win_centered_set(reboot_dialog->win, 1);
+   e_dialog_show(reboot_dialog);
+}
+
+/***************************************************************************/
+static E_Dialog *suspend_dialog = NULL;
+
+static void
+_e_actions_cb_suspend_dialog_ok(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(suspend_dialog));
+   suspend_dialog = NULL;
+   e_sys_action_do(E_SYS_SUSPEND, NULL);
+}
+
+static void
+_e_actions_cb_suspend_dialog_cancel(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(suspend_dialog));
+   suspend_dialog = NULL;
+}
+
+static void
+_e_actions_cb_suspend_dialog_delete(E_Win *win)
+{
+   E_Dialog *dia;
+
+   dia = win->data;
+   _e_actions_cb_suspend_dialog_cancel(NULL, dia);
+}
+
+ACT_FN_GO(suspend)
+{
+   if (suspend_dialog) e_object_del(E_OBJECT(suspend_dialog));
+   suspend_dialog = 
e_dialog_new(e_container_current_get(e_manager_current_get()), "E", 
"_suspend_dialog");
+   if (!suspend_dialog) return;
+   e_win_delete_callback_set(suspend_dialog->win, 
_e_actions_cb_suspend_dialog_delete);
+   e_dialog_title_set(suspend_dialog, _("Are you sure you want to turn off?"));
+   e_dialog_text_set(suspend_dialog,
+                    _("You requested to suspend your Computer.<br>"
+                      "<br>"
+                      "Are you sure you want to suspend?"
+                      ));
+   e_dialog_icon_set(suspend_dialog, "enlightenment/suspend", 64);
+   e_dialog_button_add(suspend_dialog, _("Yes"), NULL,
+                      _e_actions_cb_suspend_dialog_ok, NULL);
+   e_dialog_button_add(suspend_dialog, _("No"), NULL,
+                      _e_actions_cb_suspend_dialog_cancel, NULL);
+   e_dialog_button_focus_num(suspend_dialog, 1);
+   e_win_centered_set(suspend_dialog->win, 1);
+   e_dialog_show(suspend_dialog);
+}
+
+/***************************************************************************/
+static E_Dialog *hibernate_dialog = NULL;
+
+static void
+_e_actions_cb_hibernate_dialog_ok(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(hibernate_dialog));
+   hibernate_dialog = NULL;
+   e_sys_action_do(E_SYS_HIBERNATE, NULL);
+}
+
+static void
+_e_actions_cb_hibernate_dialog_cancel(void *data, E_Dialog *dia)
+{
+   e_object_del(E_OBJECT(hibernate_dialog));
+   hibernate_dialog = NULL;
+}
+
+static void
+_e_actions_cb_hibernate_dialog_delete(E_Win *win)
+{
+   E_Dialog *dia;
+
+   dia = win->data;
+   _e_actions_cb_hibernate_dialog_cancel(NULL, dia);
+}
+
+ACT_FN_GO(hibernate)
+{
+   if (hibernate_dialog) e_object_del(E_OBJECT(hibernate_dialog));
+   hibernate_dialog = 
e_dialog_new(e_container_current_get(e_manager_current_get()), "E", 
"_hibernate_dialog");
+   if (!hibernate_dialog) return;
+   e_win_delete_callback_set(hibernate_dialog->win, 
_e_actions_cb_hibernate_dialog_delete);
+   e_dialog_title_set(hibernate_dialog, _("Are you sure you want to 
hibernate?"));
+   e_dialog_text_set(hibernate_dialog,
+                    _("You requested to hibernate your Computer.<br>"
+                      "<br>"
+                      "Are you sure you want to suspend to disk?"
+                      ));
+   e_dialog_icon_set(hibernate_dialog, "enlightenment/hibernate", 64);
+   e_dialog_button_add(hibernate_dialog, _("Yes"), NULL,
+                      _e_actions_cb_hibernate_dialog_ok, NULL);
+   e_dialog_button_add(hibernate_dialog, _("No"), NULL,
+                      _e_actions_cb_hibernate_dialog_cancel, NULL);
+   e_dialog_button_focus_num(hibernate_dialog, 1);
+   e_win_centered_set(hibernate_dialog->win, 1);
+   e_dialog_show(hibernate_dialog);
 }
 
+/***************************************************************************/
 ACT_FN_GO(pointer_resize_push)
 {
    E_Manager *man = NULL;
@@ -1438,6 +1689,7 @@
      }
 }
 
+/***************************************************************************/
 ACT_FN_GO(pointer_resize_pop)
 {
    E_Manager *man = NULL;
@@ -1467,6 +1719,7 @@
      e_exebuf_show(zone);
 }
 
+/***************************************************************************/
 ACT_FN_GO(desk_lock)
 {
 /*  E_Zone *zone;
@@ -1768,16 +2021,32 @@
    ACT_GO_MOUSE(winlist);
    ACT_GO_KEY(winlist);
    
-   /* restart */
    ACT_GO(restart);
    e_register_action_predef_name(_("Enlightenment"), _("Restart"), "restart", 
NULL,
                                 EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
-                                
-   /* exit */
    ACT_GO(exit);
    e_register_action_predef_name(_("Enlightenment"), _("Exit"), "exit", NULL,
                                 EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
+   ACT_GO(logout);
+   e_register_action_predef_name(_("Enlightenment"), _("Log Out"), "logout", 
NULL,
+                                EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
+   ACT_GO(exit_now);
+   e_register_action_predef_name(_("Enlightenment"), _("Exit Immediately"), 
"exit_now", NULL,
+                                EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
 
+   ACT_GO(halt);
+   e_register_action_predef_name(_("System"), _("Shut Down"), "halt", NULL,
+                                EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
+   ACT_GO(reboot);
+   e_register_action_predef_name(_("System"), _("Reboot"), "reboot", NULL,
+                                EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
+   ACT_GO(suspend);
+   e_register_action_predef_name(_("System"), _("Suspend"), "suspend", NULL,
+                                EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
+   ACT_GO(hibernate);
+   e_register_action_predef_name(_("System"), _("Suspend to Disk"), 
"hibernate", NULL,
+                                EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 
0);
+   
    ACT_GO(pointer_resize_push);
    ACT_GO(pointer_resize_pop);
    
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_ilist.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- e_ilist.c   23 Aug 2006 03:39:02 -0000      1.24
+++ e_ilist.c   3 Sep 2006 08:51:31 -0000       1.25
@@ -175,6 +175,18 @@
    return sd->selected;
 }
 
+EAPI void
+e_ilist_unselect(Evas_Object *obj)
+{
+   E_Smart_Item *si;
+   
+   API_ENTRY return;
+   if (!sd->items) return;
+   si = evas_list_nth(sd->items, sd->selected);
+   if (si) edje_object_signal_emit(si->base_obj, "e,state,unselected", "e");
+   sd->selected = -1;
+}
+
 EAPI const char *
 e_ilist_selected_label_get(Evas_Object *obj)
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_ilist.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_ilist.h   8 Jun 2006 12:48:36 -0000       1.13
+++ e_ilist.h   3 Sep 2006 08:51:31 -0000       1.14
@@ -18,6 +18,7 @@
 EAPI void         e_ilist_min_size_get          (Evas_Object *obj, Evas_Coord 
*w, Evas_Coord *h);
 EAPI void         e_ilist_selector_set          (Evas_Object *obj, int 
selector);
 EAPI int          e_ilist_selector_get          (Evas_Object *obj);
+EAPI void         e_ilist_unselect              (Evas_Object *obj);
 EAPI void         e_ilist_remove_num            (Evas_Object *obj, int n);
 EAPI void         e_ilist_remove_label          (Evas_Object *obj, const char 
*label);
 EAPI const char  *e_ilist_nth_label_get                (Evas_Object *obj, int 
n);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_includes.h,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -3 -r1.125 -r1.126
--- e_includes.h        1 Sep 2006 17:21:23 -0000       1.125
+++ e_includes.h        3 Sep 2006 08:51:31 -0000       1.126
@@ -155,3 +155,5 @@
 #include "e_widget_csel.h"
 #include "e_color_dialog.h"
 #include "e_fdo_menu_to_order.h"
+#include "e_sys.h"
+
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_menus.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -3 -r1.157 -r1.158
--- e_int_menus.c       2 Sep 2006 07:20:06 -0000       1.157
+++ e_int_menus.c       3 Sep 2006 08:51:31 -0000       1.158
@@ -18,8 +18,6 @@
 };
 
 /* local subsystem functions */
-static void _e_int_menus_quit                (void);
-static void _e_int_menus_quit_cb             (void *data);
 static void _e_int_menus_main_del_hook       (void *obj);
 static void _e_int_menus_main_about          (void *data, E_Menu *m, 
E_Menu_Item *mi);
 static int  _e_int_menus_main_run_defer_cb   (void *data);
@@ -28,6 +26,10 @@
 static void _e_int_menus_main_lock           (void *data, E_Menu *m, 
E_Menu_Item*mi);
 static void _e_int_menus_main_restart        (void *data, E_Menu *m, 
E_Menu_Item *mi);
 static void _e_int_menus_main_exit           (void *data, E_Menu *m, 
E_Menu_Item *mi);
+static void _e_int_menus_main_halt           (void *data, E_Menu *m, 
E_Menu_Item *mi);
+static void _e_int_menus_main_reboot         (void *data, E_Menu *m, 
E_Menu_Item *mi);
+static void _e_int_menus_main_suspend        (void *data, E_Menu *m, 
E_Menu_Item *mi);
+static void _e_int_menus_main_hibernate      (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);
 static void _e_int_menus_apps_del_hook       (void *obj);
@@ -56,8 +58,6 @@
 static void _e_int_menus_augmentation_del    (E_Menu *m, Evas_List 
*augmentation);
 
 /* local subsystem globals */
-static Ecore_Job *_e_int_menus_quit_job = NULL;
-
 static Evas_Hash *_e_int_menus_augmentation = NULL;
 
 /* externally accessible functions */
@@ -150,6 +150,43 @@
 
    mi = e_menu_item_new(m);
    e_menu_item_separator_set(mi, 1);
+
+   if (e_sys_action_possible_get(E_SYS_HALT) ||
+       e_sys_action_possible_get(E_SYS_REBOOT) ||
+       e_sys_action_possible_get(E_SYS_SUSPEND) ||
+       e_sys_action_possible_get(E_SYS_HIBERNATE))
+     {
+       if (e_sys_action_possible_get(E_SYS_HALT))
+         {
+            mi = e_menu_item_new(m);
+            e_menu_item_label_set(mi, _("Shut Down your Computer"));
+            e_util_menu_item_edje_icon_set(mi, "enlightenment/halt");
+            e_menu_item_callback_set(mi, _e_int_menus_main_halt, NULL);
+         }
+       if (e_sys_action_possible_get(E_SYS_REBOOT))
+         {
+            mi = e_menu_item_new(m);
+            e_menu_item_label_set(mi, _("Reboot your Computer"));
+            e_util_menu_item_edje_icon_set(mi, "enlightenment/reboot");
+            e_menu_item_callback_set(mi, _e_int_menus_main_reboot, NULL);
+         }
+       if (e_sys_action_possible_get(E_SYS_SUSPEND))
+         {
+            mi = e_menu_item_new(m);
+            e_menu_item_label_set(mi, _("Suspend your Computer"));
+            e_util_menu_item_edje_icon_set(mi, "enlightenment/suspend");
+            e_menu_item_callback_set(mi, _e_int_menus_main_suspend, NULL);
+         }
+       if (e_sys_action_possible_get(E_SYS_HIBERNATE))
+         {
+            mi = e_menu_item_new(m);
+            e_menu_item_label_set(mi, _("Hibernate your Computer"));
+            e_util_menu_item_edje_icon_set(mi, "enlightenment/hibernate");
+            e_menu_item_callback_set(mi, _e_int_menus_main_hibernate, NULL);
+         }
+       mi = e_menu_item_new(m);
+       e_menu_item_separator_set(mi, 1);
+     }
    
    mi = e_menu_item_new(m);
    e_menu_item_label_set(mi, _("Restart Enlightenment"));
@@ -314,27 +351,6 @@
 
 /* local subsystem functions */
 static void
-_e_int_menus_quit(void)
-{
-   if (_e_int_menus_quit_job)
-     {
-       ecore_job_del(_e_int_menus_quit_job);
-       _e_int_menus_quit_job = NULL;
-     }
-   _e_int_menus_quit_job = ecore_job_add(_e_int_menus_quit_cb, NULL);
-}
-
-static void
-_e_int_menus_quit_cb(void *data)
-{
-   E_Action *a;
-   
-   a = e_action_find("exit");
-   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
-   _e_int_menus_quit_job = NULL;
-}
-
-static void
 _e_int_menus_main_del_hook(void *obj)
 {
    Main_Data *dat;
@@ -428,7 +444,46 @@
 static void
 _e_int_menus_main_exit(void *data, E_Menu *m, E_Menu_Item *mi)
 {
-   if (!e_util_immortal_check()) _e_int_menus_quit();
+   E_Action *a;
+   
+   a = e_action_find("exit");
+   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
+}
+
+static void
+_e_int_menus_main_halt(void *data, E_Menu *m, E_Menu_Item *mi)
+{
+   E_Action *a;
+   
+   a = e_action_find("halt");
+   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
+}
+
+static void
+_e_int_menus_main_reboot(void *data, E_Menu *m, E_Menu_Item *mi)
+{
+   E_Action *a;
+   
+   a = e_action_find("reboot");
+   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
+}
+
+static void
+_e_int_menus_main_suspend(void *data, E_Menu *m, E_Menu_Item *mi)
+{
+   E_Action *a;
+   
+   a = e_action_find("suspend");
+   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
+}
+
+static void
+_e_int_menus_main_hibernate(void *data, E_Menu *m, E_Menu_Item *mi)
+{
+   E_Action *a;
+   
+   a = e_action_find("hibernate");
+   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -3 -r1.183 -r1.184
--- e_main.c    2 Sep 2006 06:16:28 -0000       1.183
+++ e_main.c    3 Sep 2006 08:51:32 -0000       1.184
@@ -457,6 +457,14 @@
     }
    _e_main_shutdown_push(e_thumb_shutdown);
    
+   /* init the enlightenment sys command system */
+   if (!e_sys_init())
+    {
+       e_error_message_show(_("Enlightenment cannot initialize the System 
Command system.\n"));
+       _e_main_shutdown(-1);
+    }
+   _e_main_shutdown_push(e_sys_shutdown);
+   
    
    /* init the enlightenment file manager */
    if (!e_fm_icon_init() || !e_fm_init() || !e_fm2_init())
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_ilist.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- e_widget_ilist.c    22 Aug 2006 07:39:10 -0000      1.20
+++ e_widget_ilist.c    3 Sep 2006 08:51:32 -0000       1.21
@@ -105,6 +105,15 @@
    return e_ilist_selected_get(wd->o_ilist);
 }
 
+EAPI void
+e_widget_ilist_unselect(Evas_Object *obj)
+{
+   E_Widget_Data *wd;
+   
+   wd = e_widget_data_get(obj);
+   e_ilist_unselect(wd->o_ilist);
+}
+
 EAPI const char *
 e_widget_ilist_selected_label_get(Evas_Object *obj)
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_ilist.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_widget_ilist.h    21 Aug 2006 16:13:46 -0000      1.12
+++ e_widget_ilist.h    3 Sep 2006 08:51:32 -0000       1.13
@@ -13,6 +13,7 @@
 EAPI void e_widget_ilist_selector_set(Evas_Object *obj, int selector);
 EAPI void e_widget_ilist_go(Evas_Object *obj);
 EAPI int e_widget_ilist_selected_get(Evas_Object *obj);
+EAPI void e_widget_ilist_unselect(Evas_Object *obj);
 EAPI const char *e_widget_ilist_selected_label_get(Evas_Object *obj);
 EAPI void e_widget_ilist_remove_num(Evas_Object *obj, int n);
 EAPI void e_widget_ilist_remove_label(Evas_Object *obj, const char *label);



-------------------------------------------------------------------------
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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to