Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_filedialog.c ewl_filedialog.h 


Log Message:
- make the fd menu work a bit better

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filedialog.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_filedialog.c    10 Apr 2006 04:43:17 -0000      1.16
+++ ewl_filedialog.c    12 Apr 2006 00:29:04 -0000      1.17
@@ -62,7 +62,7 @@
 int
 ewl_filedialog_init(Ewl_Filedialog *fd)
 {
-       Ewl_Widget *w, *menu, *o;
+       Ewl_Widget *w, *o;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("fd", fd, FALSE);
@@ -103,21 +103,21 @@
                                                EWL_FLAG_FILL_FILL);
        ewl_widget_internal_set(EWL_WIDGET(fd->menu_float), TRUE);
 
-       menu = ewl_menu_new();
-       ewl_button_label_set(EWL_BUTTON(menu), " ");
-       ewl_container_child_append(EWL_CONTAINER(fd->menu_float), menu);
-       ewl_widget_show(menu);
+       fd->menu = ewl_menu_new();
+       ewl_button_label_set(EWL_BUTTON(fd->menu), " ");
+       ewl_container_child_append(EWL_CONTAINER(fd->menu_float), fd->menu);
+       ewl_widget_show(fd->menu);
 
        o = ewl_menu_item_new();
        ewl_button_label_set(EWL_BUTTON(o), "Icon view");
-       ewl_container_child_append(EWL_CONTAINER(menu), o);
+       ewl_container_child_append(EWL_CONTAINER(fd->menu), o);
        ewl_callback_append(o, EWL_CALLBACK_CLICKED,
                                ewl_filedialog_cb_icon_view, fd);
        ewl_widget_show(o);
 
        o = ewl_menu_item_new();
        ewl_button_label_set(EWL_BUTTON(o), "List view");
-       ewl_container_child_append(EWL_CONTAINER(menu), o);
+       ewl_container_child_append(EWL_CONTAINER(fd->menu), o);
        ewl_callback_append(o, EWL_CALLBACK_CLICKED,
                                ewl_filedialog_cb_list_view, fd);
        ewl_widget_show(o);
@@ -462,6 +462,11 @@
                                                event->x - x, 
                                                event->y - y);
                ewl_widget_show(fd->menu_float);
+
+               ewl_callback_call(EWL_WIDGET(fd->menu),
+                                       EWL_CALLBACK_FOCUS_IN);
+               ewl_object_state_remove(EWL_OBJECT(fd->menu_float),
+                                               EWL_FLAG_STATE_PRESSED);
        }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filedialog.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_filedialog.h    10 Apr 2006 17:35:21 -0000      1.13
+++ ewl_filedialog.h    12 Apr 2006 00:29:04 -0000      1.14
@@ -38,6 +38,7 @@
        Ewl_Dialog dialog;      /**< The dialog base class */
        Ewl_Widget *fp;         /**< Ewl_Filepicker */
        Ewl_Widget *menu_float; /**< Floater to hold the menu */
+       Ewl_Widget *menu;       /**< The menu */
 };
 
 Ewl_Widget     *ewl_filedialog_multiselect_new(void);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to