~gerboland/unity8/initialSurfaceGeometry

« back to all changes in this revision

Viewing changes to qml/Shell.qml

  • Committer: Gerry Boland
  • Date: 2014-12-09 12:55:58 UTC
  • mfrom: (1139.1.343 unity8)
  • Revision ID: gerry.boland@canonical.com-20141209125558-d68labgupwxfz91r
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
import "Notifications"
38
38
import "Stages"
39
39
import "Panel/Indicators"
 
40
import "Wizard"
40
41
import Unity.Notifications 1.0 as NotificationBackend
41
42
import Unity.Session 0.1
42
43
import Unity.DashCommunicator 0.1
236
237
            onApplicationAdded: {
237
238
                if (greeter.shown && appId != "unity8-dash") {
238
239
                    greeter.startUnlock()
 
240
 
 
241
                    // If this happens on first boot, we may be in edge
 
242
                    // tutorial or wizard while receiving a call.  But a call
 
243
                    // is more important than wizard so just bail out of those.
 
244
                    if (edgeDemo.running) {
 
245
                        edgeDemo.hideEdgeDemos();
 
246
                        wizard.hide();
 
247
                    }
239
248
                }
240
249
                if (greeter.narrowMode && greeter.hasLockedApp && appId === greeter.lockedApp) {
241
250
                    lockscreen.hide() // show locked app
354
363
        minPinLength: 4
355
364
        maxPinLength: 4
356
365
 
 
366
        property string promptText
 
367
        infoText: promptText !== "" ? i18n.tr("Enter %1").arg(promptText) :
 
368
                  alphaNumeric ? i18n.tr("Enter passphrase") :
 
369
                                 i18n.tr("Enter passcode")
 
370
        errorText: promptText !== "" ? i18n.tr("Sorry, incorrect %1").arg(promptText) :
 
371
                   alphaNumeric ? i18n.tr("Sorry, incorrect passphrase") + "\n" +
 
372
                                  i18n.tr("Please re-enter") :
 
373
                                  i18n.tr("Sorry, incorrect passcode")
 
374
 
357
375
        // FIXME: We *should* show emergency dialer if there is a SIM present,
358
376
        // regardless of whether the side stage is enabled.  But right now,
359
377
        // the assumption is that narrow screens are phones which have SIMs
407
425
                return; // could happen if hideGreeter() comes in before we prompt
408
426
            }
409
427
            if (greeter.narrowMode) {
410
 
                if (isDefaultPrompt) {
411
 
                    if (lockscreen.alphaNumeric) {
412
 
                        lockscreen.infoText = i18n.tr("Enter passphrase")
413
 
                        lockscreen.errorText = i18n.tr("Sorry, incorrect passphrase") + "\n" +
414
 
                                               i18n.tr("Please re-enter")
415
 
                    } else {
416
 
                        lockscreen.infoText = i18n.tr("Enter passcode")
417
 
                        lockscreen.errorText = i18n.tr("Sorry, incorrect passcode")
418
 
                    }
419
 
                } else {
420
 
                    lockscreen.infoText = i18n.tr("Enter %1").arg(text.toLowerCase())
421
 
                    lockscreen.errorText = i18n.tr("Sorry, incorrect %1").arg(text.toLowerCase())
422
 
                }
423
 
 
 
428
                lockscreen.promptText = isDefaultPrompt ? "" : text.toLowerCase();
424
429
                lockscreen.maybeShow();
425
430
            }
426
431
        }
748
753
            }
749
754
        }
750
755
 
 
756
        Wizard {
 
757
            id: wizard
 
758
            anchors.fill: parent
 
759
            background: shell.background
 
760
        }
 
761
 
751
762
        Rectangle {
752
763
            id: modalNotificationBackground
753
764
 
809
820
        id: edgeDemo
810
821
        objectName: "edgeDemo"
811
822
        z: dialogs.z + 10
812
 
        paused: Powerd.status === Powerd.Off // Saves power
 
823
        paused: Powerd.status === Powerd.Off || wizard.active // Saves power
813
824
        greeter: greeter
814
825
        launcher: launcher
815
826
        panel: panel