diff options
Diffstat (limited to 'accounts')
-rw-r--r-- | accounts/CMakeLists.txt | 2 | ||||
-rw-r--r-- | accounts/gmail/CMakeLists.txt | 19 | ||||
-rw-r--r-- | accounts/gmail/gmailaccountplugin.cpp (renamed from accounts/google/googleaccountplugin.cpp) | 10 | ||||
-rw-r--r-- | accounts/gmail/gmailaccountplugin.h (renamed from accounts/google/googleaccountplugin.h) | 2 | ||||
-rw-r--r-- | accounts/gmail/gmailsettings.cpp (renamed from accounts/google/googlesettings.cpp) | 18 | ||||
-rw-r--r-- | accounts/gmail/gmailsettings.h (renamed from accounts/google/googlesettings.h) | 4 | ||||
-rw-r--r-- | accounts/gmail/metadata.json (renamed from accounts/google/metadata.json) | 2 | ||||
-rw-r--r-- | accounts/gmail/qml/AccountSettings.qml (renamed from accounts/google/qml/AccountSettings.qml) | 26 | ||||
-rw-r--r-- | accounts/gmail/qml/Login.qml (renamed from accounts/google/qml/Login.qml) | 6 | ||||
-rw-r--r-- | accounts/gmail/qmldir | 3 | ||||
-rw-r--r-- | accounts/google/CMakeLists.txt | 19 | ||||
-rw-r--r-- | accounts/google/qmldir | 3 |
12 files changed, 53 insertions, 61 deletions
diff --git a/accounts/CMakeLists.txt b/accounts/CMakeLists.txt index 0209f00b..76a11c54 100644 --- a/accounts/CMakeLists.txt +++ b/accounts/CMakeLists.txt | |||
@@ -12,5 +12,5 @@ endmacro(install_qml_account) | |||
12 | add_subdirectory(maildir) | 12 | add_subdirectory(maildir) |
13 | add_subdirectory(imap) | 13 | add_subdirectory(imap) |
14 | add_subdirectory(kolabnow) | 14 | add_subdirectory(kolabnow) |
15 | add_subdirectory(google) | 15 | add_subdirectory(gmail) |
16 | add_subdirectory(generic) | 16 | add_subdirectory(generic) |
diff --git a/accounts/gmail/CMakeLists.txt b/accounts/gmail/CMakeLists.txt new file mode 100644 index 00000000..f8baee04 --- /dev/null +++ b/accounts/gmail/CMakeLists.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | project(kube-accounts-gmail) | ||
2 | |||
3 | set(SRCS | ||
4 | gmailsettings.cpp | ||
5 | gmailaccountplugin.cpp | ||
6 | ) | ||
7 | |||
8 | add_library(gmailaccountplugin SHARED ${SRCS}) | ||
9 | target_link_libraries(gmailaccountplugin | ||
10 | sink | ||
11 | frameworkplugin | ||
12 | Qt5::Core | ||
13 | Qt5::Quick | ||
14 | Qt5::Qml | ||
15 | ) | ||
16 | |||
17 | install(TARGETS gmailaccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/gmail) | ||
18 | install(FILES metadata.json DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/gmail) | ||
19 | install_qml_account(gmail) | ||
diff --git a/accounts/google/googleaccountplugin.cpp b/accounts/gmail/gmailaccountplugin.cpp index d419e585..53218939 100644 --- a/accounts/google/googleaccountplugin.cpp +++ b/accounts/gmail/gmailaccountplugin.cpp | |||
@@ -16,14 +16,14 @@ | |||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. | 17 | 02110-1301, USA. |
18 | */ | 18 | */ |
19 | #include "googleaccountplugin.h" | 19 | #include "gmailaccountplugin.h" |
20 | 20 | ||
21 | #include "googlesettings.h" | 21 | #include "gmailsettings.h" |
22 | 22 | ||
23 | #include <QtQml> | 23 | #include <QtQml> |
24 | 24 | ||
25 | void GoogleAccountPlugin::registerTypes (const char *uri) | 25 | void GmailAccountPlugin::registerTypes (const char *uri) |
26 | { | 26 | { |
27 | Q_ASSERT(uri == QLatin1String("org.kube.accounts.google")); | 27 | Q_ASSERT(uri == QLatin1String("org.kube.accounts.gmail")); |
28 | qmlRegisterType<GoogleSettings>(uri, 1, 0, "GoogleSettings"); | 28 | qmlRegisterType<GmailSettings>(uri, 1, 0, "GmailSettings"); |
29 | } | 29 | } |
diff --git a/accounts/google/googleaccountplugin.h b/accounts/gmail/gmailaccountplugin.h index d546c4f9..5876e393 100644 --- a/accounts/google/googleaccountplugin.h +++ b/accounts/gmail/gmailaccountplugin.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <QQmlEngine> | 21 | #include <QQmlEngine> |
22 | #include <QQmlExtensionPlugin> | 22 | #include <QQmlExtensionPlugin> |
23 | 23 | ||
24 | class GoogleAccountPlugin : public QQmlExtensionPlugin | 24 | class GmailAccountPlugin : public QQmlExtensionPlugin |
25 | { | 25 | { |
26 | Q_OBJECT | 26 | Q_OBJECT |
27 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | 27 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") |
diff --git a/accounts/google/googlesettings.cpp b/accounts/gmail/gmailsettings.cpp index 6c4c32de..a50668b8 100644 --- a/accounts/google/googlesettings.cpp +++ b/accounts/gmail/gmailsettings.cpp | |||
@@ -16,14 +16,14 @@ | |||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. | 17 | 02110-1301, USA. |
18 | */ | 18 | */ |
19 | #include "googlesettings.h" | 19 | #include "gmailsettings.h" |
20 | 20 | ||
21 | GoogleSettings::GoogleSettings(QObject *parent) | 21 | GmailSettings::GmailSettings(QObject *parent) |
22 | : AccountSettings(parent) | 22 | : AccountSettings(parent) |
23 | { | 23 | { |
24 | } | 24 | } |
25 | 25 | ||
26 | void GoogleSettings::load() | 26 | void GmailSettings::load() |
27 | { | 27 | { |
28 | loadAccount(); | 28 | loadAccount(); |
29 | loadImapResource(); | 29 | loadImapResource(); |
@@ -31,7 +31,7 @@ void GoogleSettings::load() | |||
31 | loadIdentity(); | 31 | loadIdentity(); |
32 | } | 32 | } |
33 | 33 | ||
34 | void GoogleSettings::save() | 34 | void GmailSettings::save() |
35 | { | 35 | { |
36 | mImapServer = "imaps://imap.gmail.com:993"; | 36 | mImapServer = "imaps://imap.gmail.com:993"; |
37 | mImapUsername = mEmailAddress; | 37 | mImapUsername = mEmailAddress; |
@@ -39,21 +39,13 @@ void GoogleSettings::save() | |||
39 | mSmtpServer = "smtps://smtp.gmail.com:587"; | 39 | mSmtpServer = "smtps://smtp.gmail.com:587"; |
40 | mSmtpUsername = mEmailAddress; | 40 | mSmtpUsername = mEmailAddress; |
41 | 41 | ||
42 | mCardDavServer = QStringLiteral("https://www.googleapis.com/carddav/v1/principals/") + mEmailAddress + "/"; | ||
43 | mCardDavUsername = mEmailAddress; | ||
44 | |||
45 | mCalDavServer = QStringLiteral("https://www.google.com/calendar/dav/") + mEmailAddress + "/"; | ||
46 | mCalDavUsername = mEmailAddress; | ||
47 | |||
48 | saveAccount(); | 42 | saveAccount(); |
49 | saveImapResource(); | 43 | saveImapResource(); |
50 | saveMailtransportResource(); | 44 | saveMailtransportResource(); |
51 | saveCardDavResource(); | ||
52 | saveCalDavResource(); | ||
53 | saveIdentity(); | 45 | saveIdentity(); |
54 | } | 46 | } |
55 | 47 | ||
56 | void GoogleSettings::remove() | 48 | void GmailSettings::remove() |
57 | { | 49 | { |
58 | removeResource(mMailtransportIdentifier); | 50 | removeResource(mMailtransportIdentifier); |
59 | removeResource(mImapIdentifier); | 51 | removeResource(mImapIdentifier); |
diff --git a/accounts/google/googlesettings.h b/accounts/gmail/gmailsettings.h index ac7ae61f..708cb94b 100644 --- a/accounts/google/googlesettings.h +++ b/accounts/gmail/gmailsettings.h | |||
@@ -20,12 +20,12 @@ | |||
20 | 20 | ||
21 | #include <domain/settings/accountsettings.h> | 21 | #include <domain/settings/accountsettings.h> |
22 | 22 | ||
23 | class GoogleSettings : public AccountSettings | 23 | class GmailSettings : public AccountSettings |
24 | { | 24 | { |
25 | Q_OBJECT | 25 | Q_OBJECT |
26 | 26 | ||
27 | public: | 27 | public: |
28 | GoogleSettings(QObject *parent = 0); | 28 | GmailSettings(QObject *parent = 0); |
29 | 29 | ||
30 | Q_INVOKABLE virtual void load() Q_DECL_OVERRIDE; | 30 | Q_INVOKABLE virtual void load() Q_DECL_OVERRIDE; |
31 | Q_INVOKABLE virtual void save() Q_DECL_OVERRIDE; | 31 | Q_INVOKABLE virtual void save() Q_DECL_OVERRIDE; |
diff --git a/accounts/google/metadata.json b/accounts/gmail/metadata.json index 0ad786f1..68c06971 100644 --- a/accounts/google/metadata.json +++ b/accounts/gmail/metadata.json | |||
@@ -1,4 +1,4 @@ | |||
1 | { | 1 | { |
2 | "Name": "Google", | 2 | "Name": "GMail", |
3 | "RequiresKeyring": true | 3 | "RequiresKeyring": true |
4 | } | 4 | } |
diff --git a/accounts/google/qml/AccountSettings.qml b/accounts/gmail/qml/AccountSettings.qml index 73cdfbd7..d7df5eaf 100644 --- a/accounts/google/qml/AccountSettings.qml +++ b/accounts/gmail/qml/AccountSettings.qml | |||
@@ -20,28 +20,28 @@ | |||
20 | import QtQuick 2.4 | 20 | import QtQuick 2.4 |
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 |
22 | import org.kube.framework 1.0 as Kube | 22 | import org.kube.framework 1.0 as Kube |
23 | import org.kube.accounts.google 1.0 as GoogleAccount | 23 | import org.kube.accounts.gmail 1.0 as GmailAccount |
24 | 24 | ||
25 | Item { | 25 | Item { |
26 | 26 | ||
27 | property string accountId | 27 | property string accountId |
28 | property string heading: qsTr("Connect your Google account") | 28 | property string heading: qsTr("Connect your GMail account") |
29 | property string subheadline: qsTr("To let Kube access your account, fill in email address, username and give the account a title that will be displayed inside Kube.") | 29 | property string subheadline: qsTr("To let Kube access your account, fill in email address, username and give the account a title that will be displayed inside Kube.") |
30 | property bool valid: true | 30 | property bool valid: true |
31 | implicitHeight: grid.implicitHeight | 31 | implicitHeight: grid.implicitHeight |
32 | 32 | ||
33 | GoogleAccount.GoogleSettings { | 33 | GmailAccount.GmailSettings { |
34 | id: googleSettings | 34 | id: gmailSettings |
35 | accountIdentifier: accountId | 35 | accountIdentifier: accountId |
36 | accountType: "google" | 36 | accountType: "gmail" |
37 | } | 37 | } |
38 | 38 | ||
39 | function save(){ | 39 | function save(){ |
40 | googleSettings.save() | 40 | gmailSettings.save() |
41 | } | 41 | } |
42 | 42 | ||
43 | function remove(){ | 43 | function remove(){ |
44 | googleSettings.remove() | 44 | gmailSettings.remove() |
45 | } | 45 | } |
46 | 46 | ||
47 | GridLayout { | 47 | GridLayout { |
@@ -52,7 +52,7 @@ Item { | |||
52 | rowSpacing: Kube.Units.largeSpacing | 52 | rowSpacing: Kube.Units.largeSpacing |
53 | 53 | ||
54 | Kube.Label { | 54 | Kube.Label { |
55 | text: "Please note that Google requires you to configure your account to allow IMAP connections from Kube: | 55 | text: "Please note that GMail requires you to configure your account to allow IMAP connections from Kube: |
56 | <ol type=''> | 56 | <ol type=''> |
57 | <li> See <a href='https://support.google.com/mail/answer/7126229'>https://support.google.com/mail/answer/7126229</a> to configure your account to allow IMAP connections. | 57 | <li> See <a href='https://support.google.com/mail/answer/7126229'>https://support.google.com/mail/answer/7126229</a> to configure your account to allow IMAP connections. |
58 | <li> Visit <a href='https://myaccount.google.com/lesssecureapps'>https://myaccount.google.com/lesssecureapps</a> and enable the setting to allow Kube to connect to your account." | 58 | <li> Visit <a href='https://myaccount.google.com/lesssecureapps'>https://myaccount.google.com/lesssecureapps</a> and enable the setting to allow Kube to connect to your account." |
@@ -68,9 +68,9 @@ Item { | |||
68 | Kube.TextField { | 68 | Kube.TextField { |
69 | Layout.fillWidth: true | 69 | Layout.fillWidth: true |
70 | placeholderText: qsTr("Your name") | 70 | placeholderText: qsTr("Your name") |
71 | text: googleSettings.userName | 71 | text: gmailSettings.userName |
72 | onTextChanged: { | 72 | onTextChanged: { |
73 | googleSettings.userName = text | 73 | gmailSettings.userName = text |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
@@ -81,10 +81,10 @@ Item { | |||
81 | Kube.TextField { | 81 | Kube.TextField { |
82 | Layout.fillWidth: true | 82 | Layout.fillWidth: true |
83 | 83 | ||
84 | text: googleSettings.emailAddress | 84 | text: gmailSettings.emailAddress |
85 | onTextChanged: { | 85 | onTextChanged: { |
86 | googleSettings.emailAddress = text | 86 | gmailSettings.emailAddress = text |
87 | googleSettings.accountName = text | 87 | gmailSettings.accountName = text |
88 | } | 88 | } |
89 | placeholderText: qsTr("Your email address") | 89 | placeholderText: qsTr("Your email address") |
90 | } | 90 | } |
diff --git a/accounts/google/qml/Login.qml b/accounts/gmail/qml/Login.qml index 0a44aa8c..bcab19be 100644 --- a/accounts/google/qml/Login.qml +++ b/accounts/gmail/qml/Login.qml | |||
@@ -20,7 +20,7 @@ | |||
20 | import QtQuick 2.4 | 20 | import QtQuick 2.4 |
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 |
22 | import org.kube.framework 1.0 as Kube | 22 | import org.kube.framework 1.0 as Kube |
23 | import org.kube.accounts.google 1.0 as GoogleAccount | 23 | import org.kube.accounts.gmail 1.0 as GmailAccount |
24 | 24 | ||
25 | Item { | 25 | Item { |
26 | property alias accountId: settings.accountIdentifier | 26 | property alias accountId: settings.accountIdentifier |
@@ -28,9 +28,9 @@ Item { | |||
28 | property string subheadline: settings.accountName | 28 | property string subheadline: settings.accountName |
29 | property bool valid: pwField.acceptableInput | 29 | property bool valid: pwField.acceptableInput |
30 | 30 | ||
31 | GoogleAccount.GoogleSettings { | 31 | GmailAccount.GmailSettings { |
32 | id: settings | 32 | id: settings |
33 | accountType: "google" | 33 | accountType: "gmail" |
34 | } | 34 | } |
35 | 35 | ||
36 | function login(){ | 36 | function login(){ |
diff --git a/accounts/gmail/qmldir b/accounts/gmail/qmldir new file mode 100644 index 00000000..78a9e5b7 --- /dev/null +++ b/accounts/gmail/qmldir | |||
@@ -0,0 +1,3 @@ | |||
1 | module org.kube.accounts.gmail | ||
2 | |||
3 | plugin gmailaccountplugin | ||
diff --git a/accounts/google/CMakeLists.txt b/accounts/google/CMakeLists.txt deleted file mode 100644 index 3732190d..00000000 --- a/accounts/google/CMakeLists.txt +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | project(kube-accounts-google) | ||
2 | |||
3 | set(SRCS | ||
4 | googlesettings.cpp | ||
5 | googleaccountplugin.cpp | ||
6 | ) | ||
7 | |||
8 | add_library(googleaccountplugin SHARED ${SRCS}) | ||
9 | target_link_libraries(googleaccountplugin | ||
10 | sink | ||
11 | frameworkplugin | ||
12 | Qt5::Core | ||
13 | Qt5::Quick | ||
14 | Qt5::Qml | ||
15 | ) | ||
16 | |||
17 | install(TARGETS googleaccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/google) | ||
18 | install(FILES metadata.json DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/google) | ||
19 | install_qml_account(google) | ||
diff --git a/accounts/google/qmldir b/accounts/google/qmldir deleted file mode 100644 index a4a06cb7..00000000 --- a/accounts/google/qmldir +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | module org.kube.accounts.google | ||
2 | |||
3 | plugin googleaccountplugin | ||