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
4b03268b
Commit
4b03268b
authored
Aug 30, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle replicated SIP messages
parent
b9b6e2df
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
248 additions
and
177 deletions
+248
-177
account.py
blink/configuration/account.py
+5
-1
messages.py
blink/messages.py
+157
-130
preferences.py
blink/preferences.py
+12
-0
preferences.ui
resources/preferences.ui
+74
-46
No files found.
blink/configuration/account.py
View file @
4b03268b
...
...
@@ -71,6 +71,10 @@ class SMSSettings(SettingsGroup):
private_key
=
Setting
(
type
=
ApplicationDataPath
,
default
=
None
,
nillable
=
True
)
class
SMSSettingsExtension
(
SMSSettings
):
enable_message_replication
=
Setting
(
type
=
bool
,
default
=
True
)
class
SoundSettings
(
SettingsGroup
):
inbound_ringtone
=
Setting
(
type
=
SoundFile
,
default
=
None
,
nillable
=
True
)
...
...
@@ -89,7 +93,7 @@ class AccountExtension(SettingsObjectExtension):
rtp
=
RTPSettingsExtension
server
=
ServerSettings
sip
=
SIPSettingsExtension
sms
=
SMSSettings
sms
=
SMSSettings
Extension
sounds
=
SoundSettings
xcap
=
XCAPSettingsExtension
...
...
blink/messages.py
View file @
4b03268b
This diff is collapsed.
Click to expand it.
blink/preferences.py
View file @
4b03268b
...
...
@@ -262,6 +262,7 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
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
)
self
.
message_replication_button
.
clicked
.
connect
(
self
.
_SH_MessageReplicationButtonClicked
)
# Audio devices
self
.
audio_alert_device_button
.
activated
[
int
]
.
connect
(
self
.
_SH_AudioAlertDeviceButtonActivated
)
...
...
@@ -901,9 +902,15 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
self
.
prefix_button
.
addItem
(
item_text
)
self
.
prefix_button
.
setCurrentIndex
(
self
.
prefix_button
.
findText
(
item_text
))
self
.
_update_pstn_example_label
()
# Messages tab
self
.
message_replication_button
.
show
()
self
.
message_replication_button
.
setChecked
(
account
.
sms
.
enable_message_replication
)
else
:
self
.
account_auto_answer
.
setText
(
'Auto answer from all neighbours'
)
self
.
message_replication_button
.
hide
()
def
update_chat_preview
(
self
):
blink_settings
=
BlinkSettings
()
...
...
@@ -1455,6 +1462,11 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
account
.
sms
.
enable_pgp
=
checked
account
.
save
()
def
_SH_MessageReplicationButtonClicked
(
self
,
checked
):
account
=
self
.
selected_account
account
.
sms
.
enable_message_replication
=
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 @
4b03268b
...
...
@@ -1279,43 +1279,21 @@
</size>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item
row=
"11"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_add_unknown_contacts_button"
>
<item
row=
"3"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"message_iscomposing_enabled_button"
>
<property
name=
"text"
>
<string>
Add unknown contacts to 'Messages' group in your contacts
</string>
<string>
Enable Is-Composing
</string>
</property>
</widget>
</item>
<item
row=
"10"
column=
"1"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"message_cpim_enabled_button"
>
<property
name=
"text"
>
<string>
If you turn off IMDN you won't be able to see receipts from other people
</string>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"Line"
name=
"line_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
<string>
Use CPIM envelope
</string>
</property>
</widget>
</item>
<item
row=
"
1"
column=
"1
"
>
<item
row=
"
0"
column=
"0"
colspan=
"2
"
>
<widget
class=
"QLabel"
name=
"message_label"
>
<property
name=
"font"
>
<font>
...
...
@@ -1331,28 +1309,55 @@
</property>
</widget>
</item>
<item
row=
"
9"
column=
"1
"
>
<widget
class=
"QCheckBox"
name=
"message_
imdn_enabled
_button"
>
<item
row=
"
12"
column=
"0"
colspan=
"2
"
>
<widget
class=
"QCheckBox"
name=
"message_
replication
_button"
>
<property
name=
"text"
>
<string>
Enable IMDN (Read receipts)
</string>
<string>
Handle server replicated messages
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<item
row=
"8"
column=
"0"
colspan=
"2"
>
<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=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"history_label"
>
<property
name=
"font"
>
<font>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
History and synchronization
</string>
</property>
</widget>
</item>
<item
row=
"9"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"message_pgp_enabled_button"
>
<property
name=
"text"
>
<string>
Enable message encryption with OpenPGP (if supported by receiver)
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<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_i
scomposing
_enabled_button"
>
<item
row=
"
6"
column=
"0"
colspan=
"2
"
>
<widget
class=
"QCheckBox"
name=
"message_i
mdn
_enabled_button"
>
<property
name=
"text"
>
<string>
Enable I
s-Composing
</string>
<string>
Enable I
MDN (Read receipts)
</string>
</property>
</widget>
</item>
<item
row=
"
7"
column=
"1
"
>
<item
row=
"
4"
column=
"0"
colspan=
"2
"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"font"
>
<font>
...
...
@@ -1365,23 +1370,46 @@
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_cpim_enabled_button"
>
<item
row=
"7"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Use CPIM envelop
e
</string>
<string>
If you turn off IMDN you won't be able to see receipts from other peopl
e
</string>
</property>
</widget>
</item>
<item
row=
"12"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"message_pgp_enabled_button"
>
<property
name=
"text"
>
<string>
Enable message encryption with OpenPGP (if supported by receiver)
</string>
<item
row=
"5"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"11"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"history_line"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"advanced_tab"
>
...
...
@@ -2973,14 +3001,14 @@
<string>
File Logging Settings
</string>
</property>
<layout
class=
"QGridLayout"
name=
"logging_group_box_layout"
>
<item
row=
"0"
column=
"0"
colspan=
"5"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"trace_sip_button"
>
<property
name=
"text"
>
<string>
Trace SIP
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<item
row=
"1"
column=
"0"
colspan=
"5"
>
<widget
class=
"QCheckBox"
name=
"trace_messaging_button"
>
<property
name=
"text"
>
<string>
Trace SIP Messaging and PGP Encryption
</string>
...
...
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