Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
7797a7e2
Commit
7797a7e2
authored
Aug 10, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added configuration/Preferences for OpenPGP
parent
a6339c83
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
27 deletions
+45
-27
account.py
blink/configuration/account.py
+3
-0
settings.py
blink/configuration/settings.py
+1
-0
preferences.py
blink/preferences.py
+7
-0
preferences.ui
resources/preferences.ui
+34
-27
No files found.
blink/configuration/account.py
View file @
7797a7e2
...
...
@@ -66,6 +66,9 @@ class SMSSettings(SettingsGroup):
enable_iscomposing
=
Setting
(
type
=
bool
,
default
=
True
)
enable_imdn
=
Setting
(
type
=
bool
,
default
=
True
)
add_unknown_contacts
=
Setting
(
type
=
bool
,
default
=
True
)
enable_pgp
=
Setting
(
type
=
bool
,
default
=
True
)
public_key
=
Setting
(
type
=
ApplicationDataPath
,
default
=
None
,
nillable
=
True
)
private_key
=
Setting
(
type
=
ApplicationDataPath
,
default
=
None
,
nillable
=
True
)
class
SoundSettings
(
SettingsGroup
):
...
...
blink/configuration/settings.py
View file @
7797a7e2
...
...
@@ -42,6 +42,7 @@ class ChatSettingsExtension(ChatSettings):
auto_accept
=
Setting
(
type
=
bool
,
default
=
False
)
sms_replication
=
Setting
(
type
=
bool
,
default
=
True
)
history_directory
=
Setting
(
type
=
ApplicationDataPath
,
default
=
ApplicationDataPath
(
'history'
))
keys_directory
=
Setting
(
type
=
ApplicationDataPath
,
default
=
ApplicationDataPath
(
'keys'
))
class
GoogleContactsSettings
(
SettingsGroup
):
...
...
blink/preferences.py
View file @
7797a7e2
...
...
@@ -261,6 +261,7 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
self
.
message_iscomposing_enabled_button
.
clicked
.
connect
(
self
.
_SH_EnableMessageIsComposingButtonClicked
)
self
.
message_imdn_enabled_button
.
clicked
.
connect
(
self
.
_SH_EnableMessageIMDNButtonClicked
)
self
.
message_add_unknown_contacts_button
.
clicked
.
connect
(
self
.
_SH_AddUnknownContactsButtonClicked
)
self
.
message_pgp_enabled_button
.
clicked
.
connect
(
self
.
_SH_EnablePGPButtonClicked
)
# Audio devices
self
.
audio_alert_device_button
.
activated
[
int
]
.
connect
(
self
.
_SH_AudioAlertDeviceButtonActivated
)
...
...
@@ -840,6 +841,7 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
self
.
message_imdn_enabled_button
.
setEnabled
(
account
.
sms
.
use_cpim
)
self
.
message_imdn_enabled_button
.
setChecked
(
account
.
sms
.
enable_imdn
)
self
.
message_add_unknown_contacts_button
.
setChecked
(
account
.
sms
.
add_unknown_contacts
)
self
.
message_pgp_enabled_button
.
setChecked
(
account
.
sms
.
enable_pgp
)
if
account
is
not
bonjour_account
:
self
.
account_auto_answer
.
setText
(
'Auto answer from allowed contacts'
)
...
...
@@ -1446,6 +1448,11 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
account
.
sms
.
add_unknown_contacts
=
checked
account
.
save
()
def
_SH_EnablePGPButtonClicked
(
self
,
checked
):
account
=
self
.
selected_account
account
.
sms
.
enable_pgp
=
checked
account
.
save
()
# Audio devices signal handlers
def
_SH_AudioAlertDeviceButtonActivated
(
self
,
index
):
device
=
self
.
audio_alert_device_button
.
itemData
(
index
)
...
...
resources/preferences.ui
View file @
7797a7e2
...
...
@@ -1291,6 +1291,13 @@
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item
row=
"11"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_add_unknown_contacts_button"
>
<property
name=
"text"
>
<string>
Add unknown contacts to 'Messages' group in your contacts
</string>
</property>
</widget>
</item>
<item
row=
"10"
column=
"1"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"enabled"
>
...
...
@@ -1301,17 +1308,26 @@
</property>
</widget>
</item>
<item
row=
"
2
"
column=
"1"
>
<widget
class=
"Line"
name=
"line_
2
"
>
<item
row=
"
8
"
column=
"1"
>
<widget
class=
"Line"
name=
"line_
4
"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_cpim_enabled_button"
>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"message_label"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
Use CPIM envelope
</string>
<string>
When sending messages
</string>
</property>
<property
name=
"scaledContents"
>
<bool>
false
</bool>
</property>
</widget>
</item>
...
...
@@ -1322,6 +1338,13 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"Line"
name=
"line_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_iscomposing_enabled_button"
>
<property
name=
"text"
>
...
...
@@ -1342,33 +1365,17 @@
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"message_label"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_cpim_enabled_button"
>
<property
name=
"text"
>
<string>
When sending messages
</string>
</property>
<property
name=
"scaledContents"
>
<bool>
false
</bool>
<string>
Use CPIM envelope
</string>
</property>
</widget>
</item>
<item
row=
"1
1
"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_
add_unknown_contacts
_button"
>
<item
row=
"1
2
"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_
pgp_enabled
_button"
>
<property
name=
"text"
>
<string>
Add unknown contacts to 'Messages' group in your contacts
</string>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"Line"
name=
"line_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
<string>
Enable message encryption with OpenPGP (if supported by receiver)
</string>
</property>
</widget>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment