]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/utils/var_text.hpp
* modules/gui/skins2/*: The second template argument of the Subject and
[vlc] / modules / gui / skins2 / utils / var_text.hpp
index ad74c0dcd642904fdabb3b86e20bf7283b2b4df8..b0c141969762f8ba5adea0e674d257b382c21cbf 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef VAR_TEXT_HPP
@@ -32,7 +32,7 @@
 
 
 /// String variable
-class VarText: public Variable, public Subject<VarText, void*>,
+class VarText: public Variable, public Subject<VarText>,
                public Observer<VarPercent, void*>,
                public Observer< VarText,void*>
 {
@@ -49,10 +49,13 @@ class VarText: public Variable, public Subject<VarText, void*>,
         virtual const UString get() const;
 
         /// Methods called when an observed variable is modified
-        virtual void onUpdate( Subject<VarPercent, void*> &rVariable, void* );
-        virtual void onUpdate( Subject<VarText, void*> &rVariable, void* );
+        virtual void onUpdate( Subject<VarPercent> &rVariable, void* );
+        virtual void onUpdate( Subject<VarText> &rVariable, void* );
 
     private:
+        /// Stop observing other variables
+        void delObservers();
+
         /// Variable type
         static const string m_type;
         /// The text of the variable