summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-08-23 12:21:43 +0200
committerMinijackson <minijackson@riseup.net>2018-08-23 12:21:43 +0200
commit00377c1d324c03f07e9d2c3d19dce12ce3dc6620 (patch)
tree6853ea643aea50c1024f2c511776b206d08d540d
parentef1cf433c9598430654e87790fdb1be11f82ecd1 (diff)
downloadkube-00377c1d324c03f07e9d2c3d19dce12ce3dc6620.tar.gz
kube-00377c1d324c03f07e9d2c3d19dce12ce3dc6620.zip
Revert "Add caldav and carddav URLs + rename Gmail -> Google"
This reverts commit ef1cf433c9598430654e87790fdb1be11f82ecd1.
-rw-r--r--CMakeLists.txt4
-rw-r--r--accounts/CMakeLists.txt2
-rw-r--r--accounts/gmail/CMakeLists.txt19
-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/qmldir3
-rw-r--r--accounts/google/CMakeLists.txt19
-rw-r--r--accounts/google/qmldir3
13 files changed, 55 insertions, 63 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5924c124..25cc0fff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,10 +10,10 @@ cmake_policy(SET CMP0048 NEW)
10cmake_policy(SET CMP0053 NEW) 10cmake_policy(SET CMP0053 NEW)
11cmake_policy(SET CMP0063 NEW) 11cmake_policy(SET CMP0063 NEW)
12 12
13option(EXPERIMENTAL_VIEWS "Install experimental views" ON) 13option(EXPERIMENTAL_VIEWS "Install experimental views" OFF)
14#Do not enable this unless you actually distribute a custom extension. 14#Do not enable this unless you actually distribute a custom extension.
15option(ENABLE_EXTENSION "Enable custom kube extensions" OFF) 15option(ENABLE_EXTENSION "Enable custom kube extensions" OFF)
16set(AVAILABLE_ACCOUNT_PLUGINS "kolabnow" "google" "generic" CACHE STRING "List of enabled account plugins (provide as semicolon separated string)" ) 16set(AVAILABLE_ACCOUNT_PLUGINS "kolabnow" "gmail" "generic" CACHE STRING "List of enabled account plugins (provide as semicolon separated string)" )
17 17
18include(CPack) 18include(CPack)
19include(FeatureSummary) 19include(FeatureSummary)
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)
12add_subdirectory(maildir) 12add_subdirectory(maildir)
13add_subdirectory(imap) 13add_subdirectory(imap)
14add_subdirectory(kolabnow) 14add_subdirectory(kolabnow)
15add_subdirectory(google) 15add_subdirectory(gmail)
16add_subdirectory(generic) 16add_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 @@
1project(kube-accounts-gmail)
2
3set(SRCS
4 gmailsettings.cpp
5 gmailaccountplugin.cpp
6)
7
8add_library(gmailaccountplugin SHARED ${SRCS})
9target_link_libraries(gmailaccountplugin
10 sink
11 frameworkplugin
12 Qt5::Core
13 Qt5::Quick
14 Qt5::Qml
15)
16
17install(TARGETS gmailaccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/gmail)
18install(FILES metadata.json DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/gmail)
19install_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
25void GoogleAccountPlugin::registerTypes (const char *uri) 25void 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
24class GoogleAccountPlugin : public QQmlExtensionPlugin 24class 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
21GoogleSettings::GoogleSettings(QObject *parent) 21GmailSettings::GmailSettings(QObject *parent)
22 : AccountSettings(parent) 22 : AccountSettings(parent)
23{ 23{
24} 24}
25 25
26void GoogleSettings::load() 26void 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
34void GoogleSettings::save() 34void 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
56void GoogleSettings::remove() 48void 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
23class GoogleSettings : public AccountSettings 23class GmailSettings : public AccountSettings
24{ 24{
25 Q_OBJECT 25 Q_OBJECT
26 26
27public: 27public:
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 @@
20import QtQuick 2.4 20import QtQuick 2.4
21import QtQuick.Layouts 1.1 21import QtQuick.Layouts 1.1
22import org.kube.framework 1.0 as Kube 22import org.kube.framework 1.0 as Kube
23import org.kube.accounts.google 1.0 as GoogleAccount 23import org.kube.accounts.gmail 1.0 as GmailAccount
24 24
25Item { 25Item {
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 @@
20import QtQuick 2.4 20import QtQuick 2.4
21import QtQuick.Layouts 1.1 21import QtQuick.Layouts 1.1
22import org.kube.framework 1.0 as Kube 22import org.kube.framework 1.0 as Kube
23import org.kube.accounts.google 1.0 as GoogleAccount 23import org.kube.accounts.gmail 1.0 as GmailAccount
24 24
25Item { 25Item {
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 @@
1module org.kube.accounts.gmail
2
3plugin 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 @@
1project(kube-accounts-google)
2
3set(SRCS
4 googlesettings.cpp
5 googleaccountplugin.cpp
6)
7
8add_library(googleaccountplugin SHARED ${SRCS})
9target_link_libraries(googleaccountplugin
10 sink
11 frameworkplugin
12 Qt5::Core
13 Qt5::Quick
14 Qt5::Qml
15)
16
17install(TARGETS googleaccountplugin DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/google)
18install(FILES metadata.json DESTINATION ${QML_INSTALL_DIR}/org/kube/accounts/google)
19install_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 @@
1module org.kube.accounts.google
2
3plugin googleaccountplugin