455.3.1
by Mihir Soni
Removed duplicate header section from views and added common header |
1 |
/*
|
2 |
* Copyright (C) 2014 Canonical Ltd
|
|
3 |
*
|
|
4 |
* This file is part of Ubuntu Calendar App
|
|
5 |
*
|
|
6 |
* Ubuntu Calendar App is free software: you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License version 3 as
|
|
8 |
* published by the Free Software Foundation.
|
|
9 |
*
|
|
10 |
* Ubuntu Calendar App 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 2.3 |
|
20 |
import Ubuntu.Components 1.1 |
|
21 |
||
22 |
Item { |
|
23 |
id: actionPool
|
|
24 |
||
25 |
property alias newEventAction: _newEventAction |
|
26 |
property alias showCalendarAction: _showCalendarAction |
|
27 |
property alias reloadAction: _reloadAction |
|
28 |
||
29 |
Action { |
|
30 |
id: _newEventAction |
|
31 |
objectName: "neweventbutton" |
|
32 |
iconName: "new-event" |
|
33 |
text: i18n.tr("New Event") |
|
34 |
onTriggered: { |
|
35 |
pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"date":tabs.currentDay,"model":eventModel}); |
|
36 |
}
|
|
37 |
}
|
|
38 |
||
39 |
Action{ |
|
40 |
id: _showCalendarAction |
|
41 |
iconName: "new-event" |
|
42 |
text: i18n.tr("Calendars") |
|
43 |
onTriggered: { |
|
44 |
pageStack.push(Qt.resolvedUrl("CalendarChoicePopup.qml"),{"model":eventModel}); |
|
45 |
pageStack.currentPage.collectionUpdated.connect(eventModel.delayedApplyFilter); |
|
46 |
}
|
|
47 |
}
|
|
48 |
||
49 |
Action { |
|
50 |
id: _reloadAction |
|
51 |
objectName: "syncbutton" |
|
52 |
iconName: "reload" |
|
515.2.2
by Mihir Soni
fixed typo |
53 |
// TRANSLATORS: Please translate this string to 15 characters only.
|
515.2.1
by Mihir Soni
adding Translators comments for Syncing |
54 |
// Currently ,there is no way we can increase width of action menu currently.
|
455.3.1
by Mihir Soni
Removed duplicate header section from views and added common header |
55 |
text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing") |
56 |
onTriggered: syncMonitor.sync(["calendar"]) |
|
57 |
enabled: (syncMonitor.state !== "syncing") |
|
58 |
visible: syncMonitor.enabledServices ? syncMonitor.serviceIsEnabled("calendar") : false |
|
59 |
}
|
|
60 |
}
|