Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_config.c ewl_filedialog.c ewl_fileselector.c ewl_tree.c 
        ewl_widget.c 


Log Message:
Some workarounds for the filedialog hangs.
A fix for the widget and container interaction to avoid potential loops.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_config.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_config.c        25 Aug 2004 05:05:44 -0000      1.39
+++ ewl_config.c        28 Dec 2004 23:02:31 -0000      1.40
@@ -165,7 +165,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       DRETURN_INT((ewl_config.evas.render_method ?
+       DRETURN_PTR((ewl_config.evas.render_method ?
                                strdup(ewl_config.evas.render_method) : NULL),
                        DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_filedialog.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- ewl_filedialog.c    21 Dec 2004 19:53:00 -0000      1.46
+++ ewl_filedialog.c    28 Dec 2004 23:02:36 -0000      1.47
@@ -60,6 +60,8 @@
        ewl_widget_show(fd->fs);
 
        box = ewl_hbox_new();
+       ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_HFILL |
+                       EWL_FLAG_FILL_HSHRINK);
        ewl_object_alignment_set(EWL_OBJECT(box), EWL_FLAG_ALIGN_RIGHT);
        ewl_container_child_append(EWL_CONTAINER(fd), box);
        ewl_widget_show(box);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_fileselector.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- ewl_fileselector.c  21 Dec 2004 20:29:22 -0000      1.55
+++ ewl_fileselector.c  28 Dec 2004 23:02:36 -0000      1.56
@@ -525,6 +525,12 @@
        char *path2;
        char *title;
 
+       /*
+        * FIXME: These next two lines shouldn't be necessary.
+       */
+       ewl_tree_selected_clear(EWL_TREE(fs->list_dirs));
+       ewl_tree_selected_clear(EWL_TREE(fs->list_files));
+
        ewl_container_reset(EWL_CONTAINER(fs->list_dirs));
        ewl_container_reset(EWL_CONTAINER(fs->list_files));
        ewl_entry_text_set(EWL_ENTRY(fs->entry_file), "");
@@ -616,6 +622,7 @@
        if (cont)
                ewl_container_redirect_set(EWL_CONTAINER(parent_win), cont);
 
+       FREE(title);
        ecore_list_destroy(files);
        ecore_list_destroy(dirs);
 }
@@ -674,7 +681,7 @@
        str = (char *) malloc(sizeof(char) * (strlen(name) +
                                              strlen(size) +
                                              strlen(perm) + 3));
-       str = memcpy(str, name, strlen(name));
+       memcpy(str, name, strlen(name));
        str[strlen(name)] = '\n';
 
        memcpy(str + strlen(name) + 1, size, strlen(size));
@@ -690,8 +697,8 @@
                            EWL_CALLBACK_FUNCTION
                            (ewl_fileselector_tooltip_destroy_cb), tooltip);
 
-       free(str);
-       free(size);
-       free(perm);
+       FREE(str);
+       FREE(size);
+       FREE(perm);
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewl_tree.c  9 Dec 2004 05:26:10 -0000       1.58
+++ ewl_tree.c  28 Dec 2004 23:02:36 -0000      1.59
@@ -180,6 +180,8 @@
        ewl_container_child_append(EWL_CONTAINER(node), row);
        ewl_callback_append(row, EWL_CALLBACK_MOUSE_DOWN,
                            ewl_tree_row_select_cb, NULL);
+       ewl_callback_append(row, EWL_CALLBACK_HIDE,
+                           ewl_tree_row_hide_cb, NULL);
 
        /*
         * Pretty basic here, build up the rows and add the widgets to them.
@@ -829,6 +831,25 @@
 }
 
 void
+ewl_tree_row_hide_cb(Ewl_Widget *w, void *ev_data, void *user_data)
+{
+       Ewl_Tree *tree;
+       Ewl_Tree_Node *node;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+
+       node = EWL_TREE_NODE(w->parent);
+       tree = node->tree;
+
+       if (ecore_list_goto(tree->selected, w)) {
+               ecore_list_remove(tree->selected);
+               ewl_widget_state_set(w, "tree-selected");
+       }
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+void
 ewl_tree_hscroll_cb(Ewl_Widget *w, void *ev_data, void *user_data)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -3 -r1.130 -r1.131
--- ewl_widget.c        24 Dec 2004 22:16:41 -0000      1.130
+++ ewl_widget.c        28 Dec 2004 23:02:36 -0000      1.131
@@ -218,6 +218,18 @@
        if (HIDDEN(w))
                DRETURN(DLEVEL_STABLE);
 
+       /*
+        * These are only applicable to visible widgets.
+        */
+       if (w == last_selected)
+               last_selected = NULL;
+       if (w == last_key)
+               last_key = NULL;
+       if (w == last_focused)
+               last_focused = NULL;
+       if (w == dnd_widget)
+               dnd_widget = NULL;
+
        ewl_object_visible_remove(EWL_OBJECT(w), EWL_FLAG_VISIBLE_SHOWN);
 
        if (REALIZED(w))
@@ -243,6 +255,8 @@
                DRETURN(DLEVEL_STABLE);
 
        ewl_widget_hide(w);
+       if (w->parent)
+               ewl_container_child_remove(EWL_CONTAINER(w->parent), w);
        ewl_destroy_request(w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);




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

Reply via email to