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
861667d0
Commit
861667d0
authored
Jul 08, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show active sessions indicator while in contacts panel
parent
62066c58
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
mainwindow.py
blink/mainwindow.py
+3
-0
blink.ui
resources/blink.ui
+28
-2
No files found.
blink/mainwindow.py
View file @
861667d0
...
@@ -44,6 +44,7 @@ class MainWindow(base_class, ui_class):
...
@@ -44,6 +44,7 @@ class MainWindow(base_class, ui_class):
self
.
set_user_icon
(
Resources
.
get
(
"icons/default-avatar.png"
))
# ":/resources/icons/default-avatar.png"
self
.
set_user_icon
(
Resources
.
get
(
"icons/default-avatar.png"
))
# ":/resources/icons/default-avatar.png"
self
.
enable_call_buttons
(
False
)
self
.
enable_call_buttons
(
False
)
self
.
active_sessions_label
.
hide
()
self
.
account_model
=
AccountModel
(
self
)
self
.
account_model
=
AccountModel
(
self
)
self
.
enabled_account_model
=
ActiveAccountModel
(
self
.
account_model
,
self
)
self
.
enabled_account_model
=
ActiveAccountModel
(
self
.
account_model
,
self
)
...
@@ -393,6 +394,8 @@ class MainWindow(base_class, ui_class):
...
@@ -393,6 +394,8 @@ class MainWindow(base_class, ui_class):
def
_SH_SessionModelChangedStructure
(
self
):
def
_SH_SessionModelChangedStructure
(
self
):
active_sessions
=
self
.
session_model
.
active_sessions
active_sessions
=
self
.
session_model
.
active_sessions
self
.
active_sessions_label
.
setText
(
u'There is 1 active call'
if
len
(
active_sessions
)
==
1
else
u'There are
%
d active calls'
%
len
(
active_sessions
))
self
.
active_sessions_label
.
setVisible
(
any
(
active_sessions
))
self
.
hangup_all_button
.
setEnabled
(
any
(
active_sessions
))
self
.
hangup_all_button
.
setEnabled
(
any
(
active_sessions
))
selected_indexes
=
self
.
session_list
.
selectionModel
()
.
selectedIndexes
()
selected_indexes
=
self
.
session_list
.
selectionModel
()
.
selectedIndexes
()
active_session
=
self
.
session_model
.
data
(
selected_indexes
[
0
])
if
selected_indexes
else
Null
active_session
=
self
.
session_model
.
data
(
selected_indexes
[
0
])
if
selected_indexes
else
Null
...
...
resources/blink.ui
View file @
861667d0
...
@@ -281,7 +281,7 @@
...
@@ -281,7 +281,7 @@
<item>
<item>
<widget
class=
"QStackedWidget"
name=
"main_view"
>
<widget
class=
"QStackedWidget"
name=
"main_view"
>
<property
name=
"currentIndex"
>
<property
name=
"currentIndex"
>
<number>
1
</number>
<number>
0
</number>
</property>
</property>
<widget
class=
"QWidget"
name=
"contacts_panel"
>
<widget
class=
"QWidget"
name=
"contacts_panel"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_8"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_8"
>
...
@@ -294,7 +294,7 @@
...
@@ -294,7 +294,7 @@
<item>
<item>
<widget
class=
"QStackedWidget"
name=
"contacts_view"
>
<widget
class=
"QStackedWidget"
name=
"contacts_view"
>
<property
name=
"currentIndex"
>
<property
name=
"currentIndex"
>
<number>
1
</number>
<number>
0
</number>
</property>
</property>
<widget
class=
"QWidget"
name=
"contact_list_panel"
>
<widget
class=
"QWidget"
name=
"contact_list_panel"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
...
@@ -489,6 +489,32 @@ buttons below.</string>
...
@@ -489,6 +489,32 @@ buttons below.</string>
</widget>
</widget>
</widget>
</widget>
</item>
</item>
<item>
<widget
class=
"QLabel"
name=
"active_sessions_label"
>
<property
name=
"font"
>
<font>
<family>
Sans Serif
</family>
</font>
</property>
<property
name=
"styleSheet"
>
<string>
background-color: #a0003a;
border-style: outset;
border-width: 1px;
border-radius: 3px;
border-color: #800040;
color: white;
margin-left: 1px;
margin-right: 1px;
padding: 2px;
</string>
</property>
<property
name=
"text"
>
<string>
There are active calls
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item>
<item>
<layout
class=
"QHBoxLayout"
name=
"contact_buttonbox_layout"
>
<layout
class=
"QHBoxLayout"
name=
"contact_buttonbox_layout"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
...
...
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