~dyams/unity-2d/remove-glow

« back to all changes in this revision

Viewing changes to libunity-2d-private/Unity2d/plugin.cpp

  • Committer: Tarmac
  • Author(s): Michał Sawicz, Albert Astals
  • Date: 2012-02-07 11:29:36 UTC
  • mfrom: (879.11.17 refactor-screeninfo)
  • Revision ID: tarmac-20120207112936-r1iya0418z3d7evn
This, in itself, will not change anything in unity-2d, but will later allow for easier multi-monitor implementation.. Fixes: . Approved by Gerry Boland.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "windowinfo.h"
37
37
#include "windowslist.h"
38
38
#include "screeninfo.h"
 
39
#include "desktopinfo.h"
39
40
#include "plugin.h"
40
41
#include "cacheeffect.h"
41
42
#include "iconutilities.h"
100
101
 
101
102
    qmlRegisterType<WindowInfo>(uri, 0, 1, "WindowInfo");
102
103
    qmlRegisterType<WindowsList>(uri, 0, 1, "WindowsList");
103
 
    qmlRegisterType<ScreenInfo>(); // Register the type as non creatable
 
104
    qmlRegisterType<ScreenInfo>(uri, 0, 1, "ScreenInfo");
 
105
    qmlRegisterType<DesktopInfo>(); // Register the type as non creatable
104
106
    qmlRegisterType<WorkspacesInfo>(); // Register the type as non creatable
105
107
 
106
108
    qmlRegisterType<CacheEffect>(uri, 0, 1, "CacheEffect");
173
175
 
174
176
    /* ScreenInfo is exposed as a context property as it's a singleton and therefore
175
177
       not creatable directly in QML */
176
 
    engine->rootContext()->setContextProperty("screen", ScreenInfo::instance());
 
178
    engine->rootContext()->setContextProperty("desktop", DesktopInfo::instance());
177
179
    engine->rootContext()->setContextProperty("iconUtilities", new IconUtilities(engine));
178
180
 
179
181
    /* Expose QConf objects as a context property not to initialize it multiple times */