Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/password
Modified Files:
ewl_password_test.c
Log Message:
add test for utf8 character and "none-character" as obscure character
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/password/ewl_password_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_password_test.c 4 Apr 2008 00:25:49 -0000 1.4
+++ ewl_password_test.c 6 Apr 2008 00:02:43 -0000 1.5
@@ -27,7 +27,7 @@
static int
create_test(Ewl_Container *box)
{
- Ewl_Widget *button_hbox, *button[2];
+ Ewl_Widget *button_hbox, *button[3];
password[0] = ewl_password_new();
ewl_text_text_set(EWL_TEXT(password[0]), "Play with me ?");
@@ -40,6 +40,7 @@
ewl_widget_show(password[0]);
password[1] = ewl_password_new();
+ ewl_text_obscure_set(EWL_TEXT(password[1]), "â¢");
ewl_text_color_set(EWL_TEXT(password[1]), 255, 0, 0, 255);
ewl_text_text_append(EWL_TEXT(password[1]), "E W L ! ! !");
ewl_object_padding_set(EWL_OBJECT(password[1]), 5, 5, 0, 0);
@@ -50,6 +51,17 @@
EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK);
ewl_widget_show(password[1]);
+ password[2] = ewl_password_new();
+ ewl_text_obscure_set(EWL_TEXT(password[2]), "");
+ ewl_text_text_append(EWL_TEXT(password[2]), "hidden text");
+ ewl_object_padding_set(EWL_OBJECT(password[2]), 5, 5, 0, 0);
+ ewl_container_child_append(box, password[2]);
+ ewl_callback_append(password[2], EWL_CALLBACK_VALUE_CHANGED,
+ cb_fetch_password_text, NULL);
+ ewl_object_fill_policy_set(EWL_OBJECT(password[2]),
+ EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK);
+ ewl_widget_show(password[2]);
+
button_hbox = ewl_hbox_new();
ewl_object_fill_policy_set(EWL_OBJECT(button_hbox),
EWL_FLAG_FILL_VFILL);
ewl_object_alignment_set(EWL_OBJECT(button_hbox),
EWL_FLAG_ALIGN_CENTER);
@@ -91,6 +103,10 @@
s = ewl_text_text_get(EWL_TEXT(password[1]));
printf("Second password covers: %s\n", s);
free(s);
+
+ s = ewl_text_text_get(EWL_TEXT(password[2]));
+ printf("Third password covers: %s\n", s);
+ free(s);
}
static void
@@ -99,5 +115,6 @@
{
ewl_text_text_set(EWL_TEXT(password[0]), "Play with me ?");
ewl_text_text_set(EWL_TEXT(password[1]), "E W L ! ! !");
+ ewl_text_text_set(EWL_TEXT(password[2]), "hidden text");
}
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs