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
8e968c34
Commit
8e968c34
authored
Jul 05, 2013
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified and made menu entries more compact
parent
8421c78b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
31 deletions
+24
-31
contacts.py
blink/contacts.py
+24
-31
No files found.
blink/contacts.py
View file @
8e968c34
...
...
@@ -2764,8 +2764,8 @@ class ContactListView(QListView):
self
.
actions
.
start_chat_session
=
QAction
(
"Start Chat Session"
,
self
,
triggered
=
self
.
_AH_StartChatSession
)
self
.
actions
.
send_sms
=
QAction
(
"Send SMS"
,
self
,
triggered
=
self
.
_AH_SendSMS
)
self
.
actions
.
send_files
=
QAction
(
"Send File(s)..."
,
self
,
triggered
=
self
.
_AH_SendFiles
)
self
.
actions
.
request_
remote_desktop
=
QAction
(
"Request Remote Desktop"
,
self
,
triggered
=
self
.
_AH_RequestRemoteDesktop
)
self
.
actions
.
share_my_
desktop
=
QAction
(
"Share My Desktop"
,
self
,
triggered
=
self
.
_AH_ShareMyDesktop
)
self
.
actions
.
request_
screen
=
QAction
(
"Request Screen"
,
self
,
triggered
=
self
.
_AH_RequestScreen
)
self
.
actions
.
share_my_
screen
=
QAction
(
"Share My Screen"
,
self
,
triggered
=
self
.
_AH_ShareMyScreen
)
self
.
drop_indicator_index
=
QModelIndex
()
self
.
needs_restore
=
False
self
.
doubleClicked
.
connect
(
self
.
_SH_DoubleClicked
)
# activated is emitted on single click
...
...
@@ -2832,10 +2832,8 @@ class ContactListView(QListView):
menu
.
addAction
(
self
.
actions
.
start_chat_session
)
menu
.
addAction
(
self
.
actions
.
send_sms
)
menu
.
addAction
(
self
.
actions
.
send_files
)
self
.
actions
.
request_remote_desktop
.
setText
(
"Request Desktop from
%
s"
%
(
contact
.
name
or
contact
.
uri
))
self
.
actions
.
share_my_desktop
.
setText
(
"Share My Desktop with
%
s"
%
(
contact
.
name
or
contact
.
uri
))
menu
.
addAction
(
self
.
actions
.
request_remote_desktop
)
menu
.
addAction
(
self
.
actions
.
share_my_desktop
)
menu
.
addAction
(
self
.
actions
.
request_screen
)
menu
.
addAction
(
self
.
actions
.
share_my_screen
)
menu
.
addSeparator
()
menu
.
addAction
(
self
.
actions
.
add_group
)
menu
.
addAction
(
self
.
actions
.
add_contact
)
...
...
@@ -2849,8 +2847,8 @@ class ContactListView(QListView):
self
.
actions
.
start_chat_session
.
setEnabled
(
False
)
self
.
actions
.
send_sms
.
setEnabled
(
False
)
self
.
actions
.
send_files
.
setEnabled
(
False
)
self
.
actions
.
request_
remote_desktop
.
setEnabled
(
False
)
self
.
actions
.
share_my_
desktop
.
setEnabled
(
False
)
self
.
actions
.
request_
screen
.
setEnabled
(
False
)
self
.
actions
.
share_my_
screen
.
setEnabled
(
False
)
self
.
actions
.
edit_item
.
setEnabled
(
contact
.
editable
)
self
.
actions
.
delete_item
.
setEnabled
(
contact
.
deletable
)
self
.
actions
.
undo_last_delete
.
setEnabled
(
len
(
model
.
deleted_items
)
>
0
)
...
...
@@ -3076,10 +3074,10 @@ class ContactListView(QListView):
def
_AH_SendFiles
(
self
):
pass
def
_AH_Request
RemoteDesktop
(
self
):
def
_AH_Request
Screen
(
self
):
pass
def
_AH_ShareMy
Desktop
(
self
):
def
_AH_ShareMy
Screen
(
self
):
pass
def
_DH_ApplicationXBlinkGroupList
(
self
,
event
,
index
,
rect
,
item
):
...
...
@@ -3180,8 +3178,8 @@ class ContactSearchListView(QListView):
self
.
actions
.
start_chat_session
=
QAction
(
"Start Chat Session"
,
self
,
triggered
=
self
.
_AH_StartChatSession
)
self
.
actions
.
send_sms
=
QAction
(
"Send SMS"
,
self
,
triggered
=
self
.
_AH_SendSMS
)
self
.
actions
.
send_files
=
QAction
(
"Send File(s)..."
,
self
,
triggered
=
self
.
_AH_SendFiles
)
self
.
actions
.
request_
remote_desktop
=
QAction
(
"Request Remote Desktop"
,
self
,
triggered
=
self
.
_AH_RequestRemoteDesktop
)
self
.
actions
.
share_my_
desktop
=
QAction
(
"Share My Desktop"
,
self
,
triggered
=
self
.
_AH_ShareMyDesktop
)
self
.
actions
.
request_
screen
=
QAction
(
"Request Screen"
,
self
,
triggered
=
self
.
_AH_RequestScreen
)
self
.
actions
.
share_my_
screen
=
QAction
(
"Share My Screen"
,
self
,
triggered
=
self
.
_AH_ShareMyScreen
)
self
.
drop_indicator_index
=
QModelIndex
()
self
.
doubleClicked
.
connect
(
self
.
_SH_DoubleClicked
)
# activated is emitted on single click
...
...
@@ -3234,10 +3232,8 @@ class ContactSearchListView(QListView):
menu
.
addAction
(
self
.
actions
.
start_chat_session
)
menu
.
addAction
(
self
.
actions
.
send_sms
)
menu
.
addAction
(
self
.
actions
.
send_files
)
self
.
actions
.
request_remote_desktop
.
setText
(
"Request Desktop from
%
s"
%
(
contact
.
name
or
contact
.
uri
))
self
.
actions
.
share_my_desktop
.
setText
(
"Share My Desktop with
%
s"
%
(
contact
.
name
or
contact
.
uri
))
menu
.
addAction
(
self
.
actions
.
request_remote_desktop
)
menu
.
addAction
(
self
.
actions
.
share_my_desktop
)
menu
.
addAction
(
self
.
actions
.
request_screen
)
menu
.
addAction
(
self
.
actions
.
share_my_screen
)
menu
.
addSeparator
()
menu
.
addAction
(
self
.
actions
.
edit_item
)
menu
.
addAction
(
self
.
actions
.
delete_item
)
...
...
@@ -3249,8 +3245,8 @@ class ContactSearchListView(QListView):
self
.
actions
.
start_chat_session
.
setEnabled
(
False
)
self
.
actions
.
send_sms
.
setEnabled
(
False
)
self
.
actions
.
send_files
.
setEnabled
(
False
)
self
.
actions
.
request_
remote_desktop
.
setEnabled
(
False
)
self
.
actions
.
share_my_
desktop
.
setEnabled
(
False
)
self
.
actions
.
request_
screen
.
setEnabled
(
False
)
self
.
actions
.
share_my_
screen
.
setEnabled
(
False
)
self
.
actions
.
edit_item
.
setEnabled
(
contact
.
editable
)
self
.
actions
.
delete_item
.
setEnabled
(
contact
.
deletable
)
self
.
actions
.
undo_last_delete
.
setEnabled
(
len
(
source_model
.
deleted_items
)
>
0
)
...
...
@@ -3412,10 +3408,10 @@ class ContactSearchListView(QListView):
def
_AH_SendFiles
(
self
):
pass
def
_AH_Request
RemoteDesktop
(
self
):
def
_AH_Request
Screen
(
self
):
pass
def
_AH_ShareMy
Desktop
(
self
):
def
_AH_ShareMy
Screen
(
self
):
pass
def
_DH_TextUriList
(
self
,
event
,
index
,
rect
,
item
):
...
...
@@ -3471,8 +3467,8 @@ class ContactDetailView(QListView):
self
.
actions
.
start_chat_session
=
QAction
(
"Start Chat Session"
,
self
,
triggered
=
self
.
_AH_StartChatSession
)
self
.
actions
.
send_sms
=
QAction
(
"Send SMS"
,
self
,
triggered
=
self
.
_AH_SendSMS
)
self
.
actions
.
send_files
=
QAction
(
"Send File(s)..."
,
self
,
triggered
=
self
.
_AH_SendFiles
)
self
.
actions
.
request_
remote_desktop
=
QAction
(
"Request Remote Desktop"
,
self
,
triggered
=
self
.
_AH_RequestRemoteDesktop
)
self
.
actions
.
share_my_
desktop
=
QAction
(
"Share My Desktop"
,
self
,
triggered
=
self
.
_AH_ShareMyDesktop
)
self
.
actions
.
request_
screen
=
QAction
(
"Request Screen"
,
self
,
triggered
=
self
.
_AH_RequestScreen
)
self
.
actions
.
share_my_
screen
=
QAction
(
"Share My Screen"
,
self
,
triggered
=
self
.
_AH_ShareMyScreen
)
self
.
doubleClicked
.
connect
(
self
.
_SH_DoubleClicked
)
# activated is emitted on single click
contact_list
.
installEventFilter
(
self
)
...
...
@@ -3504,18 +3500,15 @@ class ContactDetailView(QListView):
model
=
self
.
model
()
selected_indexes
=
self
.
selectionModel
()
.
selectedIndexes
()
selected_item
=
selected_indexes
[
0
]
.
data
(
Qt
.
UserRole
)
if
selected_indexes
else
None
name
=
selected_item
.
uri
.
uri
if
isinstance
(
selected_item
,
ContactURI
)
else
model
.
contact
.
name
contact_has_uris
=
model
.
rowCount
()
>
1
self
.
actions
.
request_remote_desktop
.
setText
(
"Request Desktop from
%
s"
%
name
)
self
.
actions
.
share_my_desktop
.
setText
(
"Share My Desktop with
%
s"
%
name
)
menu
=
self
.
context_menu
menu
.
clear
()
menu
.
addAction
(
self
.
actions
.
start_audio_session
)
menu
.
addAction
(
self
.
actions
.
start_chat_session
)
menu
.
addAction
(
self
.
actions
.
send_sms
)
menu
.
addAction
(
self
.
actions
.
send_files
)
menu
.
addAction
(
self
.
actions
.
request_
remote_desktop
)
menu
.
addAction
(
self
.
actions
.
share_my_
desktop
)
menu
.
addAction
(
self
.
actions
.
request_
screen
)
menu
.
addAction
(
self
.
actions
.
share_my_
screen
)
menu
.
addSeparator
()
if
isinstance
(
selected_item
,
ContactURI
)
and
model
.
contact_detail
.
editable
:
menu
.
addAction
(
self
.
actions
.
make_uri_default
)
...
...
@@ -3526,8 +3519,8 @@ class ContactDetailView(QListView):
self
.
actions
.
start_chat_session
.
setEnabled
(
False
)
self
.
actions
.
send_sms
.
setEnabled
(
False
)
self
.
actions
.
send_files
.
setEnabled
(
False
)
self
.
actions
.
request_
remote_desktop
.
setEnabled
(
False
)
self
.
actions
.
share_my_
desktop
.
setEnabled
(
False
)
self
.
actions
.
request_
screen
.
setEnabled
(
False
)
self
.
actions
.
share_my_
screen
.
setEnabled
(
False
)
self
.
actions
.
edit_contact
.
setEnabled
(
model
.
contact_detail
.
editable
)
self
.
actions
.
delete_contact
.
setEnabled
(
model
.
contact_detail
.
deletable
)
menu
.
exec_
(
event
.
globalPos
())
...
...
@@ -3616,10 +3609,10 @@ class ContactDetailView(QListView):
def
_AH_SendFiles
(
self
):
pass
def
_AH_Request
RemoteDesktop
(
self
):
def
_AH_Request
Screen
(
self
):
pass
def
_AH_ShareMy
Desktop
(
self
):
def
_AH_ShareMy
Screen
(
self
):
pass
def
_DH_ApplicationXBlinkSession
(
self
,
event
,
index
,
rect
,
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