gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp ...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/edit_text_character.cpp ...
Date: Thu, 21 Sep 2006 10:18:37 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/09/21 10:18:37

Modified files:
        .              : ChangeLog 
        server         : edit_text_character.cpp edit_text_character.h 
        server/parser  : edit_text_character_def.cpp 
                         edit_text_character_def.h 

Log message:
        get_default_name() => get_variable_name(), moved warning about missing 
VariableName support closer to where we should implement it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.891&r2=1.892
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/edit_text_character_def.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/edit_text_character_def.h?cvsroot=gnash&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.891
retrieving revision 1.892
diff -u -b -r1.891 -r1.892
--- ChangeLog   21 Sep 2006 09:44:26 -0000      1.891
+++ ChangeLog   21 Sep 2006 10:18:37 -0000      1.892
@@ -1,3 +1,12 @@
+2006-09-21 Sandro Santilli  <address@hidden>
+
+       * server/edit_text_character.cpp, server/edit_text_character.h,
+         server/parser/edit_text_character_def.cpp,
+         server/parser/edit_text_character_def.h:
+         get_default_name() => get_variable_name(), moved
+         warning about missing VariableName support closer to where
+         we should implement it.
+
 2006-09-21 Udo Giacomozzi <address@hidden>
 
        * server/shape.cpp (edge::tesselate_curve): don't add curves

Index: server/edit_text_character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- server/edit_text_character.cpp      27 Aug 2006 18:30:38 -0000      1.11
+++ server/edit_text_character.cpp      21 Sep 2006 10:18:37 -0000      1.12
@@ -30,6 +30,15 @@
        assert(parent);
        assert(m_def);
 
+       if ( m_def->get_variable_name() != "" )
+       {
+               // we should add a character to the parent
+               // which would act as a proxy for our 'text'
+               // member ( ie: get_text_value() and set_text_value()
+               // would set our 'text' member )
+               log_warning("EditTextCharacter VariableName support broken");
+       }
+
        // WARNING! remember to set the font *before* setting text value!
        set_font( m_def->get_font() );
 

Index: server/edit_text_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- server/edit_text_character.h        26 Aug 2006 02:08:31 -0000      1.9
+++ server/edit_text_character.h        21 Sep 2006 10:18:37 -0000      1.10
@@ -73,9 +73,9 @@
        virtual bool on_event(event_id id);     
        virtual movie_root *get_root();
 
-       virtual const char* get_text_name() const
+       virtual const char* get_variable_name() const
        {
-               return m_def->get_default_name().c_str();
+               return m_def->get_variable_name().c_str();
        }
 
        /// Set our text to the given string.

Index: server/parser/edit_text_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/edit_text_character_def.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/parser/edit_text_character_def.cpp   21 Sep 2006 09:26:54 -0000      
1.5
+++ server/parser/edit_text_character_def.cpp   21 Sep 2006 10:18:37 -0000      
1.6
@@ -73,7 +73,7 @@
                m_leading = in->read_s16();
        }
 
-       in->read_string(m_default_name);
+       in->read_string(m_variable_name);
 
        if (has_text)
        {
@@ -82,11 +82,11 @@
 
        IF_VERBOSE_PARSE (
                log_parse("edit_text_char:\n"
-                       " default varname = %s\n"
+                       " varname = %s\n"
                        " text = ``%s''\n"
                        " font_id: %d\n"
                        " text_height: %d",
-                       m_default_name.c_str(),
+                       m_variable_name.c_str(),
                        m_default_text.c_str(),
                        m_font_id,
                        m_text_height);
@@ -120,7 +120,7 @@
        // This gives an "instance name" to the TextField, but
        // it is not really what we need.
        //
-       // First of all the VariableName ("m_default_name") is
+       // First of all the VariableName ("m_variable_name") is
        // NOT the default name of an instance, rather it is
        // a variable associated with it and can contain path
        // information (ie. we can associate a variable in a different
@@ -136,9 +136,7 @@
        // (in particular it shows a case in which VariableName is
        // outside of TextField timeline/scope)
        //
-       if ( m_default_name != "" )
-               log_warning("EditTextCharacter VariableName support broken");
-       ch->set_name(m_default_name.c_str());
+       //ch->set_name(m_variable_name.c_str());
 
        return ch;
 }

Index: server/parser/edit_text_character_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/edit_text_character_def.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/parser/edit_text_character_def.h     20 Sep 2006 14:18:50 -0000      
1.3
+++ server/parser/edit_text_character_def.h     21 Sep 2006 10:18:37 -0000      
1.4
@@ -123,10 +123,13 @@
                return m_default_text;
        }
 
-       /// Return a reference to the default name for
-       /// instances of this EditText definition. (?)
-       const std::string& get_default_name() const {
-               return m_default_name;
+       /// Return a reference to the "VariableName" associated
+       /// with this EditText definition. The variable name
+       /// is allowed to contain path information and should
+       /// be used to provide an 'alias' to the 'text' member
+       /// of instances.
+       const std::string& get_variable_name() const {
+               return m_variable_name;
        }
 
        /// \brief
@@ -218,7 +221,7 @@
        movie_definition*       m_root_def;
 
        rect                    m_rect;
-       std::string             m_default_name;
+       std::string             m_variable_name;
        text_format             m_format;
        bool                    m_word_wrap;
        bool                    m_multiline;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]