~thalexander/unity/update-fsf-address

« back to all changes in this revision

Viewing changes to shutdown/SessionButton.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:
21
21
#include "SessionButton.h"
22
22
 
23
23
#include <Nux/VLayout.h>
24
 
#include <UnityCore/Variant.h>
25
24
#include <glib/gi18n-lib.h>
26
25
 
27
26
namespace unity
125
124
  return "SessionButton";
126
125
}
127
126
 
128
 
void Button::AddProperties(GVariantBuilder* builder)
 
127
void Button::AddProperties(debug::IntrospectionData& introspection)
129
128
{
130
 
  unity::variant::BuilderWrapper(builder)
 
129
  introspection
131
130
    .add("highlighted", highlighted())
132
131
    .add("label", label())
133
132
    .add("label_color", label_view_->GetTextColor())