updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / slim-nopasswdchar / slim-nopasswdchar.patch
blobaec439eb64cd206c1c030b0fca1fdf52d81302bd
1 diff -rup ../slim-1.3.1.orig/panel.cpp ./panel.cpp
2 --- ../slim-1.3.1.orig/panel.cpp 2008-09-26 02:54:15.000000000 +0200
3 +++ ./panel.cpp 2010-06-25 10:49:16.571460443 +0200
4 @@ -252,7 +252,7 @@ void Panel::Cursor(int visible) {
6 switch(field) {
7 case Get_Passwd:
8 - text = HiddenPasswdBuffer.c_str();
9 + text = "";
10 xx = input_pass_x;
11 yy = input_pass_y;
12 break;
13 @@ -314,7 +314,7 @@ void Panel::OnExpose(void) {
14 &inputshadowcolor,
15 inputShadowXOffset, inputShadowYOffset);
16 SlimDrawString8 (draw, &inputcolor, font, input_pass_x, input_pass_y,
17 - HiddenPasswdBuffer,
18 + "",
19 &inputshadowcolor,
20 inputShadowXOffset, inputShadowYOffset);
21 } else { //single input mode
22 @@ -322,7 +322,7 @@ void Panel::OnExpose(void) {
23 case Get_Passwd:
24 SlimDrawString8 (draw, &inputcolor, font,
25 input_pass_x, input_pass_y,
26 - HiddenPasswdBuffer,
27 + "",
28 &inputshadowcolor,
29 inputShadowXOffset, inputShadowYOffset);
30 break;
31 @@ -399,9 +399,8 @@ bool Panel::OnKeyPress(XEvent& event) {
32 break;
33 case GET_PASSWD:
34 if (! PasswdBuffer.empty()){
35 - formerString=HiddenPasswdBuffer;
36 + formerString="";
37 PasswdBuffer.erase(--PasswdBuffer.end());
38 - HiddenPasswdBuffer.erase(--HiddenPasswdBuffer.end());
40 break;
42 @@ -412,8 +411,7 @@ bool Panel::OnKeyPress(XEvent& event) {
43 if (reinterpret_cast<XKeyEvent&>(event).state & ControlMask) {
44 switch(field) {
45 case Get_Passwd:
46 - formerString = HiddenPasswdBuffer;
47 - HiddenPasswdBuffer.clear();
48 + formerString = "";
49 PasswdBuffer.clear();
50 break;
52 @@ -436,10 +434,9 @@ bool Panel::OnKeyPress(XEvent& event) {
54 break;
55 case GET_PASSWD:
56 - formerString=HiddenPasswdBuffer;
57 + formerString="";
58 if (PasswdBuffer.length() < INPUT_MAXLENGTH_PASSWD-1){
59 PasswdBuffer.append(&ascii,1);
60 - HiddenPasswdBuffer.append("*");
62 break;
64 @@ -459,7 +456,7 @@ bool Panel::OnKeyPress(XEvent& event) {
65 break;
67 case Get_Passwd:
68 - text = HiddenPasswdBuffer;
69 + text = "";
70 xx = input_pass_x;
71 yy = input_pass_y;
72 break;
73 @@ -630,7 +627,6 @@ void Panel::ResetName(void){
75 void Panel::ResetPasswd(void){
76 PasswdBuffer.clear();
77 - HiddenPasswdBuffer.clear();
80 void Panel::SetName(const string& name){
81 diff -rup ../slim-1.3.1.orig/panel.h ./panel.h
82 --- ../slim-1.3.1.orig/panel.h 2008-09-26 02:54:15.000000000 +0200
83 +++ ./panel.h 2010-06-25 10:49:39.104791441 +0200
84 @@ -113,7 +113,6 @@ private:
85 // Username/Password
86 std::string NameBuffer;
87 std::string PasswdBuffer;
88 - std::string HiddenPasswdBuffer;
90 // Configuration
91 int input_name_x;