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
5996ec56
Commit
5996ec56
authored
Jul 06, 2010
by
Luci Stanescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearranged audio device menus
parent
8affa9da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
mainwindow.py
blink/mainwindow.py
+21
-12
No files found.
blink/mainwindow.py
View file @
5996ec56
...
@@ -182,44 +182,53 @@ class MainWindow(base_class, ui_class):
...
@@ -182,44 +182,53 @@ class MainWindow(base_class, ui_class):
def
load_audio_devices
(
self
):
def
load_audio_devices
(
self
):
settings
=
SIPSimpleSettings
()
settings
=
SIPSimpleSettings
()
action
=
QAction
(
u'Dummy'
,
self
.
output_devices_group
)
action
.
setData
(
QVariant
(
None
))
action
=
QAction
(
u'System default'
,
self
.
output_devices_group
)
action
=
QAction
(
u'System default'
,
self
.
output_devices_group
)
action
.
setData
(
QVariant
(
u'system_default'
))
action
.
setData
(
QVariant
(
u'system_default'
))
self
.
output_device_menu
.
addAction
(
action
)
self
.
output_device_menu
.
addSeparator
()
for
device
in
SIPApplication
.
engine
.
output_devices
:
for
device
in
SIPApplication
.
engine
.
output_devices
:
action
=
QAction
(
device
,
self
.
output_devices_group
)
action
=
QAction
(
device
,
self
.
output_devices_group
)
action
.
setData
(
QVariant
(
device
))
action
.
setData
(
QVariant
(
device
))
self
.
output_device_menu
.
addAction
(
action
)
action
=
QAction
(
u'None'
,
self
.
output_devices_group
)
action
.
setData
(
QVariant
(
None
))
self
.
output_device_menu
.
addAction
(
action
)
for
action
in
self
.
output_devices_group
.
actions
():
for
action
in
self
.
output_devices_group
.
actions
():
action
.
setCheckable
(
True
)
action
.
setCheckable
(
True
)
if
settings
.
audio
.
output_device
==
action
.
data
()
.
toPyObject
():
if
settings
.
audio
.
output_device
==
action
.
data
()
.
toPyObject
():
action
.
setChecked
(
True
)
action
.
setChecked
(
True
)
self
.
output_device_menu
.
addActions
(
self
.
output_devices_group
.
actions
())
action
=
QAction
(
u'Dummy'
,
self
.
input_devices_group
)
action
.
setData
(
QVariant
(
None
))
action
=
QAction
(
u'System default'
,
self
.
input_devices_group
)
action
=
QAction
(
u'System default'
,
self
.
input_devices_group
)
action
.
setData
(
QVariant
(
u'system_default'
))
action
.
setData
(
QVariant
(
u'system_default'
))
self
.
input_device_menu
.
addAction
(
action
)
self
.
input_device_menu
.
addSeparator
()
for
device
in
SIPApplication
.
engine
.
input_devices
:
for
device
in
SIPApplication
.
engine
.
input_devices
:
action
=
QAction
(
device
,
self
.
input_devices_group
)
action
=
QAction
(
device
,
self
.
input_devices_group
)
action
.
setData
(
QVariant
(
device
))
action
.
setData
(
QVariant
(
device
))
self
.
input_device_menu
.
addAction
(
action
)
action
=
QAction
(
u'None'
,
self
.
input_devices_group
)
action
.
setData
(
QVariant
(
None
))
self
.
input_device_menu
.
addAction
(
action
)
for
action
in
self
.
input_devices_group
.
actions
():
for
action
in
self
.
input_devices_group
.
actions
():
action
.
setCheckable
(
True
)
action
.
setCheckable
(
True
)
if
settings
.
audio
.
input_device
==
action
.
data
()
.
toPyObject
():
if
settings
.
audio
.
input_device
==
action
.
data
()
.
toPyObject
():
action
.
setChecked
(
True
)
action
.
setChecked
(
True
)
self
.
input_device_menu
.
addActions
(
self
.
input_devices_group
.
actions
())
action
=
QAction
(
u'Dummy'
,
self
.
alert_devices_group
)
action
.
setData
(
QVariant
(
None
))
action
=
QAction
(
u'System default'
,
self
.
alert_devices_group
)
action
=
QAction
(
u'System default'
,
self
.
alert_devices_group
)
action
.
setData
(
QVariant
(
u'system_default'
))
action
.
setData
(
QVariant
(
u'system_default'
))
self
.
alert_device_menu
.
addAction
(
action
)
self
.
alert_device_menu
.
addSeparator
()
for
device
in
SIPApplication
.
engine
.
output_devices
:
for
device
in
SIPApplication
.
engine
.
output_devices
:
action
=
QAction
(
device
,
self
.
alert_devices_group
)
action
=
QAction
(
device
,
self
.
alert_devices_group
)
action
.
setData
(
QVariant
(
device
))
action
.
setData
(
QVariant
(
device
))
self
.
alert_device_menu
.
addAction
(
action
)
action
=
QAction
(
u'None'
,
self
.
alert_devices_group
)
action
.
setData
(
QVariant
(
None
))
self
.
alert_device_menu
.
addAction
(
action
)
for
action
in
self
.
alert_devices_group
.
actions
():
for
action
in
self
.
alert_devices_group
.
actions
():
action
.
setCheckable
(
True
)
action
.
setCheckable
(
True
)
if
settings
.
audio
.
alert_device
==
action
.
data
()
.
toPyObject
():
if
settings
.
audio
.
alert_device
==
action
.
data
()
.
toPyObject
():
action
.
setChecked
(
True
)
action
.
setChecked
(
True
)
self
.
alert_device_menu
.
addActions
(
self
.
alert_devices_group
.
actions
())
def
_SH_AccountActionTriggered
(
self
,
action
,
enabled
):
def
_SH_AccountActionTriggered
(
self
,
action
,
enabled
):
account
=
action
.
data
()
.
toPyObject
()
account
=
action
.
data
()
.
toPyObject
()
...
@@ -443,13 +452,13 @@ class MainWindow(base_class, ui_class):
...
@@ -443,13 +452,13 @@ class MainWindow(base_class, ui_class):
self
.
load_audio_devices
()
self
.
load_audio_devices
()
def
_NH_AudioDevicesDidChange
(
self
,
notification
):
def
_NH_AudioDevicesDidChange
(
self
,
notification
):
for
action
in
self
.
output_device
s_group
.
actions
():
for
action
in
self
.
output_device
_menu
.
actions
():
self
.
output_devices_group
.
removeAction
(
action
)
self
.
output_devices_group
.
removeAction
(
action
)
self
.
output_device_menu
.
removeAction
(
action
)
self
.
output_device_menu
.
removeAction
(
action
)
for
action
in
self
.
input_device
s_group
.
actions
():
for
action
in
self
.
input_device
_menu
.
actions
():
self
.
input_devices_group
.
removeAction
(
action
)
self
.
input_devices_group
.
removeAction
(
action
)
self
.
input_device_menu
.
removeAction
(
action
)
self
.
input_device_menu
.
removeAction
(
action
)
for
action
in
self
.
alert_device
s_group
.
actions
():
for
action
in
self
.
alert_device
_menu
.
actions
():
self
.
alert_devices_group
.
removeAction
(
action
)
self
.
alert_devices_group
.
removeAction
(
action
)
self
.
alert_device_menu
.
removeAction
(
action
)
self
.
alert_device_menu
.
removeAction
(
action
)
self
.
load_audio_devices
()
self
.
load_audio_devices
()
...
...
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