summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/fbdesk/files/fbdesk-1.1.5-gcc34.patch')
-rw-r--r--x11-misc/fbdesk/files/fbdesk-1.1.5-gcc34.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/x11-misc/fbdesk/files/fbdesk-1.1.5-gcc34.patch b/x11-misc/fbdesk/files/fbdesk-1.1.5-gcc34.patch
new file mode 100644
index 000000000000..b2b6e314859a
--- /dev/null
+++ b/x11-misc/fbdesk/files/fbdesk-1.1.5-gcc34.patch
@@ -0,0 +1,83 @@
+diff -Naur fbdesk-1.1.5.orig/src/Resource.hh fbdesk-1.1.5/src/Resource.hh
+--- fbdesk-1.1.5.orig/src/Resource.hh 2003-01-14 22:45:53.000000000 +0100
++++ fbdesk-1.1.5/src/Resource.hh 2004-07-17 11:31:57.000000000 +0200
+@@ -56,40 +56,8 @@
+ std::string m_altname; ///< alternative name
+ };
+
+-class ResourceManager;
+-
+-/**
+- Real resource class
+-*/
+ template <typename T>
+-class Resource:public Resource_base
+-{
+-public:
+- Resource(ResourceManager &rm, T val,
+- const std::string &name, const std::string &altname):
+- Resource_base(name, altname),
+- m_value(val), m_defaultval(val),
+- m_rm(rm)
+- {
+- m_rm.addResource(*this); // add this to resource handler
+- }
+- virtual ~Resource() {
+- m_rm.removeResource(*this); // remove this from resource handler
+- }
+-
+- inline void setDefaultValue() { m_value = m_defaultval; }
+- void setFromString(const char *strval);
+- inline Resource<T>& operator = (const T& newvalue) { m_value = newvalue; return *this;}
+-
+- std::string getString();
+- inline T& operator*() { return m_value; }
+- inline const T& operator*() const { return m_value; }
+- inline T *operator->() { return &m_value; }
+- inline const T *operator->() const { return &m_value; }
+-private:
+- T m_value, m_defaultval;
+- ResourceManager &m_rm;
+-};
++class Resource;
+
+ class ResourceManager
+ {
+@@ -129,4 +97,37 @@
+ ResourceList m_resourcelist;
+ };
+
++/**
++ Real resource class
++*/
++template <typename T>
++class Resource:public Resource_base
++{
++public:
++ Resource(ResourceManager &rm, T val,
++ const std::string &name, const std::string &altname):
++ Resource_base(name, altname),
++ m_value(val), m_defaultval(val),
++ m_rm(rm)
++ {
++ m_rm.addResource(*this); // add this to resource handler
++ }
++ virtual ~Resource() {
++ m_rm.removeResource(*this); // remove this from resource handler
++ }
++
++ inline void setDefaultValue() { m_value = m_defaultval; }
++ void setFromString(const char *strval);
++ inline Resource<T>& operator = (const T& newvalue) { m_value = newvalue; return *this;}
++
++ std::string getString();
++ inline T& operator*() { return m_value; }
++ inline const T& operator*() const { return m_value; }
++ inline T *operator->() { return &m_value; }
++ inline const T *operator->() const { return &m_value; }
++private:
++ T m_value, m_defaultval;
++ ResourceManager &m_rm;
++};
++
+ #endif //_RESOURCE_HH_