Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin/tests/password


Modified Files:
        ewl_password_test.c 


Log Message:
- change tabs to spaces (Ewl uses 8 space indent now instead of a tab)

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/password/ewl_password_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_password_test.c 6 Apr 2008 00:02:43 -0000       1.5
+++ ewl_password_test.c 6 May 2008 20:18:55 -0000       1.6
@@ -1,4 +1,4 @@
-/* vim: set sw=8 ts=8 sts=8 noexpandtab: */
+/* vim: set sw=8 ts=8 sts=8 expandtab: */
 #include "Ewl_Test.h"
 #include "ewl_test_private.h"
 #include "ewl_button.h"
@@ -16,105 +16,105 @@
 void
 test_info(Ewl_Test *test)
 {
-       test->name = "Password";
-       test->tip = "Defines the Ewl_Password class to allow\n"
-                       "for single line obscured text.";
-       test->filename = __FILE__;
-       test->func = create_test;
-       test->type = EWL_TEST_TYPE_SIMPLE;
+        test->name = "Password";
+        test->tip = "Defines the Ewl_Password class to allow\n"
+                       "for single line obscured text.";
+        test->filename = __FILE__;
+        test->func = create_test;
+        test->type = EWL_TEST_TYPE_SIMPLE;
 }
 
 static int
 create_test(Ewl_Container *box)
 {
-       Ewl_Widget *button_hbox, *button[3];
+        Ewl_Widget *button_hbox, *button[3];
 
-       password[0] = ewl_password_new();
-       ewl_text_text_set(EWL_TEXT(password[0]), "Play with me ?");
-       ewl_object_padding_set(EWL_OBJECT(password[0]), 5, 5, 5, 0);
-       ewl_container_child_append(box, password[0]);
-       ewl_callback_append(password[0], EWL_CALLBACK_VALUE_CHANGED,
-                           cb_fetch_password_text, NULL);
-       ewl_object_fill_policy_set(EWL_OBJECT(password[0]),
-                                  EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK);
-       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);
-       ewl_container_child_append(box, password[1]);
-       ewl_callback_append(password[1], EWL_CALLBACK_VALUE_CHANGED,
-                           cb_fetch_password_text, NULL);
-       ewl_object_fill_policy_set(EWL_OBJECT(password[1]),
-                                  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);
-       ewl_container_child_append(box, button_hbox);
-       ewl_box_spacing_set(EWL_BOX(button_hbox), 5);
-       ewl_widget_show(button_hbox);
-
-       button[0] = ewl_button_new();
-       ewl_button_label_set(EWL_BUTTON(button[0]), "Fetch text");
-       ewl_container_child_append(EWL_CONTAINER(button_hbox), button[0]);
-       ewl_callback_append(button[0], EWL_CALLBACK_CLICKED,
-                           cb_fetch_password_text, NULL);
-       ewl_object_fill_policy_set(EWL_OBJECT(button[0]), EWL_FLAG_FILL_NONE);
-       ewl_object_alignment_set(EWL_OBJECT(button[0]), EWL_FLAG_ALIGN_CENTER);
-       ewl_widget_show(button[0]);
-
-       button[1] = ewl_button_new();
-       ewl_button_label_set(EWL_BUTTON(button[1]), "Set Text");
-       ewl_container_child_append(EWL_CONTAINER(button_hbox), button[1]);
-       ewl_callback_append(button[1], EWL_CALLBACK_CLICKED,
-                           cb_set_password_text, NULL);
-       ewl_object_fill_policy_set(EWL_OBJECT(button[1]), EWL_FLAG_FILL_NONE);
-       ewl_object_alignment_set(EWL_OBJECT(button[1]), EWL_FLAG_ALIGN_CENTER);
-       ewl_widget_show(button[1]);
+        password[0] = ewl_password_new();
+        ewl_text_text_set(EWL_TEXT(password[0]), "Play with me ?");
+        ewl_object_padding_set(EWL_OBJECT(password[0]), 5, 5, 5, 0);
+        ewl_container_child_append(box, password[0]);
+        ewl_callback_append(password[0], EWL_CALLBACK_VALUE_CHANGED,
+                           cb_fetch_password_text, NULL);
+        ewl_object_fill_policy_set(EWL_OBJECT(password[0]),
+                                  EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK);
+        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);
+        ewl_container_child_append(box, password[1]);
+        ewl_callback_append(password[1], EWL_CALLBACK_VALUE_CHANGED,
+                           cb_fetch_password_text, NULL);
+        ewl_object_fill_policy_set(EWL_OBJECT(password[1]),
+                                  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);
+        ewl_container_child_append(box, button_hbox);
+        ewl_box_spacing_set(EWL_BOX(button_hbox), 5);
+        ewl_widget_show(button_hbox);
+
+        button[0] = ewl_button_new();
+        ewl_button_label_set(EWL_BUTTON(button[0]), "Fetch text");
+        ewl_container_child_append(EWL_CONTAINER(button_hbox), button[0]);
+        ewl_callback_append(button[0], EWL_CALLBACK_CLICKED,
+                           cb_fetch_password_text, NULL);
+        ewl_object_fill_policy_set(EWL_OBJECT(button[0]), EWL_FLAG_FILL_NONE);
+        ewl_object_alignment_set(EWL_OBJECT(button[0]), EWL_FLAG_ALIGN_CENTER);
+        ewl_widget_show(button[0]);
+
+        button[1] = ewl_button_new();
+        ewl_button_label_set(EWL_BUTTON(button[1]), "Set Text");
+        ewl_container_child_append(EWL_CONTAINER(button_hbox), button[1]);
+        ewl_callback_append(button[1], EWL_CALLBACK_CLICKED,
+                           cb_set_password_text, NULL);
+        ewl_object_fill_policy_set(EWL_OBJECT(button[1]), EWL_FLAG_FILL_NONE);
+        ewl_object_alignment_set(EWL_OBJECT(button[1]), EWL_FLAG_ALIGN_CENTER);
+        ewl_widget_show(button[1]);
 
-       return 1;
+        return 1;
 }
 
 static void
 cb_fetch_password_text(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__,
-                                               void *data __UNUSED__)
+                                               void *data __UNUSED__)
 {
-       char *s;
+        char *s;
 
-       s = ewl_text_text_get(EWL_TEXT(password[0]));
-       printf("First password covers: %s\n", s);
-       free(s);
-
-       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);
+        s = ewl_text_text_get(EWL_TEXT(password[0]));
+        printf("First password covers: %s\n", s);
+        free(s);
+
+        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
 cb_set_password_text(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__,
-                                               void *data __UNUSED__)
+                                               void *data __UNUSED__)
 {
-       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");
+        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 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
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

Reply via email to