Hi all
I can't make the function etk_entry_clear() to work as expected:
the text wont be cleared correctly .The caret is placed correctly
but the text doesn't disappear.
and also:
etk_entry_text_set(entry,"");  and....
etk_entry_text_set(entry,NULL)
doesn't works

I have done a patch for etk_entry_test.c
that show this issue.

Is the error occur also on other system or is a problem of mine?
Thanks
Dave


Index: src/bin/etk_entry_test.c
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/bin/etk_entry_test.c,v
retrieving revision 1.11
diff -u -r1.11 etk_entry_test.c
--- src/bin/etk_entry_test.c	20 Oct 2006 17:51:44 -0000	1.11
+++ src/bin/etk_entry_test.c	7 Jan 2007 08:41:56 -0000
@@ -1,6 +1,7 @@
 #include "etk_test.h"
 
 static void _etk_test_entry_normal_print_cb(Etk_Object *object, void *data);
+static void _etk_test_entry_normal_clear_cb(Etk_Object *object, void *data);
 static void _etk_test_entry_password_show_cb(Etk_Object *object, void *data);
 
 static Etk_Widget *_label_normal = NULL;
@@ -45,7 +46,12 @@
    etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_entry_normal_print_cb), NULL);
    
    _label_normal = etk_label_new(NULL);
-   etk_table_attach(ETK_TABLE(table), _label_normal, 0, 1, 1, 1, 0, 0, ETK_TABLE_HEXPAND | ETK_TABLE_HFILL);
+   etk_table_attach(ETK_TABLE(table), _label_normal, 0, 0, 1, 1, 0, 0, ETK_TABLE_HEXPAND | ETK_TABLE_HFILL);
+   
+   button = etk_button_new_with_label("Clear");
+   etk_table_attach(ETK_TABLE(table), button, 1, 1, 1, 1, 0, 0, ETK_TABLE_NONE);
+   etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_entry_normal_clear_cb), NULL);
+ 
    
    separator = etk_hseparator_new();
    etk_box_append(ETK_BOX(vbox), separator, ETK_BOX_START, ETK_BOX_NONE, 6);
@@ -73,6 +79,15 @@
 static void _etk_test_entry_normal_print_cb(Etk_Object *object, void *data)
 {
    etk_label_set(ETK_LABEL(_label_normal), etk_entry_text_get(ETK_ENTRY(_entry_normal)));
+}
+
+/* Clear normal entry */
+static void _etk_test_entry_normal_clear_cb(Etk_Object *object, void *data)
+{
+   etk_entry_text_set(ETK_ENTRY(_entry_normal),"This is a bug (=");
+   //None of this two lines work
+   etk_entry_clear(ETK_ENTRY(_entry_normal));
+   etk_entry_text_set(ETK_ENTRY(_entry_normal),"");
 }
 
 /* Toggles the password mode of the password entry */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to