~thalexander/unity/update-fsf-address

« back to all changes in this revision

Viewing changes to shutdown/SessionView.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:
22
22
 
23
23
#include <Nux/VLayout.h>
24
24
#include <UnityCore/GLibWrapper.h>
25
 
#include <UnityCore/Variant.h>
26
25
#include <glib/gi18n-lib.h>
27
26
 
28
27
namespace unity
327
326
  return "SessionView";
328
327
}
329
328
 
330
 
void View::AddProperties(GVariantBuilder* builder)
 
329
void View::AddProperties(debug::IntrospectionData& introspection)
331
330
{
332
 
  UnityWindowView::AddProperties(builder);
333
 
  variant::BuilderWrapper(builder)
 
331
  UnityWindowView::AddProperties(introspection);
 
332
  introspection
334
333
    .add("mode", static_cast<int>(mode()))
335
334
    .add("inhibitors", have_inhibitors())
336
335
    .add("title",title_->GetText())