Enlightenment CVS committal

Author  : kiwi
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/ibar


Modified Files:
        e_mod_config.c 


Log Message:
ibar confirm dialog on source delete is now destroyed when config dialog is 
closed.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_config.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- e_mod_config.c      6 Apr 2007 09:28:26 -0000       1.38
+++ e_mod_config.c      30 Apr 2007 23:08:06 -0000      1.39
@@ -15,6 +15,7 @@
    Evas_Object *radio_name;
    Evas_Object *radio_comment;
    Evas_Object *radio_generic;
+   E_Confirm_Dialog *dialog_delete;
 };
 
 /* Protos */
@@ -27,6 +28,7 @@
 static void _cb_config(void *data, void *data2);
 static void _cb_entry_ok(char *text, void *data);
 static void _cb_confirm_dialog_yes(void *data);
+static void _cb_confirm_dialog_destroy(void *data);
 static void _load_tlist(E_Config_Dialog_Data *cfdata);
 static void _show_label_cb_change(void *data, Evas_Object *obj);
 
@@ -83,6 +85,7 @@
 _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
 {
    if (cfdata->dir) free(cfdata->dir);
+   if (cfdata->dialog_delete) e_object_del(cfdata->dialog_delete);
    ibar_config->config_dialog = NULL;
    E_FREE(cfdata);
 }
@@ -168,15 +171,20 @@
 {
    char buf[4096];
    E_Config_Dialog_Data *cfdata;
-   
-   cfdata = data;
+   E_Confirm_Dialog *dialog;
+
+   cfdata = data;   
+   if (cfdata->dialog_delete)
+     return;
+
    snprintf(buf, sizeof(buf), _("You requested to delete \"%s\".<br><br>"
                                "Are you sure you want to delete this bar 
source?"),
            cfdata->dir);
    
-   e_confirm_dialog_show(_("Are you sure you want to delete this bar source?"),
-                        "enlightenment/exit", buf, NULL, NULL, 
-                        _cb_confirm_dialog_yes, NULL, cfdata, NULL, NULL, 
NULL);
+   dialog = e_confirm_dialog_show(_("Are you sure you want to delete this bar 
source?"),
+                                  "enlightenment/exit", buf, NULL, NULL, 
+                                  _cb_confirm_dialog_yes, NULL, cfdata, NULL, 
_cb_confirm_dialog_destroy, cfdata);
+   cfdata->dialog_delete = dialog;
 }
 
 static void 
@@ -233,6 +241,15 @@
      ecore_file_recursive_rm(buf);
    
    _load_tlist(cfdata);
+}
+
+static void
+_cb_confirm_dialog_destroy(void *data) 
+{
+   E_Config_Dialog_Data *cfdata;
+   
+   cfdata = data;
+   cfdata->dialog_delete = NULL;
 }
 
 static void 



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to