~mutse-young/ubuntu-docviewer-app/trunk

« back to all changes in this revision

Viewing changes to src/app/qml/ImageView.qml

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2014-11-07 22:02:18 UTC
  • mfrom: (36.3.6 content-hub-support)
  • Revision ID: tarmac-20141107220218-gpy3rrsdl8lgierw
Added ContentHub support. Fixes: https://bugs.launchpad.net/bugs/1387025, https://bugs.launchpad.net/bugs/1387026.

Approved by Arthur Mello, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    id: pageMain
8
8
    title: Utils.getNameOfFile(file.path);
9
9
 
 
10
    head.backAction: Action {
 
11
        iconName: "back"
 
12
        text: (pageStack.depth > 1) ? i18n.tr("Back") : i18n.tr("Close")
 
13
        onTriggered: {
 
14
            if (pageStack.depth > 1) {
 
15
                // Go back to Welcome page
 
16
                pageStack.pop();
 
17
            } else {
 
18
                // File has been imported through Content Hub (or was not chosen through WelcomePage)
 
19
                // Close the application and show our source app (e.g. ubuntu-filemanager-app if used to open a document)
 
20
                Qt.quit()
 
21
            }
 
22
        }
 
23
    }
 
24
 
10
25
    head.actions: [
11
26
        Action {
 
27
            objectName: "detailsAction"
12
28
            text: i18n.tr("Details")
13
29
            iconName: "info"
14
30
            onTriggered: pageStack.push(Qt.resolvedUrl("DetailsPage.qml"))