~mihirsoni/ubuntu-calendar-app/1438910

« back to all changes in this revision

Viewing changes to EventActions.qml

  • Committer: Andrew Hayzen
  • Date: 2015-02-18 19:27:20 UTC
  • mto: This revision was merged to the branch mainline in revision 584.
  • Revision ID: ahayzen@gmail.com-20150218192720-6hwp37hk98z3xcys
* Add sync header action to AgendaView.qml DayView.qml MonthView.qml WeekView.qml YearView.qml

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import QtQuick 2.3
20
20
import Ubuntu.Components 1.1
 
21
import Ubuntu.SyncMonitor 0.1
21
22
 
22
23
Item {
23
24
    id: actionPool
24
25
 
25
26
    property alias newEventAction: _newEventAction
26
27
    property alias showCalendarAction: _showCalendarAction
 
28
    property alias syncCalendarAction: _syncCalendarAction
 
29
 
 
30
    Action {
 
31
        id: _syncCalendarAction
 
32
        objectName: "syncbutton"
 
33
        iconName: "reload"
 
34
        // TRANSLATORS: Please translate this string  to 15 characters only.
 
35
        // Currently ,there is no way we can increase width of action menu currently.
 
36
        text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing")
 
37
        onTriggered: syncMonitor.sync(["calendar"])
 
38
        enabled: (syncMonitor.state !== "syncing")
 
39
        visible: syncMonitor.enabledServices ? syncMonitor.serviceIsEnabled("calendar") : false
 
40
    }
 
41
 
 
42
    SyncMonitor {
 
43
        id: syncMonitor
 
44
    }
27
45
 
28
46
    Action {
29
47
        id: _newEventAction