on xenial help sign in
Add a disclaimer in the fake applications plugin.
commita3429de77bccd641277fc7f81864c501f9a0fda8 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 1 Aug 2013, 10:49 (13 years ago) parent01c86a5
3 files changed+20
Components/ApplicationManagerWrapper.qml+2 Shell.qml+14 tests/mocks/Ubuntu/Application/ApplicationManager.h+4
Components/ApplicationManagerWrapper.qml+2
@@ -29,6 +29,8 @@ Item {
2929 property bool keyboardVisible: ApplicationManager.keyboardVisible
3030 property int keyboardHeight: ApplicationManager.keyboardHeight
3131
32+ property bool fake: ApplicationManager.fake
33+
3234 Component.onCompleted: {
3335 // Start the watcher so that the ApplicationManager applications model can be populated.
3436 ApplicationManager.startWatcher();
Shell.qml+14
@@ -647,4 +647,18 @@ FocusScope {
647647
648648 enabled: shell.applicationManager && shell.applicationManager.keyboardVisible
649649 }
650+
651+ Label {
652+ anchors.fill: parent
653+ visible: applicationManager.fake
654+ text: "EARLY ALPHA\nNOT READY FOR USE"
655+ color: "lightgrey"
656+ opacity: 0.2
657+ font.weight: Font.Black
658+ horizontalAlignment: Text.AlignHCenter
659+ verticalAlignment: Text.AlignVCenter
660+ fontSizeMode: Text.Fit
661+ font.pixelSize: height/2
662+ rotation: -45
663+ }
650664}
tests/mocks/Ubuntu/Application/ApplicationManager.h+4
@@ -46,6 +46,8 @@ class ApplicationManager : public QObject {
4646 Q_PROPERTY(ApplicationInfo* sideStageFocusedApplication READ sideStageFocusedApplication
4747 NOTIFY sideStageFocusedApplicationChanged)
4848
49+ Q_PROPERTY(bool fake READ fake CONSTANT)
50+
4951 public:
5052 ApplicationManager(QObject *parent = NULL);
5153 virtual ~ApplicationManager();
@@ -80,6 +82,8 @@ class ApplicationManager : public QObject {
8082 ApplicationInfo* mainStageFocusedApplication() const;
8183 ApplicationInfo* sideStageFocusedApplication() const;
8284
85+ bool fake() { return true; }
86+
8387 Q_INVOKABLE void focusApplication(int handle);
8488 Q_INVOKABLE void unfocusCurrentApplication(StageHint stageHint);
8589 Q_INVOKABLE ApplicationInfo* startProcess(QString desktopFile,