Enlightenment CVS committal

Author  : onefang
Project : e_modules
Module  : emu

Dir     : e_modules/emu/src/modules/emu_gadcon


Modified Files:
        e_mod_config.c e_mod_config.h e_mod_main.c e_mod_main.h 


Log Message:
Clean up some no longer needed stuff.

===================================================================
RCS file: /cvs/e/e_modules/emu/src/modules/emu_gadcon/e_mod_config.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_config.c      23 Apr 2006 08:42:34 -0000      1.2
+++ e_mod_config.c      23 Apr 2006 19:42:14 -0000      1.3
@@ -21,7 +21,7 @@
 static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data 
*cfdata);
 
 void
-_config_emu_module(E_Container *con, Emu *emu)
+_config_emu_module(E_Container *con, Emu_Face *emu_face)
 {
    E_Config_Dialog *cfd;
    E_Config_Dialog_View *v;
@@ -37,12 +37,12 @@
    v->advanced.create_widgets = _advanced_create_widgets;
 
    /* Create The Dialog */
-   cfd = e_config_dialog_new(con, D_("Emu Configuration"), NULL, 0, v, emu);
-   emu->config_dialog = cfd;
+   cfd = e_config_dialog_new(con, D_("Emu Configuration"), NULL, 0, v, 
emu_face);
+   emu_face->config_dialog = cfd;
 }
 
 static void
-_fill_data(Emu *emu, E_Config_Dialog_Data *cfdata)
+_fill_data(Emu_Face *emu_face, E_Config_Dialog_Data *cfdata)
 {
 }
 
@@ -50,22 +50,22 @@
 _create_data(E_Config_Dialog *cfd)
 {
    E_Config_Dialog_Data *cfdata;
-   Emu *emu;
+   Emu_Face *emu_face;
 
-   emu = cfd->data;
+   emu_face = cfd->data;
    cfdata = E_NEW(E_Config_Dialog_Data, 1);
 
-   _fill_data(emu, cfdata);
+   _fill_data(emu_face, cfdata);
    return cfdata;
 }
 
 static void
 _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
 {
-   Emu *emu;
+   Emu_Face *emu_face;
 
-   emu = cfd->data;
-   emu->config_dialog = NULL;
+   emu_face = cfd->data;
+   emu_face->config_dialog = NULL;
    free(cfdata);
 }
 
@@ -83,16 +83,16 @@
 static int
 _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
 {
-   Emu *emu;
+   Emu_Face *emu_face;
 
-   emu = cfd->data;
+   emu_face = cfd->data;
    e_border_button_bindings_ungrab_all();
 
 
    e_border_button_bindings_grab_all();
    e_config_save_queue();
 
-   _emu_cb_config_updated(emu);
+   _emu_cb_config_updated(emu_face);
    return 1;
 }
 
@@ -110,15 +110,15 @@
 static int
 _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
 {
-   Emu *emu;
+   Emu_Face *emu_face;
 
-   emu = cfd->data;
+   emu_face = cfd->data;
    e_border_button_bindings_ungrab_all();
 
 
    e_border_button_bindings_grab_all();
    e_config_save_queue();
 
-   _emu_cb_config_updated(emu);
+   _emu_cb_config_updated(emu_face);
    return 1;
 }
===================================================================
RCS file: /cvs/e/e_modules/emu/src/modules/emu_gadcon/e_mod_config.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_mod_config.h      23 Apr 2006 08:18:22 -0000      1.1
+++ e_mod_config.h      23 Apr 2006 19:42:14 -0000      1.2
@@ -3,6 +3,6 @@
 #ifndef E_MOD_CONFIG_H
 #define E_MOD_CONFIG_H
 #include "e_mod_main.h"
-void _config_emu_module(E_Container *con, Emu *emu);
+void _config_emu_module(E_Container *con, Emu_Face *emu_face);
 #endif
 #endif
===================================================================
RCS file: /cvs/e/e_modules/emu/src/modules/emu_gadcon/e_mod_main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_main.c        23 Apr 2006 08:42:34 -0000      1.2
+++ e_mod_main.c        23 Apr 2006 19:42:14 -0000      1.3
@@ -157,28 +157,12 @@
 EAPI void *
 e_modapi_init(E_Module *m)
 {
-//   Emu *emu;
-
    /* Set up module's message catalogue */
    bindtextdomain(PACKAGE, LOCALEDIR);
    bind_textdomain_codeset(PACKAGE, "UTF-8");
 
-//   emu = E_NEW(Emu, 1);
-
-//   if (emu)
-//     {
-//??        emu->del = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_emu_cb_exe_del, emu->gad);
-
-//        if (emu->del == NULL)
-//          {
-//             e_modapi_shutdown(m);
-//             emu = NULL;
-//          }
-//     }
-
    e_gadcon_provider_register(&_gadcon_class);
 
-//   return emu;
    return 1;
 }
 
@@ -194,14 +178,6 @@
 EAPI int
 e_modapi_save(E_Module *m)
 {
-//   Emu *emu;
-
-//   emu = m->data;
-
-//   if (emu)
-//     {
-//     }
-
    return 1;
 }
 
@@ -219,19 +195,8 @@
 EAPI int
 e_modapi_shutdown(E_Module *m)
 {
-   Emu *emu;
-
-
    e_gadcon_provider_unregister(&_gadcon_class);
 
-//   emu = m->data;
-//   if (emu)
-//     {
-//        if (emu->del)
-//           ecore_event_handler_del(emu->del);
-//        E_FREE(emu);
-//     }
-
 // FIXME: we really want to do this at unload time.
 //   if (_emu_module_edje)   evas_stringshare_del(_emu_module_edje);
 
@@ -275,7 +240,6 @@
 
         gcc = e_gadcon_client_new(gc, name, id, style, o);
         gcc->data = emu_face;
-//??        emu_face->emu = emu;
         emu_face->gcc = gcc;
         emu_face->o_button = o;
         emu_face->menus = NULL;
@@ -284,6 +248,7 @@
         emu_face->command = evas_stringshare_add("emu_client");
         if (emu_face->command)
           {
+             emu_face->del = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_emu_cb_exe_del, emu_face);
              emu_face->add = ecore_event_handler_add(ECORE_EXE_EVENT_ADD, 
_emu_cb_exe_add, emu_face);
              emu_face->read = ecore_event_handler_add(ECORE_EXE_EVENT_DATA, 
_emu_cb_exe_data, emu_face);
              emu_face->exe =
@@ -341,6 +306,8 @@
            ecore_event_handler_del(emu_face->read);
         if (emu_face->add)
            ecore_event_handler_del(emu_face->add);
+        if (emu_face->del)
+           ecore_event_handler_del(emu_face->del);
 
         if (emu_face->exe)
            ecore_exe_terminate(emu_face->exe);
@@ -674,10 +641,6 @@
 static int
 _emu_cb_exe_add(void *data, int type, void *ev)
 {
-   Emu *emu;
-
-   emu = data;
-
    return 1;
 }
 
@@ -696,31 +659,19 @@
 static int
 _emu_cb_exe_del(void *data, int type, void *ev)
 {
-//   if (E_OBJECT(data)->type == (E_GADGET_TYPE))
-//     {
-//        E_Gadget *gad;
-//        Ecore_Exe_Event_Del *event;
-//        Evas_List *l;
-//
-//        gad = data;
-//        event = ev;
-//        for (l = gad->faces; l; l = l->next)    /* Search for the matching 
face. */
-//          {
-//             E_Gadget_Face *face;
-//             Emu_Face *emu_face;
-//
-//             face = l->data;
-//             emu_face = face->data;
-//             if ((emu_face->exe == event->exe) && 
(ecore_exe_data_get(event->exe) == emu_face))
-//               {                /* This is the event we are interested in. */
-//                  emu_face->exe = NULL;
-//
-//                  printf("EMU CLIENT DEL - \n");
-//                  return 0;
-//               }
-//          }
-//     }
-//
+   Ecore_Exe_Event_Del *event;
+   Emu_Face *emu_face;
+
+   emu_face = data;
+   event = ev;
+   if ((emu_face->exe == event->exe) && (ecore_exe_data_get(event->exe) == 
emu_face))
+     {  /* This is the event we are interested in. */
+        emu_face->exe = NULL;
+
+        printf("EMU CLIENT DEL - \n");
+        return 0;
+     }
+
    return 1;
 }
 
===================================================================
RCS file: /cvs/e/e_modules/emu/src/modules/emu_gadcon/e_mod_main.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_main.h        23 Apr 2006 08:42:34 -0000      1.2
+++ e_mod_main.h        23 Apr 2006 19:42:14 -0000      1.3
@@ -25,29 +25,16 @@
    unsigned char enabled;
 };
 
-typedef struct _Emu Emu;
-struct _Emu
-{
-   Ecore_Event_Handler *del;
-
-//   Evas_List   *bars;
-   E_Menu *config_menu;
-
-   Config *conf;
-   E_Config_Dialog *config_dialog;
-};
-
 typedef struct _Emu_Face Emu_Face;
 struct _Emu_Face
 {
-//   Emu *emu;
-
    E_Gadcon_Client *gcc;
    Evas_Object     *o_button;
 
    const char *name;
    const char *command;
    Ecore_Exe *exe;
+   Ecore_Event_Handler *del;
    Ecore_Event_Handler *add;
    Ecore_Event_Handler *read;
 
@@ -58,6 +45,11 @@
    Ecore_Exe_Event_Data_Line *lines; /**< a NULL terminated array of line data 
if line buffered */
 
    Evas_Hash *menus;
+
+   E_Menu *config_menu;
+
+   Config *conf;
+   E_Config_Dialog *config_dialog;
 };
 
 EAPI extern E_Module_Api e_modapi;




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