Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        Makefile.am e_about.h e_color_dialog.h e_entry_dialog.h 
        e_file_dialog.h e_gadcon.h e_includes.h e_shelf.h e_sys.c 
Added Files:
        e_obj_dialog.c e_obj_dialog.h 


Log Message:


sys actions have status/info/progress dialogs that should work right for all
actions (so you know what is going on and have some feedback/status).

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/Makefile.am,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -3 -r1.150 -r1.151
--- Makefile.am 6 Sep 2006 08:06:19 -0000       1.150
+++ Makefile.am 10 Sep 2006 04:51:07 -0000      1.151
@@ -171,6 +171,7 @@
 e_color_dialog.h  \
 e_fdo_menu_to_order.h \
 e_sys.h \
+e_obj_dialog.h \
 e_int_config_transitions.h
  
 enlightenment_src = \
@@ -317,6 +318,7 @@
 e_fdo_menu_to_order.c \
 e_sys.c \
 e_int_config_transitions.c \
+e_obj_dialog.c \
 $(ENLIGHTENMENTHEADERS)
 
 enlightenment_SOURCES = \
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_about.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_about.h   20 Sep 2005 08:34:23 -0000      1.1
+++ e_about.h   10 Sep 2006 04:51:07 -0000      1.2
@@ -9,7 +9,7 @@
 #ifndef E_ABOUT_H
 #define E_ABOUT_H
 
-#define E_ABOUT_TYPE 0xE0b01013
+#define E_ABOUT_TYPE 0xE0b0101a
 
 struct _E_About
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_color_dialog.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_color_dialog.h    20 Aug 2006 23:29:41 -0000      1.3
+++ e_color_dialog.h    10 Sep 2006 04:51:07 -0000      1.4
@@ -9,7 +9,7 @@
 #ifndef E_COLOR_DIALOG_H
 #define E_COLOR_DIALOG_H
 
-#define E_COLOR_DIALOG_TYPE 0xE0b01026
+#define E_COLOR_DIALOG_TYPE 0xE0b0101c
 
 struct _E_Color_Dialog
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_entry_dialog.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e_entry_dialog.h    17 Aug 2006 16:58:32 -0000      1.4
+++ e_entry_dialog.h    10 Sep 2006 04:51:07 -0000      1.5
@@ -9,7 +9,7 @@
 #ifndef E_ENTRY_DIALOG_H
 #define E_ENTRY_DIALOG_H
 
-#define E_ENTRY_DIALOG_TYPE 0xE0b01025
+#define E_ENTRY_DIALOG_TYPE 0xE0b0101d
 
 struct _E_Entry_Dialog
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_file_dialog.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_file_dialog.h     5 Dec 2005 22:20:33 -0000       1.3
+++ e_file_dialog.h     10 Sep 2006 04:51:07 -0000      1.4
@@ -9,7 +9,7 @@
 #ifndef E_FILE_DIALOG_H
 #define E_FILE_DIALOG_H
 
-#define E_FILE_DIALOG_TYPE 0xE0b01020
+#define E_FILE_DIALOG_TYPE 0xE0b0101f
 
 struct _E_File_Dialog
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- e_gadcon.h  31 Aug 2006 04:16:43 -0000      1.25
+++ e_gadcon.h  10 Sep 2006 04:51:07 -0000      1.26
@@ -40,8 +40,8 @@
 #ifndef E_GADCON_H
 #define E_GADCON_H
 
-#define E_GADCON_TYPE 0xE0b01022
-#define E_GADCON_CLIENT_TYPE 0xE0b01023
+#define E_GADCON_TYPE 0xE0b01006
+#define E_GADCON_CLIENT_TYPE 0xE0b01007
 
 struct _E_Gadcon
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_includes.h,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -3 -r1.128 -r1.129
--- e_includes.h        6 Sep 2006 08:06:19 -0000       1.128
+++ e_includes.h        10 Sep 2006 04:51:07 -0000      1.129
@@ -146,3 +146,4 @@
 #include "e_fdo_menu_to_order.h"
 #include "e_sys.h"
 #include "e_int_config_transitions.h"
+#include "e_obj_dialog.h"
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_shelf.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_shelf.h   27 Jul 2006 06:22:19 -0000      1.15
+++ e_shelf.h   10 Sep 2006 04:51:07 -0000      1.16
@@ -9,7 +9,7 @@
 #ifndef E_SHELF_H
 #define E_SHELF_H
 
-#define E_SHELF_TYPE 0xE0b01024
+#define E_SHELF_TYPE 0xE0b0101e
 
 struct _E_Shelf
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_sys.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_sys.c     9 Sep 2006 07:00:14 -0000       1.2
+++ e_sys.c     10 Sep 2006 04:51:07 -0000      1.3
@@ -30,6 +30,7 @@
 static Ecore_Exe *_e_sys_exe = NULL;
 static double _e_sys_logout_begin_time = 0.0;
 static Ecore_Timer *_e_sys_logout_timer = NULL;
+static E_Obj_Dialog *_e_sys_dialog = NULL;
 
 /* externally accessible functions */
 EAPI int
@@ -134,11 +135,18 @@
    if ((_e_sys_exe) && (ev->exe == _e_sys_exe))
      {
        if (ev->exit_code != 0) _e_sys_action_failed();
+       if (((_e_sys_action_current != E_SYS_HALT) &&
+            (_e_sys_action_current != E_SYS_REBOOT)) ||
+           (ev->exit_code != 0))
+         {
+            if (_e_sys_dialog)
+              {
+                 e_object_del(E_OBJECT(_e_sys_dialog));
+                 _e_sys_dialog = NULL;
+              }
+         }
        _e_sys_action_current = E_SYS_NONE;
        _e_sys_exe = NULL;
-       /* if we have a suspend or hibernate status popup/dialog - close it
-        * here as we have finished suspend/hibernate (and probably just
-        * came back out of suspend/hibernate */
        return 1;
      }
    if ((_e_sys_halt_check_exe) && (ev->exe == _e_sys_halt_check_exe))
@@ -212,6 +220,11 @@
    e_object_del(E_OBJECT(dia));
    _e_sys_action_current = E_SYS_NONE;
    _e_sys_action_after = E_SYS_NONE;
+   if (_e_sys_dialog)
+     {
+       e_object_del(E_OBJECT(_e_sys_dialog));
+       _e_sys_dialog = NULL;
+     }
 }
 
 static int
@@ -255,7 +268,7 @@
                  e_dialog_button_focus_num(dia, 1);
                  e_win_centered_set(dia->win, 1);
                  e_dialog_show(dia);
-                 _e_sys_logout_begin_time = ecore_time_get() + (60 * 60 * 24 * 
365);
+                 _e_sys_logout_begin_time = 0.0;
               }
             _e_sys_logout_timer = NULL;
             return 0;
@@ -271,8 +284,13 @@
 static void
 _e_sys_logout_after(void)
 {
+   if (_e_sys_dialog)
+     {
+       e_object_del(E_OBJECT(_e_sys_dialog));
+       _e_sys_dialog = NULL;
+     }
+   _e_sys_action_current = _e_sys_action_after;
    _e_sys_action_do(_e_sys_action_after, NULL);
-   _e_sys_action_current = E_SYS_NONE;
    _e_sys_action_after = E_SYS_NONE;
 }
 
@@ -280,14 +298,20 @@
 _e_sys_logout_begin(E_Sys_Action a_after)
 {
    Evas_List *l;
+   E_Obj_Dialog *od;
    
    /* start logout - at end do the a_after action */
+   od = e_obj_dialog_new(e_container_current_get(e_manager_current_get()), 
+                        _("Logout in progress"), "E", "_sys_logout");
+   e_obj_dialog_obj_theme_set(od, "base/theme/sys", "e/sys/logout");
+   e_obj_dialog_obj_part_text_set(od, "e.textblock.message",
+                                 _("Logout is currently in progress.<br>"
+                                   "<hilight>Please wait.</hilight>"));
+   e_obj_dialog_show(od);
+   e_obj_dialog_icon_set(od, "enlightenment/logout");
+   if (_e_sys_dialog) e_object_del(E_OBJECT(_e_sys_dialog));
+   _e_sys_dialog = od;
    _e_sys_action_after = a_after;
-   /* FIXME: go through to every window and if it wants delete req - ask
-    * it to delete, otherwise just close it. set handler for window
-    * deletes, and once all windows are deleted - exit, OR if a timer
-    * expires - pop up dialog saying something is not responding
-    */
    for (l = e_border_client_list(); l; l = l->next)
      {
        E_Border *bd;
@@ -410,6 +434,7 @@
 _e_sys_action_do(E_Sys_Action a, char *param)
 {
    char buf[4096];
+   E_Obj_Dialog *od;
    
    switch (a)
      {
@@ -439,6 +464,16 @@
        else
          {
             _e_sys_exe = ecore_exe_run(buf, NULL);
+            od = 
e_obj_dialog_new(e_container_current_get(e_manager_current_get()), 
+                                  _("Shutting down"), "E", "_sys_halt");
+            e_obj_dialog_obj_theme_set(od, "base/theme/sys", "e/sys/halt");
+            e_obj_dialog_obj_part_text_set(od, "e.textblock.message",
+                                           _("Shutting down your Computer.<br>"
+                                             "<hilight>Please 
wait.</hilight>"));
+            e_obj_dialog_show(od);
+            e_obj_dialog_icon_set(od, "enlightenment/logout");
+            if (_e_sys_dialog) e_object_del(E_OBJECT(_e_sys_dialog));
+            _e_sys_dialog = od;
             /* FIXME: display halt status */
          }
        break;
@@ -455,6 +490,16 @@
        else
          {
             _e_sys_exe = ecore_exe_run(buf, NULL);
+            od = 
e_obj_dialog_new(e_container_current_get(e_manager_current_get()), 
+                                  _("Rebooting"), "E", "_sys_reboot");
+            e_obj_dialog_obj_theme_set(od, "base/theme/sys", "e/sys/reboot");
+            e_obj_dialog_obj_part_text_set(od, "e.textblock.message",
+                                           _("Rebooting your Computer.<br>"
+                                             "<hilight>Please 
wait.</hilight>"));
+            e_obj_dialog_show(od);
+            e_obj_dialog_icon_set(od, "enlightenment/logout");
+            if (_e_sys_dialog) e_object_del(E_OBJECT(_e_sys_dialog));
+            _e_sys_dialog = od;
             /* FIXME: display reboot status */
          }
        break;
@@ -470,6 +515,16 @@
        else
          {
             _e_sys_exe = ecore_exe_run(buf, NULL);
+            od = 
e_obj_dialog_new(e_container_current_get(e_manager_current_get()), 
+                                  _("Suspending"), "E", "_sys_suspend");
+            e_obj_dialog_obj_theme_set(od, "base/theme/sys", "e/sys/suspend");
+            e_obj_dialog_obj_part_text_set(od, "e.textblock.message",
+                                           _("Suspending your Computer.<br>"
+                                             "<hilight>Please 
wait.</hilight>"));
+            e_obj_dialog_show(od);
+            e_obj_dialog_icon_set(od, "enlightenment/logout");
+            if (_e_sys_dialog) e_object_del(E_OBJECT(_e_sys_dialog));
+            _e_sys_dialog = od;
             /* FIXME: display suspend status */
          }
        break;
@@ -485,6 +540,16 @@
        else
          {
             _e_sys_exe = ecore_exe_run(buf, NULL);
+            od = 
e_obj_dialog_new(e_container_current_get(e_manager_current_get()), 
+                                  _("Hibernating"), "E", "_sys_hibernate");
+            e_obj_dialog_obj_theme_set(od, "base/theme/sys", 
"e/sys/hibernate");
+            e_obj_dialog_obj_part_text_set(od, "e.textblock.message",
+                                           _("Hibernating your Computer.<br>"
+                                             "<hilight>Please 
wait.</hilight>"));
+            e_obj_dialog_show(od);
+            e_obj_dialog_icon_set(od, "enlightenment/logout");
+            if (_e_sys_dialog) e_object_del(E_OBJECT(_e_sys_dialog));
+            _e_sys_dialog = od;
             /* FIXME: display hibernate status */
          }
        break;



-------------------------------------------------------------------------
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