~thalexander/unity/update-fsf-address

« back to all changes in this revision

Viewing changes to shortcuts/ShortcutController.cpp

Introspectable: use IntrospectionData class for collecting data from children

Now each introspectable object is called with an IntrospectionData parameter and calling one
of its methods it's the only way to fill introspection data into unity.
As bonus point, remove all the unneeded UnityCore/Variant.cpp inclusions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
  return "ShortcutController";
256
256
}
257
257
 
258
 
void Controller::AddProperties(GVariantBuilder* builder)
 
258
void Controller::AddProperties(debug::IntrospectionData& introspection)
259
259
{
260
260
  bool animating = (fade_animator_.CurrentState() == na::Animation::State::Running);
261
261
 
262
 
  unity::variant::BuilderWrapper(builder)
 
262
  introspection
263
263
  .add("timeout_duration", SUPER_TAP_DURATION + FADE_DURATION)
264
264
  .add("enabled", IsEnabled())
265
265
  .add("about_to_show", (Visible() && animating && fade_animator_.GetFinishValue() == 1.0f))