Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_embed.c
Log Message:
- make the space char work in the embed entry
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewl_embed.c 14 Oct 2004 02:03:38 -0000 1.49
+++ ewl_embed.c 14 Oct 2004 18:35:51 -0000 1.50
@@ -1148,8 +1148,12 @@
ewl_ev_set_modifiers(key_modifiers);
- /* need to upper case the keyname */
- if (key_modifiers & EWL_KEY_MODIFIER_SHIFT)
+ /* fixup the space char */
+ if (!strncmp(keyname, "space", 5)) {
+ free(keyname);
+ keyname = strdup(" ");
+
+ } else if (key_modifiers & EWL_KEY_MODIFIER_SHIFT)
strupper(keyname);
ewl_embed_key_down_feed(embed, keyname, ewl_ev_get_modifiers());
@@ -1186,8 +1190,12 @@
ewl_ev_set_modifiers(key_modifiers);
- /* need to upper case the keyname */
- if (key_modifiers & EWL_KEY_MODIFIER_SHIFT)
+ /* fixup the space char */
+ if (!strncmp(keyname, "space", 5)) {
+ free(keyname);
+ keyname = strdup(" ");
+
+ } else if (key_modifiers & EWL_KEY_MODIFIER_SHIFT)
strupper(keyname);
ewl_embed_key_up_feed(embed, keyname, ewl_ev_get_modifiers());
@@ -1196,6 +1204,9 @@
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
+/**
+ * Uppercase the given string
+ */
static void
strupper(char *str)
{
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs