diff options
Diffstat (limited to 'accounts/maildir/package')
-rw-r--r-- | accounts/maildir/package/contents/ui/AccountSettings.qml | 107 | ||||
-rw-r--r-- | accounts/maildir/package/metadata.desktop | 9 |
2 files changed, 0 insertions, 116 deletions
diff --git a/accounts/maildir/package/contents/ui/AccountSettings.qml b/accounts/maildir/package/contents/ui/AccountSettings.qml deleted file mode 100644 index 0fb87810..00000000 --- a/accounts/maildir/package/contents/ui/AccountSettings.qml +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | /* | ||
2 | Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com> | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program 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 along | ||
16 | with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | import QtQuick 2.4 | ||
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Layouts 1.1 | ||
23 | import QtQuick.Dialogs 1.0 as Dialogs | ||
24 | import org.kube.framework 1.0 as Kube | ||
25 | import org.kube.accounts.maildir 1.0 as MaildirAccount | ||
26 | |||
27 | Item { | ||
28 | property string accountId | ||
29 | property string heading: qsTr("Add your Maildir archive") | ||
30 | property string subheadline: qsTr("To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube.") | ||
31 | property bool valid: true | ||
32 | implicitHeight: grid.implicitHeight | ||
33 | |||
34 | MaildirAccount.MaildirSettings { | ||
35 | id: maildirSettings | ||
36 | accountIdentifier: accountId | ||
37 | accountType: "maildir" | ||
38 | } | ||
39 | |||
40 | function save(){ | ||
41 | maildirSettings.save() | ||
42 | } | ||
43 | |||
44 | function remove(){ | ||
45 | maildirSettings.remove() | ||
46 | } | ||
47 | |||
48 | GridLayout { | ||
49 | id: grid | ||
50 | anchors.fill: parent | ||
51 | columns: 2 | ||
52 | columnSpacing: Kube.Units.largeSpacing | ||
53 | rowSpacing: Kube.Units.largeSpacing | ||
54 | |||
55 | Kube.Label { | ||
56 | text: qsTr("Title of Account") | ||
57 | Layout.alignment: Qt.AlignRight | ||
58 | } | ||
59 | Kube.TextField { | ||
60 | Layout.fillWidth: true | ||
61 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") | ||
62 | text: maildirSettings.accountName | ||
63 | onTextChanged: { | ||
64 | maildirSettings.accountName = text | ||
65 | } | ||
66 | } | ||
67 | |||
68 | Kube.Label { | ||
69 | text: qsTr("Path") | ||
70 | Layout.alignment: Qt.AlignRight | ||
71 | } | ||
72 | RowLayout { | ||
73 | Layout.fillWidth: true | ||
74 | |||
75 | Kube.TextField { | ||
76 | id: path | ||
77 | Layout.fillWidth: true | ||
78 | enabled: false | ||
79 | text: maildirSettings.path | ||
80 | } | ||
81 | |||
82 | Controls.Button { | ||
83 | iconName: Kube.Icons.folder | ||
84 | |||
85 | onClicked: { | ||
86 | fileDialogComponent.createObject(parent) | ||
87 | } | ||
88 | |||
89 | Component { | ||
90 | id: fileDialogComponent | ||
91 | Dialogs.FileDialog { | ||
92 | id: fileDialog | ||
93 | |||
94 | visible: true | ||
95 | title: "Choose the maildir folder" | ||
96 | |||
97 | selectFolder: true | ||
98 | |||
99 | onAccepted: { | ||
100 | maildirSettings.path = fileDialog.fileUrl | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | } | ||
107 | } | ||
diff --git a/accounts/maildir/package/metadata.desktop b/accounts/maildir/package/metadata.desktop deleted file mode 100644 index ce922455..00000000 --- a/accounts/maildir/package/metadata.desktop +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | [Desktop Entry] | ||
2 | Name=Kube Maildir Accounts Plugin | ||
3 | X-KDE-PluginInfo-Name=org.kube.accounts.maildir | ||
4 | Exec=kpackagelauncherqml -a org.kube.accounts.maildir | ||
5 | X-Plasma-MainScript=ui/MaildirAccountSettings.qml | ||
6 | X-KDE-ServiceTypes=KPackage/GenericQML | ||
7 | Icon=folder | ||
8 | Type=Service | ||
9 | X-KDE-Kube-RequiresKeyring=False | ||