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
103f948a
Commit
103f948a
authored
Jul 07, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SessionModel.active_sessions instead of recreating it
parent
e5e85c83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
mainwindow.py
blink/mainwindow.py
+6
-5
No files found.
blink/mainwindow.py
View file @
103f948a
...
...
@@ -340,7 +340,7 @@ class MainWindow(base_class, ui_class):
self
.
status
.
setCurrentIndex
(
self
.
status
.
findText
(
u'Offline'
))
def
_SH_MakeConference
(
self
):
self
.
session_model
.
conferenceSessions
([
session
for
session
in
self
.
session_model
.
sessions
if
session
.
conference
is
None
and
not
session
.
pending_removal
])
self
.
session_model
.
conferenceSessions
([
session
for
session
in
self
.
session_model
.
active_sessions
if
session
.
conference
is
None
])
def
_SH_MuteButtonClicked
(
self
,
muted
):
self
.
mute_action
.
setChecked
(
muted
)
...
...
@@ -387,7 +387,7 @@ class MainWindow(base_class, ui_class):
self
.
conference_button
.
setEnabled
(
True
)
self
.
conference_button
.
setChecked
(
True
)
else
:
self
.
conference_button
.
setEnabled
(
len
([
session
for
session
in
self
.
session_model
.
sessions
if
session
.
conference
is
None
and
not
session
.
pending_removal
])
>
1
)
self
.
conference_button
.
setEnabled
(
len
([
session
for
session
in
self
.
session_model
.
active_sessions
if
session
.
conference
is
None
])
>
1
)
self
.
conference_button
.
setChecked
(
False
)
def
_SH_SessionModelAddedSession
(
self
,
session_item
):
...
...
@@ -395,16 +395,17 @@ class MainWindow(base_class, ui_class):
self
.
search_box
.
clear
()
def
_SH_SessionModelChangedStructure
(
self
):
self
.
hangup_all_button
.
setEnabled
(
any
(
not
session
.
pending_removal
for
session
in
self
.
session_model
.
sessions
))
active_sessions
=
self
.
session_model
.
active_sessions
self
.
hangup_all_button
.
setEnabled
(
any
(
active_sessions
))
selected_indexes
=
self
.
session_list
.
selectionModel
()
.
selectedIndexes
()
active_session
=
self
.
session_model
.
data
(
selected_indexes
[
0
])
if
selected_indexes
else
Null
if
active_session
.
conference
:
self
.
conference_button
.
setEnabled
(
True
)
self
.
conference_button
.
setChecked
(
True
)
else
:
self
.
conference_button
.
setEnabled
(
len
([
session
for
session
in
self
.
session_model
.
sessions
if
session
.
conference
is
None
and
not
session
.
pending_removal
])
>
1
)
self
.
conference_button
.
setEnabled
(
len
([
session
for
session
in
active_sessions
if
session
.
conference
is
None
])
>
1
)
self
.
conference_button
.
setChecked
(
False
)
if
self
.
status
.
currentText
()
!=
u'Offline'
and
self
.
session_model
.
active_sessions
:
if
active_sessions
and
self
.
status
.
currentText
()
!=
u'Offline'
:
self
.
status
.
setCurrentIndex
(
self
.
status
.
findText
(
u'On the phone'
))
else
:
self
.
status
.
setCurrentIndex
(
self
.
idle_status_index
)
...
...
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