Revert "[3.0] Use the input style changed signal to update the gui." 11/97811/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 05:18:16 +0000 (14:18 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 05:18:20 +0000 (14:18 +0900)
This reverts commit 557de64999d33e551830812eb7e94f7ef25870e9.

Change-Id: I673695a0242770197fedbc9646f1c6916c207b72

examples/text-editor/text-editor-example.cpp

index d2a05d7..eb83eec 100644 (file)
@@ -62,6 +62,7 @@ const unsigned int NUMBER_OF_COLORS = sizeof( COLORS ) / sizeof( Vector4 );
 class TextEditorExample : public ConnectionTracker
 {
 public:
+
   TextEditorExample( Application& application )
   : mApplication( application )
   {
@@ -151,8 +152,6 @@ public:
                          "Asšúm sapěret usu ůť.\n"
                          "Síť ut apeirián laboramúš percipitur, sůas hařum ín éos?\n" );
 
-    mEditor.InputStyleChangedSignal().Connect( this, &TextEditorExample::OnTextInputStyleChanged );
-
     contents.Add( mEditor );
   }
 
@@ -223,36 +222,18 @@ public:
   {
     const std::string& name = button.GetName();
 
-    Vector4 color;
     if( "color" == name.substr( 0u, 5u ) )
     {
       const unsigned int index = strtoul( name.substr( 5u, 1u ).c_str(), NULL, 10u );
-      color = COLORS[index];
-      mEditor.SetProperty( TextEditor::Property::INPUT_COLOR, color );
+      mEditor.SetProperty( TextEditor::Property::INPUT_COLOR, COLORS[index] );
     }
 
-    mColorButtonOption.SetProperty( Button::Property::UNSELECTED_COLOR, color );
-    mColorButtonOption.SetProperty( Button::Property::SELECTED_COLOR, color );
-
     mButtonContainer.SetVisible( false );
     mButtonContainer.SetSensitive( false );
 
     return true;
   }
 
-  void OnTextInputStyleChanged( TextEditor editor, TextEditor::InputStyle::Mask mask )
-  {
-    if( TextEditor::InputStyle::NONE != static_cast<TextEditor::InputStyle::Mask>( mask & TextEditor::InputStyle::COLOR ) )
-    {
-      const Vector4 color = editor.GetProperty( TextEditor::Property::INPUT_COLOR ).Get<Vector4>();
-
-      mColorButtonOption.SetProperty( Button::Property::UNSELECTED_COLOR, color );
-      mColorButtonOption.SetProperty( Button::Property::SELECTED_COLOR, color );
-    }
-
-    editor.Reset();
-  }
-
 private:
 
   Application& mApplication;