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
071dcc00
Commit
071dcc00
authored
May 31, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support 'messages' as preferred media for a contact
parent
39054b24
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
7 deletions
+14
-7
chatwindow.py
blink/chatwindow.py
+1
-1
contacts.py
blink/contacts.py
+6
-4
mainwindow.py
blink/mainwindow.py
+1
-1
messages.py
blink/messages.py
+1
-1
contact_editor.ui
resources/contact_editor.ui
+5
-0
No files found.
blink/chatwindow.py
View file @
071dcc00
...
...
@@ -1520,7 +1520,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
sliding_panels
=
True
__streamtypes__
=
{
'chat'
,
'screen-sharing'
,
'video'
,
'message
'
}
# the stream types for which we show the chat window
__streamtypes__
=
{
'chat'
,
'screen-sharing'
,
'video'
,
'message
s'
}
# the stream types for which we show the chat window
def
__init__
(
self
,
parent
=
None
):
super
(
ChatWindow
,
self
)
.
__init__
(
parent
)
...
...
blink/contacts.py
View file @
071dcc00
...
...
@@ -225,7 +225,7 @@ class PreferredMedia(str):
@
property
def
autoconnect
(
self
):
return
self
!=
'chat'
return
self
!=
'chat'
and
self
!=
'messages'
class
BonjourNeighbourID
(
str
):
...
...
@@ -3516,7 +3516,7 @@ class ContactListView(QListView):
def
_AH_SendSMS
(
self
,
uri
=
None
):
contact
=
self
.
selectionModel
()
.
selectedIndexes
()[
0
]
.
data
(
Qt
.
UserRole
)
session_manager
=
SessionManager
()
session_manager
.
create_session
(
contact
,
uri
or
contact
.
uri
,
[
StreamDescription
(
'message'
)],
connect
=
False
)
session_manager
.
create_session
(
contact
,
uri
or
contact
.
uri
,
[
StreamDescription
(
'message
s
'
)],
connect
=
False
)
def
_AH_SendFiles
(
self
,
uri
=
None
):
session_manager
=
SessionManager
()
...
...
@@ -3908,7 +3908,7 @@ class ContactSearchListView(QListView):
def
_AH_SendSMS
(
self
,
uri
=
None
):
contact
=
self
.
selectionModel
()
.
selectedIndexes
()[
0
]
.
data
(
Qt
.
UserRole
)
session_manager
=
SessionManager
()
session_manager
.
create_session
(
contact
,
uri
or
contact
.
uri
,
[
StreamDescription
(
'message'
)],
connect
=
False
)
session_manager
.
create_session
(
contact
,
uri
or
contact
.
uri
,
[
StreamDescription
(
'message
s
'
)],
connect
=
False
)
def
_AH_SendFiles
(
self
,
uri
=
None
):
session_manager
=
SessionManager
()
...
...
@@ -4218,7 +4218,7 @@ class ContactDetailView(QListView):
else
:
selected_uri
=
uri
or
contact
.
uri
session_manager
=
SessionManager
()
session_manager
.
create_session
(
contact
,
selected_uri
,
[
StreamDescription
(
'message'
)],
connect
=
False
)
session_manager
.
create_session
(
contact
,
selected_uri
,
[
StreamDescription
(
'message
s
'
)],
connect
=
False
)
def
_AH_SendFiles
(
self
,
uri
=
None
):
session_manager
=
SessionManager
()
...
...
@@ -4649,6 +4649,7 @@ class ContactEditorDialog(base_class, ui_class):
self
.
preferred_media
.
setItemData
(
1
,
'video'
)
self
.
preferred_media
.
setItemData
(
2
,
'chat'
)
self
.
preferred_media
.
setItemData
(
3
,
'audio+chat'
)
self
.
preferred_media
.
setItemData
(
4
,
'messages'
)
self
.
addresses_table
.
verticalHeader
()
.
setDefaultSectionSize
(
URITypeComboBox
()
.
sizeHint
()
.
height
())
def
open_for_add
(
self
,
sip_address
=
''
,
target_group
=
None
):
...
...
@@ -4766,6 +4767,7 @@ class ContactEditorDialog(base_class, ui_class):
if
'icon'
in
modified_attributes
:
self
.
icon_selector
.
update_from_contact
(
contact
)
del
ui_class
,
base_class
...
...
blink/mainwindow.py
View file @
071dcc00
...
...
@@ -572,7 +572,7 @@ class MainWindow(base_class, ui_class):
else
:
contact
,
contact_uri
=
URIUtils
.
find_contact
(
self
.
search_box
.
text
())
session_manager
=
SessionManager
()
session_manager
.
create_session
(
contact
,
contact_uri
,
[
StreamDescription
(
'message'
)],
connect
=
False
)
session_manager
.
create_session
(
contact
,
contact_uri
,
[
StreamDescription
(
'message
s
'
)],
connect
=
False
)
def
_AH_RequestScreenActionTriggered
(
self
):
list_view
=
self
.
contact_list
if
self
.
contacts_view
.
currentWidget
()
is
self
.
contact_list_panel
else
self
.
search_list
...
...
blink/messages.py
View file @
071dcc00
...
...
@@ -219,7 +219,7 @@ class MessageManager(object, metaclass=Singleton):
if
content_type
.
lower
()
in
[
IsComposingDocument
.
content_type
,
IMDNDocument
.
content_type
]:
return
else
:
blink_session
=
session_manager
.
create_session
(
contact
,
contact_uri
,
[
StreamDescription
(
'message'
)],
account
=
account
,
connect
=
False
)
blink_session
=
session_manager
.
create_session
(
contact
,
contact_uri
,
[
StreamDescription
(
'message
s
'
)],
account
=
account
,
connect
=
False
)
if
content_type
.
lower
()
==
IsComposingDocument
.
content_type
:
try
:
...
...
resources/contact_editor.ui
View file @
071dcc00
...
...
@@ -248,6 +248,11 @@
<string>
Start voice + chat sessions by default
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Start message sessions by default
</string>
</property>
</item>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
...
...
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