~unity-2d-team/unity-2d/shortcut-hint-overlay

« back to all changes in this revision

Viewing changes to shell/dash/HomeShortcuts.qml

  • Committer: Tiago Salem Herrmann
  • Date: 2012-03-19 15:28:41 UTC
  • mfrom: (771.40.182 unity-2d)
  • Revision ID: tiago.herrmann@canonical.com-20120319152841-2hfflo67muks7gca
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * This file is part of unity-2d
3
 
 *
4
 
 * Copyright 2010-2011 Canonical Ltd.
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation; version 3.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 
 */
18
 
 
19
 
import QtQuick 1.0
20
 
import Unity2d 1.0
21
 
 
22
 
Item {
23
 
    anchors.fill: parent
24
 
    anchors.topMargin: 21
25
 
    anchors.bottomMargin: 35
26
 
    anchors.leftMargin: 46
27
 
    anchors.rightMargin: 32
28
 
 
29
 
    Grid {
30
 
        id: buttons
31
 
 
32
 
        // FIXME Need this invisible Rectangle so that alignment in RTL is not broken and tests pass.
33
 
        //       Gerry says the Home lens is going away so we do not care about a better fix
34
 
        //       Don't ask me why the transparent Rectangle fixes the alignment though
35
 
        Rectangle {
36
 
            anchors.fill: parent
37
 
            opacity: 0
38
 
        }
39
 
 
40
 
        anchors.fill: parent
41
 
        spacing: 51
42
 
        columns: 4
43
 
        rows: 2
44
 
 
45
 
        HomeButton {
46
 
            focus: true
47
 
            label: u2d.tr("Media Apps")
48
 
            icon: "artwork/find_media_apps.png"
49
 
            onClicked: activateLensWithOptionFilter("applications.lens", "type", "media")
50
 
        }
51
 
 
52
 
        HomeButton {
53
 
            label: u2d.tr("Internet Apps")
54
 
            icon: "artwork/find_internet_apps.png"
55
 
            onClicked: activateLensWithOptionFilter("applications.lens", "type", "internet")
56
 
        }
57
 
 
58
 
        HomeButton {
59
 
            label: u2d.tr("More Apps")
60
 
            icon: "artwork/find_more_apps.png"
61
 
            onClicked: activateLensAndClearFilter("applications.lens", "type")
62
 
        }
63
 
 
64
 
        HomeButton {
65
 
            label: u2d.tr("Find Files")
66
 
            icon: "artwork/find_files.png"
67
 
            onClicked: activateLens("files.lens")
68
 
        }
69
 
 
70
 
        /* FIXME: use user's preferred applications instead of hardcoding them */
71
 
        HomeButtonDefaultApplication {
72
 
            label: u2d.tr("Browse the Web")
73
 
            contentType: "x-scheme-handler/http"
74
 
        }
75
 
 
76
 
        HomeButtonDefaultApplication {
77
 
            label: u2d.tr("View Photos")
78
 
            contentType: "image/jpeg"
79
 
            desktopFile: "shotwell-viewer.desktop"
80
 
        }
81
 
 
82
 
        HomeButtonDefaultApplication {
83
 
            label: u2d.tr("Check Email")
84
 
            contentType: "x-scheme-handler/mailto"
85
 
        }
86
 
 
87
 
        HomeButtonDefaultApplication {
88
 
            label: u2d.tr("Listen to Music")
89
 
            contentType: "audio/x-vorbis+ogg"
90
 
        }
91
 
    }
92
 
 
93
 
    FocusPath {
94
 
        item: buttons
95
 
        columns: buttons.columns
96
 
    }
97
 
}