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
63a3dd7e
Commit
63a3dd7e
authored
Apr 10, 2014
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added quick setting for playing message alerts
parent
ae481c48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
mainwindow.py
blink/mainwindow.py
+9
-0
preferences.py
blink/preferences.py
+2
-0
blink.ui
resources/blink.ui
+9
-0
No files found.
blink/mainwindow.py
View file @
63a3dd7e
...
@@ -179,6 +179,7 @@ class MainWindow(base_class, ui_class):
...
@@ -179,6 +179,7 @@ class MainWindow(base_class, ui_class):
self
.
help_action
.
triggered
.
connect
(
partial
(
QDesktopServices
.
openUrl
,
QUrl
(
u'http://icanblink.com/help-qt.phtml'
)))
self
.
help_action
.
triggered
.
connect
(
partial
(
QDesktopServices
.
openUrl
,
QUrl
(
u'http://icanblink.com/help-qt.phtml'
)))
self
.
preferences_action
.
triggered
.
connect
(
self
.
preferences_window
.
show
)
self
.
preferences_action
.
triggered
.
connect
(
self
.
preferences_window
.
show
)
self
.
auto_accept_chat_action
.
triggered
.
connect
(
self
.
_AH_AutoAcceptChatActionTriggered
)
self
.
auto_accept_chat_action
.
triggered
.
connect
(
self
.
_AH_AutoAcceptChatActionTriggered
)
self
.
received_messages_sound_action
.
triggered
.
connect
(
self
.
_AH_ReceivedMessagesSoundActionTriggered
)
self
.
answering_machine_action
.
triggered
.
connect
(
self
.
_AH_EnableAnsweringMachineActionTriggered
)
self
.
answering_machine_action
.
triggered
.
connect
(
self
.
_AH_EnableAnsweringMachineActionTriggered
)
self
.
release_notes_action
.
triggered
.
connect
(
partial
(
QDesktopServices
.
openUrl
,
QUrl
(
u'http://icanblink.com/changelog-qt.phtml'
)))
self
.
release_notes_action
.
triggered
.
connect
(
partial
(
QDesktopServices
.
openUrl
,
QUrl
(
u'http://icanblink.com/changelog-qt.phtml'
)))
self
.
quit_action
.
triggered
.
connect
(
self
.
_AH_QuitActionTriggered
)
self
.
quit_action
.
triggered
.
connect
(
self
.
_AH_QuitActionTriggered
)
...
@@ -328,6 +329,11 @@ class MainWindow(base_class, ui_class):
...
@@ -328,6 +329,11 @@ class MainWindow(base_class, ui_class):
settings
.
chat
.
auto_accept
=
checked
settings
.
chat
.
auto_accept
=
checked
settings
.
save
()
settings
.
save
()
def
_AH_ReceivedMessagesSoundActionTriggered
(
self
,
checked
):
settings
=
SIPSimpleSettings
()
settings
.
sounds
.
play_message_alerts
=
checked
settings
.
save
()
def
_AH_EnableAnsweringMachineActionTriggered
(
self
,
checked
):
def
_AH_EnableAnsweringMachineActionTriggered
(
self
,
checked
):
settings
=
SIPSimpleSettings
()
settings
=
SIPSimpleSettings
()
settings
.
answering_machine
.
enabled
=
checked
settings
.
answering_machine
.
enabled
=
checked
...
@@ -661,6 +667,7 @@ class MainWindow(base_class, ui_class):
...
@@ -661,6 +667,7 @@ class MainWindow(base_class, ui_class):
self
.
silent_button
.
setChecked
(
settings
.
audio
.
silent
)
self
.
silent_button
.
setChecked
(
settings
.
audio
.
silent
)
self
.
answering_machine_action
.
setChecked
(
settings
.
answering_machine
.
enabled
)
self
.
answering_machine_action
.
setChecked
(
settings
.
answering_machine
.
enabled
)
self
.
auto_accept_chat_action
.
setChecked
(
settings
.
chat
.
auto_accept
)
self
.
auto_accept_chat_action
.
setChecked
(
settings
.
chat
.
auto_accept
)
self
.
received_messages_sound_action
.
setChecked
(
settings
.
sounds
.
play_message_alerts
)
if
settings
.
google_contacts
.
authorization_token
is
None
:
if
settings
.
google_contacts
.
authorization_token
is
None
:
self
.
google_contacts_action
.
setText
(
u'Enable &Google Contacts...'
)
self
.
google_contacts_action
.
setText
(
u'Enable &Google Contacts...'
)
else
:
else
:
...
@@ -726,6 +733,8 @@ class MainWindow(base_class, ui_class):
...
@@ -726,6 +733,8 @@ class MainWindow(base_class, ui_class):
self
.
answering_machine_action
.
setChecked
(
settings
.
answering_machine
.
enabled
)
self
.
answering_machine_action
.
setChecked
(
settings
.
answering_machine
.
enabled
)
if
'chat.auto_accept'
in
notification
.
data
.
modified
:
if
'chat.auto_accept'
in
notification
.
data
.
modified
:
self
.
auto_accept_chat_action
.
setChecked
(
settings
.
chat
.
auto_accept
)
self
.
auto_accept_chat_action
.
setChecked
(
settings
.
chat
.
auto_accept
)
if
'sounds.play_message_alerts'
in
notification
.
data
.
modified
:
self
.
received_messages_sound_action
.
setChecked
(
settings
.
sounds
.
play_message_alerts
)
if
'google_contacts.authorization_token'
in
notification
.
data
.
modified
:
if
'google_contacts.authorization_token'
in
notification
.
data
.
modified
:
authorization_token
=
notification
.
sender
.
google_contacts
.
authorization_token
authorization_token
=
notification
.
sender
.
google_contacts
.
authorization_token
if
authorization_token
is
None
:
if
authorization_token
is
None
:
...
...
blink/preferences.py
View file @
63a3dd7e
...
@@ -1473,6 +1473,8 @@ class PreferencesWindow(base_class, ui_class):
...
@@ -1473,6 +1473,8 @@ class PreferencesWindow(base_class, ui_class):
self
.
enable_answering_machine_button
.
setChecked
(
settings
.
answering_machine
.
enabled
)
self
.
enable_answering_machine_button
.
setChecked
(
settings
.
answering_machine
.
enabled
)
if
'chat.auto_accept'
in
notification
.
data
.
modified
:
if
'chat.auto_accept'
in
notification
.
data
.
modified
:
self
.
auto_accept_chat_button
.
setChecked
(
settings
.
chat
.
auto_accept
)
self
.
auto_accept_chat_button
.
setChecked
(
settings
.
chat
.
auto_accept
)
if
'sounds.play_message_alerts'
in
notification
.
data
.
modified
:
self
.
chat_message_alert_button
.
setChecked
(
settings
.
sounds
.
play_message_alerts
)
elif
notification
.
sender
is
self
.
selected_account
is
not
None
:
elif
notification
.
sender
is
self
.
selected_account
is
not
None
:
account
=
notification
.
sender
account
=
notification
.
sender
if
'enabled'
in
notification
.
data
.
modified
:
if
'enabled'
in
notification
.
data
.
modified
:
...
...
resources/blink.ui
View file @
63a3dd7e
...
@@ -949,6 +949,7 @@ padding: 2px;</string>
...
@@ -949,6 +949,7 @@ padding: 2px;</string>
</property>
</property>
<addaction
name=
"auto_accept_chat_action"
/>
<addaction
name=
"auto_accept_chat_action"
/>
<addaction
name=
"answering_machine_action"
/>
<addaction
name=
"answering_machine_action"
/>
<addaction
name=
"received_messages_sound_action"
/>
</widget>
</widget>
<addaction
name=
"about_action"
/>
<addaction
name=
"about_action"
/>
<addaction
name=
"check_for_updates_action"
/>
<addaction
name=
"check_for_updates_action"
/>
...
@@ -1253,6 +1254,14 @@ padding: 2px;</string>
...
@@ -1253,6 +1254,14 @@ padding: 2px;</string>
<enum>
Qt::ApplicationShortcut
</enum>
<enum>
Qt::ApplicationShortcut
</enum>
</property>
</property>
</action>
</action>
<action
name=
"received_messages_sound_action"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Play a sound for
&
received messages
</string>
</property>
</action>
</widget>
</widget>
<customwidgets>
<customwidgets>
<customwidget>
<customwidget>
...
...
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