Browse Source

removed std namespace from header

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/slim/trunk@161 7c53e7cc-98ea-0310-8f1f-a0b24da60408
sip 15 years ago
parent
commit
0fb49906e9
3 changed files with 29 additions and 29 deletions
  1. 2 0
      app.cpp
  2. 12 14
      cfg.h
  3. 15 15
      panel.h

+ 2 - 0
app.cpp

@@ -30,6 +30,8 @@
 #include <shadow.h>
 #endif
 
+using namespace std;
+
 #ifdef USE_PAM
 #include <string>
 

+ 12 - 14
cfg.h

@@ -22,35 +22,33 @@
 #define THEMESDIR PKGDATADIR"/themes"
 #define THEMESFILE "/slim.theme"
 
-using namespace std;
-
 class Cfg {
 
 public:
     Cfg();
     ~Cfg();
-    bool readConf(string configfile);
-    string parseOption(string line, string option);
-    const string& getError() const;
-    string& getOption(string option);
-    string getWelcomeMessage();
+    bool readConf(std::string configfile);
+    std::string parseOption(std::string line, std::string option);
+    const std::string& getError() const;
+    std::string& getOption(std::string option);
+    std::string getWelcomeMessage();
 
-    static int absolutepos(const string& position, int max, int width);
+    static int absolutepos(const std::string& position, int max, int width);
     static int string2int(const char* string, bool* ok = 0);
-    static void split(vector<string>& v, const string& str, 
+    static void split(std::vector<std::string>& v, const std::string& str, 
                       char c, bool useEmpty=true);
-    static string Trim(const string& s);
+    static std::string Trim(const std::string& s);
 
-    string nextSession(string current);
+    std::string nextSession(std::string current);
 
 private:
     void fillSessionList();
 
 private:
-    map<string,string> options;
-    vector<string> sessions;
+    std::map<std::string,std::string> options;
+    std::vector<std::string> sessions;
     int currentSession;
-    string error;
+    std::string error;
 
 };
 

+ 15 - 15
panel.h

@@ -49,23 +49,23 @@ public:
 
 
     Panel(Display* dpy, int scr, Window root, Cfg* config,
-          const string& themed);
+          const std::string& themed);
     ~Panel();
     void OpenPanel();
     void ClosePanel();
     void ClearPanel();
-    void Message(const string& text);
-    void Error(const string& text);
+    void Message(const std::string& text);
+    void Error(const std::string& text);
     void EventHandler(const FieldType& curfield);
-    string getSession();
+    std::string getSession();
     ActionType getAction(void) const;
 
     void Reset(void);
     void ResetName(void);
     void ResetPasswd(void);
-    void SetName(const string& name);
-    const string& GetName(void) const;
-    const string& GetPasswd(void) const;
+    void SetName(const std::string& name);
+    const std::string& GetName(void) const;
+    const std::string& GetPasswd(void) const;
 private:
     Panel();
     void Cursor(int visible);
@@ -77,7 +77,7 @@ private:
     void ShowSession();
 
     void SlimDrawString8(XftDraw *d, XftColor *color, XftFont *font,
-                            int x, int y, const string& str,
+                            int x, int y, const std::string& str,
                             XftColor* shadowColor,
                             int xOffset, int yOffset);
 
@@ -111,9 +111,9 @@ private:
     FieldType field;
     
     // Username/Password
-    string NameBuffer;
-    string PasswdBuffer;
-    string HiddenPasswdBuffer;
+    std::string NameBuffer;
+    std::string PasswdBuffer;
+    std::string HiddenPasswdBuffer;
 
     // Configuration
     int input_name_x;
@@ -137,8 +137,8 @@ private:
     int username_shadow_yoffset;
     int password_x;
     int password_y;
-    string welcome_message;
-    string intro_message;
+    std::string welcome_message;
+    std::string intro_message;
 
     // Pixmap data
     Pixmap PanelPixmap;
@@ -147,10 +147,10 @@ private:
 
     // For thesting themes
     bool testing;
-    string themedir;
+    std::string themedir;
 
     // Session handling
-    string session;
+    std::string session;
 
 };