~renatofilho/address-book-app/no-updater

« back to all changes in this revision

Viewing changes to src/imports/ABContactListPage.qml

  • Committer: CI Train Bot
  • Author(s): Renato Araujo Oliveira Filho
  • Date: 2015-09-30 05:04:05 UTC
  • mfrom: (450.1.87 buteo-migration)
  • Revision ID: ci-train-bot@canonical.com-20150930050405-qvkcimsjjnadfkiy
Implemented the migration code from syncevolution to buteo.
Approved by: Michael Sheldon

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import QtQuick 2.2
18
18
import QtContacts 5.0
19
19
 
20
 
import Ubuntu.Components 1.1
 
20
import Ubuntu.Components 1.2
21
21
import Ubuntu.Components.ListItems 1.0 as ListItem
22
22
import Ubuntu.Components.Popups 1.0 as Popups
23
23
import Ubuntu.Contacts 0.1 as ContactsUI
226
226
                    }
227
227
                },
228
228
                Action {
229
 
                    visible: (application.isOnline && contactList.syncEnabled)
 
229
                    visible: (application.isOnline && (contactList.syncEnabled || application.serverSafeMode))
230
230
                    text: contactList.syncing ? i18n.tr("Syncing") : i18n.tr("Sync")
231
 
                    iconName: "reload"
232
 
                    enabled: !contactList.syncing
233
 
                    onTriggered: contactList.sync()
 
231
                    iconName: application.serverSafeMode ? "reset" : "reload"
 
232
                    enabled: !contactList.syncing && !application.updating
 
233
                    onTriggered: {
 
234
                        if (application.serverSafeMode) {
 
235
                            application.startUpdate()
 
236
                        } else {
 
237
                            contactList.sync()
 
238
                        }
 
239
                    }
234
240
                },
235
241
                Action {
236
242
                    text: i18n.tr("Settings")