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
f0ee5833
Commit
f0ee5833
authored
Jun 27, 2023
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added menuitem in chat to send files
parent
e4e63929
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
chatwindow.py
blink/chatwindow.py
+10
-0
No files found.
blink/chatwindow.py
View file @
f0ee5833
...
...
@@ -12,6 +12,7 @@ from PyQt5.QtGui import QDesktopServices
from
PyQt5.QtWebKit
import
QWebSettings
from
PyQt5.QtWebKitWidgets
import
QWebPage
,
QWebView
from
PyQt5.QtWidgets
import
QApplication
,
QAction
,
QLabel
,
QListView
,
QMenu
,
QStyle
,
QStyleOption
,
QStylePainter
,
QTextEdit
,
QToolButton
from
PyQt5.QtWidgets
import
QFileDialog
from
abc
import
ABCMeta
,
abstractmethod
from
application.notification
import
IObserver
,
NotificationCenter
,
ObserverWeakrefProxy
,
NotificationData
...
...
@@ -1745,6 +1746,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self
.
control_button
.
actions
.
remove_video
=
QAction
(
translate
(
'chat_window'
,
"Remove video"
),
self
,
triggered
=
self
.
_AH_RemoveVideo
)
self
.
control_button
.
actions
.
add_chat
=
QAction
(
translate
(
'chat_window'
,
"Add real time chat"
),
self
,
triggered
=
self
.
_AH_AddChat
)
self
.
control_button
.
actions
.
remove_chat
=
QAction
(
translate
(
'chat_window'
,
"Remove real time chat"
),
self
,
triggered
=
self
.
_AH_RemoveChat
)
self
.
control_button
.
actions
.
send_files
=
QAction
(
translate
(
"chat_window"
,
"Send File(s)..."
),
self
,
triggered
=
self
.
_AH_SendFiles
)
self
.
control_button
.
actions
.
share_my_screen
=
QAction
(
translate
(
'chat_window'
,
"Share my screen"
),
self
,
triggered
=
self
.
_AH_ShareMyScreen
)
self
.
control_button
.
actions
.
request_screen
=
QAction
(
translate
(
'chat_window'
,
"Request screen"
),
self
,
triggered
=
self
.
_AH_RequestScreen
)
self
.
control_button
.
actions
.
end_screen_sharing
=
QAction
(
translate
(
'chat_window'
,
"End screen sharing"
),
self
,
triggered
=
self
.
_AH_EndScreenSharing
)
...
...
@@ -1912,6 +1914,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
menu
.
addAction
(
self
.
control_button
.
actions
.
share_my_screen
)
elif
stream_types
!=
{
'screen-sharing'
}:
menu
.
addAction
(
self
.
control_button
.
actions
.
end_screen_sharing
)
menu
.
addAction
(
self
.
control_button
.
actions
.
send_files
)
self
.
control_button
.
setMenu
(
menu
)
def
_update_panel_buttons
(
self
):
...
...
@@ -3015,6 +3018,13 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
def
_AH_EndScreenSharing
(
self
):
self
.
selected_session
.
blink_session
.
remove_stream
(
self
.
selected_session
.
blink_session
.
streams
.
get
(
'screen-sharing'
))
def
_AH_SendFiles
(
self
,
uri
=
None
):
session_manager
=
SessionManager
()
contact
=
self
.
selected_session
.
blink_session
.
contact
selected_uri
=
uri
or
contact
.
uri
for
filename
in
QFileDialog
.
getOpenFileNames
(
self
,
translate
(
'chat_window'
,
'Select File(s)'
),
session_manager
.
send_file_directory
,
'Any file (*.*)'
)[
0
]:
session_manager
.
send_file
(
contact
,
selected_uri
,
filename
)
def
_AH_EnableOTR
(
self
,
action
):
self
.
selected_session
.
chat_widget
.
start_otr_timer
()
self
.
selected_session
.
messages_stream
.
enable_otr
()
...
...
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