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
213a5431
Commit
213a5431
authored
Aug 15, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax fixes
parent
95ad70fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
sessions.py
blink/sessions.py
+14
-9
No files found.
blink/sessions.py
View file @
213a5431
...
@@ -214,6 +214,7 @@ class ScreenSharingStreamInfo(MSRPStreamInfo):
...
@@ -214,6 +214,7 @@ class ScreenSharingStreamInfo(MSRPStreamInfo):
if
stream
is
not
None
:
if
stream
is
not
None
:
self
.
mode
=
stream
.
handler
.
type
self
.
mode
=
stream
.
handler
.
type
class
MessageStreamInfo
(
object
):
class
MessageStreamInfo
(
object
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
encryption
=
None
self
.
encryption
=
None
...
@@ -488,6 +489,7 @@ class BlinkSession(BlinkSessionBase):
...
@@ -488,6 +489,7 @@ class BlinkSession(BlinkSessionBase):
else
:
else
:
self
.
timer
.
stop
()
self
.
timer
.
stop
()
self
.
direction
=
None
self
.
direction
=
None
self
.
__dict__
[
'active'
]
=
False
self
.
__dict__
[
'active'
]
=
False
...
@@ -685,6 +687,7 @@ class BlinkSession(BlinkSessionBase):
...
@@ -685,6 +687,7 @@ class BlinkSession(BlinkSessionBase):
self
.
_initialize
(
reinitialize
=
True
)
self
.
_initialize
(
reinitialize
=
True
)
else
:
else
:
self
.
_delete_when_done
=
len
(
stream_descriptions
)
==
1
and
stream_descriptions
[
0
]
.
type
==
'audio'
self
.
_delete_when_done
=
len
(
stream_descriptions
)
==
1
and
stream_descriptions
[
0
]
.
type
==
'audio'
self
.
direction
=
'outgoing'
self
.
direction
=
'outgoing'
self
.
account
=
account
self
.
account
=
account
self
.
contact
=
contact
self
.
contact
=
contact
...
@@ -3016,6 +3019,7 @@ class ChatSessionIconLabel(QLabel):
...
@@ -3016,6 +3019,7 @@ class ChatSessionIconLabel(QLabel):
ui_class
,
base_class
=
uic
.
loadUiType
(
Resources
.
get
(
'chat_session.ui'
))
ui_class
,
base_class
=
uic
.
loadUiType
(
Resources
.
get
(
'chat_session.ui'
))
class
ChatSessionWidget
(
base_class
,
ui_class
):
class
ChatSessionWidget
(
base_class
,
ui_class
):
class
StandardDisplayMode
(
metaclass
=
MarkerType
):
pass
class
StandardDisplayMode
(
metaclass
=
MarkerType
):
pass
class
AlternateDisplayMode
(
metaclass
=
MarkerType
):
pass
class
AlternateDisplayMode
(
metaclass
=
MarkerType
):
pass
...
@@ -3106,6 +3110,7 @@ class ChatSessionWidget(base_class, ui_class):
...
@@ -3106,6 +3110,7 @@ class ChatSessionWidget(base_class, ui_class):
self
.
video_icon
.
setVisible
(
'video'
in
session
.
blink_session
.
streams
)
self
.
video_icon
.
setVisible
(
'video'
in
session
.
blink_session
.
streams
)
self
.
screen_sharing_icon
.
setVisible
(
'screen-sharing'
in
session
.
blink_session
.
streams
)
self
.
screen_sharing_icon
.
setVisible
(
'screen-sharing'
in
session
.
blink_session
.
streams
)
del
ui_class
,
base_class
del
ui_class
,
base_class
...
@@ -4762,7 +4767,7 @@ class ConferenceParticipantDelegate(QStyledItemDelegate, ColorHelperMixin):
...
@@ -4762,7 +4767,7 @@ class ConferenceParticipantDelegate(QStyledItemDelegate, ColorHelperMixin):
def
editorEvent
(
self
,
event
,
model
,
option
,
index
):
def
editorEvent
(
self
,
event
,
model
,
option
,
index
):
if
event
.
type
()
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
if
event
.
type
()
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
cross_rect
=
option
.
rect
.
adjusted
(
option
.
rect
.
width
()
-
14
,
0
,
0
,
-
option
.
rect
.
height
()
/
2
)
# top half of the rightmost 14 pixels
cross_rect
=
option
.
rect
.
adjusted
(
option
.
rect
.
width
()
-
14
,
0
,
0
,
-
option
.
rect
.
height
()
/
2
)
# top half of the rightmost 14 pixels
if
cross_rect
.
contains
(
event
.
pos
()):
if
cross_rect
.
contains
(
event
.
pos
()):
item
=
index
.
data
(
Qt
.
UserRole
)
item
=
index
.
data
(
Qt
.
UserRole
)
model
.
session
.
server_conference
.
remove_participant
(
item
.
participant
)
model
.
session
.
server_conference
.
remove_participant
(
item
.
participant
)
...
@@ -4801,8 +4806,8 @@ class ConferenceParticipantDelegate(QStyledItemDelegate, ColorHelperMixin):
...
@@ -4801,8 +4806,8 @@ class ConferenceParticipantDelegate(QStyledItemDelegate, ColorHelperMixin):
base_contrast_color
=
self
.
calc_light_color
(
background_color
)
base_contrast_color
=
self
.
calc_light_color
(
background_color
)
gradient
=
QLinearGradient
(
0
,
0
,
1
,
0
)
gradient
=
QLinearGradient
(
0
,
0
,
1
,
0
)
gradient
.
setCoordinateMode
(
QLinearGradient
.
ObjectBoundingMode
)
gradient
.
setCoordinateMode
(
QLinearGradient
.
ObjectBoundingMode
)
gradient
.
setColorAt
(
0.0
,
self
.
color_with_alpha
(
base_contrast_color
,
0.3
*
255
))
gradient
.
setColorAt
(
0.0
,
self
.
color_with_alpha
(
base_contrast_color
,
0.3
*
255
))
gradient
.
setColorAt
(
1.0
,
self
.
color_with_alpha
(
base_contrast_color
,
0.8
*
255
))
gradient
.
setColorAt
(
1.0
,
self
.
color_with_alpha
(
base_contrast_color
,
0.8
*
255
))
contrast_color
=
QBrush
(
gradient
)
contrast_color
=
QBrush
(
gradient
)
else
:
else
:
foreground_color
=
widget
.
palette
()
.
color
(
QPalette
.
Normal
,
widget
.
foregroundRole
())
foreground_color
=
widget
.
palette
()
.
color
(
QPalette
.
Normal
,
widget
.
foregroundRole
())
...
@@ -5129,13 +5134,13 @@ class IncomingDialogBase(QDialog):
...
@@ -5129,13 +5134,13 @@ class IncomingDialogBase(QDialog):
total_width
=
width
+
window_frame_size
.
width
()
total_width
=
width
+
window_frame_size
.
width
()
total_height
=
height
+
window_frame_size
.
height
()
total_height
=
height
+
window_frame_size
.
height
()
x
=
int
(
limit
(
screen_geometry
.
center
()
.
x
()
-
total_width
/
2
,
min
=
available_geometry
.
left
(),
max
=
available_geometry
.
right
()
-
total_width
))
x
=
int
(
limit
(
screen_geometry
.
center
()
.
x
()
-
total_width
/
2
,
min
=
available_geometry
.
left
(),
max
=
available_geometry
.
right
()
-
total_width
))
if
slot
is
None
:
if
slot
is
None
:
y
=
-
1
y
=
-
1
elif
slot
%
2
==
0
:
elif
slot
%
2
==
0
:
y
=
int
(
screen_geometry
.
center
()
.
y
()
+
(
slot
-
1
)
*
total_height
/
2
)
y
=
int
(
screen_geometry
.
center
()
.
y
()
+
(
slot
-
1
)
*
total_height
/
2
)
else
:
else
:
y
=
int
(
screen_geometry
.
center
()
.
y
()
-
slot
*
total_height
/
2
)
y
=
int
(
screen_geometry
.
center
()
.
y
()
-
slot
*
total_height
/
2
)
if
available_geometry
.
top
()
<=
y
<=
available_geometry
.
bottom
()
-
total_height
:
if
available_geometry
.
top
()
<=
y
<=
available_geometry
.
bottom
()
-
total_height
:
self
.
setGeometry
(
x
,
y
,
width
,
height
)
self
.
setGeometry
(
x
,
y
,
width
,
height
)
...
...
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