Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin


Modified Files:
        ewl_iconbox_test.c 


Log Message:
Use the clicks field in the event structure rather than an extra callback type
for double clicks.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_iconbox_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_iconbox_test.c  5 Sep 2005 14:12:15 -0000       1.3
+++ ewl_iconbox_test.c  27 Sep 2005 04:20:16 -0000      1.4
@@ -3,13 +3,15 @@
 Ewl_Widget* ib;
 static Ewl_Widget* ewl_iconbox_button = NULL;
 
-void icon_click_cb(Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__, void 
*user_data __UNUSED__) {
-       printf("Icon clicked!\n");
+void icon_click_cb(Ewl_Widget *w __UNUSED__, void *ev_data, void *user_data 
__UNUSED__) {
+       Ewl_Event_Mouse_Down *ev = ev_data;
+       if (ev->clicks > 1)
+               printf("Icon clicked!\n");
 }
 
 void add_icons_cb(Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__, void 
*user_data __UNUSED__) {
                Ewl_IconBox_Icon* icon = ewl_iconbox_icon_add(EWL_ICONBOX(ib), 
"Draw", "../../data/images/Draw.png");
-               ewl_callback_prepend(EWL_WIDGET(icon), 
EWL_CALLBACK_DOUBLE_CLICKED, icon_click_cb, NULL);
+               ewl_callback_prepend(EWL_WIDGET(icon), EWL_CALLBACK_CLICKED, 
icon_click_cb, NULL);
                
                ewl_iconbox_icon_arrange(EWL_ICONBOX(ib));
 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to