Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_entry.c 


Log Message:
Don't accept drops on disabled or non-editable entries.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_entry.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- ewl_entry.c 8 Sep 2006 18:56:40 -0000       1.66
+++ ewl_entry.c 8 Sep 2006 20:45:48 -0000       1.67
@@ -35,7 +35,7 @@
 int
 ewl_entry_init(Ewl_Entry *e)
 {
-       const char *text_types[] = { "UTF8_STRING", "text/plain", NULL };
+       const char *text_types[] = { "text/plain", NULL };
        Ewl_Widget *w;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -542,9 +542,12 @@
        event = ev;
        txt = EWL_TEXT(w);
 
-       ewl_widget_focus_send(w);
-       ewl_text_cursor_position_set(txt, 
-                       ewl_text_coord_index_map(txt, event->x, event->y));
+       if (EWL_ENTRY(w)->editable && !DISABLED(w)) {
+               ewl_widget_focus_send(w);
+               ewl_text_cursor_position_set(txt, 
+                               ewl_text_coord_index_map(txt, event->x,
+                                       event->y));
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -570,8 +573,11 @@
 
        event = ev;
        txt = EWL_TEXT(w);
-       ewl_text_text_insert(txt, event->data, 
-                               ewl_text_cursor_position_get(txt));
+
+       if (EWL_ENTRY(w)->editable && !DISABLED(w)) {
+               ewl_text_text_insert(txt, event->data, 
+                                       ewl_text_cursor_position_get(txt));
+       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }



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