removed unnecessary (now) destructors for defined GConfOptions
[simple-launcher] / gconf-wrapper.h
index a62fc56..a3e4518 100644 (file)
@@ -29,9 +29,10 @@ public:
 protected:
   GConfItem();  // I do not want to create instances of this class
 
-  static void validateClient();
+  static void allocateClient();
 
 protected:
+  // TODO: should I count the references and unref the client when the last user is gone??
   static GConfClient *ourClient;
 };
 
@@ -43,15 +44,15 @@ public:
 
   const std::string& path() const { return myKeyPath; }
 
-  static std::string mergePath(const std::string&, const std::string);
+  std::string merge(const std::string&) const;
 
 private:
-  std::string myKeyPath;
+  const std::string myKeyPath;
 };
 
 class GConfOption : public GConfItem {
 protected:
-  GConfOption(const GConfKey& key, const std::string& path): myIsSynchronized(false), myPath(GConfKey::mergePath(key.path(), path)) { }
+  GConfOption(const GConfKey& key, const std::string& path): myIsSynchronized(false), myPath(key.merge(path)) { }
 
   void setGConfValue(const GConfValue *);
   GConfValue *getGConfValue(GConfValueType) const;
@@ -65,7 +66,6 @@ protected:
 class GConfStringValue : public GConfOption {
 public:
   GConfStringValue(const GConfKey&, const std::string&, const std::string& = "");
- ~GConfStringValue();
 
   const std::string& value() const;
   const std::string& setValue(const std::string& newValue);
@@ -78,7 +78,6 @@ private:
 class GConfBooleanValue : public GConfOption {
 public:
   GConfBooleanValue(const GConfKey&, const std::string&, bool = false);
- ~GConfBooleanValue();
 
   bool value() const;
   bool setValue(bool newValue);
@@ -91,7 +90,6 @@ private:
 class GConfIntegerValue : public GConfOption {
 public:
   GConfIntegerValue(const GConfKey&, const std::string&, int = false);
- ~GConfIntegerValue();
 
   int value() const;
   int setValue(int newValue);