Enlightenment CVS committal Author : titan Project : e17 Module : proto
Dir : e17/proto/empower/src/bin/ewl Modified Files: Empower.h empower.c empower_gui_ewl.c Log Message: Ok this is much better. Whoever set this up was going through a ton of trouble to get the username so you can say "User's password" when its not the user's password you need, its the root. =================================================================== RCS file: /cvs/e/e17/proto/empower/src/bin/ewl/Empower.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Empower.h 7 Sep 2006 13:43:15 -0000 1.3 +++ Empower.h 7 Sep 2006 17:22:48 -0000 1.4 @@ -11,12 +11,10 @@ #define WIDTH 200 #define HEIGHT 85 -char buf[1024]; Ewl_Widget *win; char password[1024]; +char buf[1024]; int xpos, ypos; -uid_t userID; //holds the userID -struct passwd* userinfo; //holds the user info /* empower_cb prototypes */ void key_down_cb(Ewl_Widget *w, void *event, void *data); =================================================================== RCS file: /cvs/e/e17/proto/empower/src/bin/ewl/empower.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- empower.c 5 Apr 2006 16:14:18 -0000 1.2 +++ empower.c 7 Sep 2006 17:22:49 -0000 1.3 @@ -32,9 +32,6 @@ return 1; } - userID = getuid(); - userinfo = getpwuid(userID); //get users info - display_window(argc, argv); return 0; =================================================================== RCS file: /cvs/e/e17/proto/empower/src/bin/ewl/empower_gui_ewl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- empower_gui_ewl.c 7 Sep 2006 13:56:37 -0000 1.6 +++ empower_gui_ewl.c 7 Sep 2006 17:22:49 -0000 1.7 @@ -51,14 +51,10 @@ ewl_container_child_append(EWL_CONTAINER(win), vbox); ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); ewl_widget_show(vbox); - - char user[256]; - - snprintf(user, 256, "%s's password:", userinfo->pw_name); - //strcat(user, userinfo->pw_name); hbox = ewl_hbox_new(); ewl_container_child_append(EWL_CONTAINER(vbox), hbox); + ewl_object_alignment_set(EWL_OBJECT(hbox), EWL_FLAG_ALIGN_CENTER); ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_SHRINK); ewl_widget_show(hbox); @@ -72,10 +68,10 @@ progtext = ewl_text_new(); ewl_container_child_append(EWL_CONTAINER(hbox), progtext); ewl_text_font_size_set(EWL_TEXT(progtext), 14); - ewl_object_padding_set(EWL_OBJECT(progtext),10,0,3,3); + ewl_object_alignment_set(EWL_OBJECT(progtext), EWL_FLAG_ALIGN_CENTER); ewl_object_minimum_size_set(EWL_OBJECT(progtext), 75, 20); ewl_object_maximum_size_set(EWL_OBJECT(progtext), 125, 20); - ewl_text_text_set(EWL_TEXT(progtext), user); + ewl_text_text_set(EWL_TEXT(progtext), "Root's Password"); ewl_widget_show(progtext); entry = ewl_password_new(); ------------------------------------------------------------------------- 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