Browse Source

- use INPUT_MAXLENGTH_PASSWD for passwd (was _NAME)
- fix compilation warnings


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/slim/trunk@153 7c53e7cc-98ea-0310-8f1f-a0b24da60408

winkj 13 years ago
parent
commit
4fa52b8383
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panel.cpp

+ 3 - 3
panel.cpp

@@ -242,7 +242,7 @@ unsigned long Panel::GetColor(const char* colorname) {
 void Panel::Cursor(int visible) {
     const char* text;
     int xx, yy, y2, cheight;
-    char* txth = "Wj"; // used to get cursor height
+    const char* txth = "Wj"; // used to get cursor height
 
     switch(field) {
         case Get_Passwd:
@@ -431,7 +431,7 @@ bool Panel::OnKeyPress(XEvent& event) {
                         break;
                     case GET_PASSWD:
                         formerString=HiddenPasswdBuffer;
-                        if (PasswdBuffer.length() < INPUT_MAXLENGTH_NAME-1){
+                        if (PasswdBuffer.length() < INPUT_MAXLENGTH_PASSWD-1){
                             PasswdBuffer.append(&ascii,1);
                             HiddenPasswdBuffer.append("*");
                         };
@@ -460,7 +460,7 @@ bool Panel::OnKeyPress(XEvent& event) {
     }
 
     if (!formerString.empty()){
-        char* txth = "Wj"; // get proper maximum height ?
+        const char* txth = "Wj"; // get proper maximum height ?
         XftTextExtents8(Dpy, font, reinterpret_cast<const XftChar8*>(txth), strlen(txth), &extents);
         int maxHeight = extents.height;