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
1752d1af
Commit
1752d1af
authored
Apr 07, 2014
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added chat preferences
parent
2ca9570e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
525 additions
and
75 deletions
+525
-75
chatwindow.py
blink/chatwindow.py
+84
-30
datatypes.py
blink/configuration/datatypes.py
+13
-1
settings.py
blink/configuration/settings.py
+18
-1
preferences.py
blink/preferences.py
+195
-10
avatar-nate.png
resources/icons/avatar-nate.png
+0
-0
avatar-ruby.png
resources/icons/avatar-ruby.png
+0
-0
preferences.ui
resources/preferences.ui
+215
-33
No files found.
blink/chatwindow.py
View file @
1752d1af
This diff is collapsed.
Click to expand it.
blink/configuration/datatypes.py
View file @
1752d1af
...
...
@@ -3,7 +3,8 @@
"""Definitions for datatypes used in configuration extensions."""
__all__
=
[
'ApplicationDataPath'
,
'DefaultPath'
,
'SoundFile'
,
'CustomSoundFile'
,
'HTTPURL'
,
'FileURL'
,
'AuthorizationToken'
,
'InvalidToken'
,
'IconDescriptor'
,
'PresenceState'
,
'PresenceStateList'
]
__all__
=
[
'ApplicationDataPath'
,
'DefaultPath'
,
'SoundFile'
,
'CustomSoundFile'
,
'HTTPURL'
,
'FileURL'
,
'AuthorizationToken'
,
'InvalidToken'
,
'IconDescriptor'
,
'PresenceState'
,
'PresenceStateList'
,
'GraphTimeScale'
]
import
os
import
re
...
...
@@ -223,3 +224,14 @@ class PresenceStateList(List):
type
=
PresenceState
class
GraphTimeScale
(
int
):
min_value
=
2
max_value
=
4
def
__new__
(
cls
,
value
):
value
=
int
(
value
)
if
not
(
cls
.
min_value
<=
value
<=
cls
.
max_value
):
raise
ValueError
(
"expected an integer number between
%
d and
%
d, found
%
d"
%
(
cls
.
min_value
,
cls
.
max_value
,
value
))
return
value
blink/configuration/settings.py
View file @
1752d1af
...
...
@@ -14,7 +14,7 @@ from sipsimple.configuration.datatypes import AudioCodecList, NonNegativeInteger
from
sipsimple.configuration.settings
import
AudioSettings
,
ChatSettings
,
EchoCancellerSettings
,
FileTransferSettings
,
LogsSettings
,
RTPSettings
,
TLSSettings
from
blink
import
__version__
from
blink.configuration.datatypes
import
ApplicationDataPath
,
AuthorizationToken
,
HTTPURL
,
IconDescriptor
,
SoundFile
,
PresenceState
,
PresenceStateList
from
blink.configuration.datatypes
import
ApplicationDataPath
,
AuthorizationToken
,
GraphTimeScale
,
HTTPURL
,
IconDescriptor
,
SoundFile
,
PresenceState
,
PresenceStateList
from
blink.resources
import
Resources
...
...
@@ -98,6 +98,22 @@ class SIPSimpleSettingsExtension(SettingsObjectExtension):
user_agent
=
Setting
(
type
=
str
,
default
=
'Blink
%
s (
%
s)'
%
(
__version__
,
platform
.
system
()
if
sys
.
platform
!=
'darwin'
else
'MacOSX Qt'
))
class
SessionInfoSettings
(
SettingsGroup
):
alternate_style
=
Setting
(
type
=
bool
,
default
=
False
)
bytes_per_second
=
Setting
(
type
=
bool
,
default
=
False
)
graph_time_scale
=
Setting
(
type
=
GraphTimeScale
,
default
=
3
)
class
ChatWindowSettings
(
SettingsGroup
):
session_info
=
SessionInfoSettings
style
=
Setting
(
type
=
str
,
default
=
'Stockholm'
)
style_variant
=
Setting
(
type
=
str
,
default
=
None
,
nillable
=
True
)
show_user_icons
=
Setting
(
type
=
bool
,
default
=
True
)
font
=
Setting
(
type
=
str
,
default
=
None
,
nillable
=
True
)
font_size
=
Setting
(
type
=
int
,
default
=
None
,
nillable
=
True
)
class
BlinkPresenceSettings
(
SettingsGroup
):
current_state
=
Setting
(
type
=
PresenceState
,
default
=
PresenceState
(
'Available'
))
state_history
=
Setting
(
type
=
PresenceStateList
,
default
=
PresenceStateList
())
...
...
@@ -108,5 +124,6 @@ class BlinkPresenceSettings(SettingsGroup):
class
BlinkSettings
(
SettingsObject
):
__id__
=
'BlinkSettings'
chat_window
=
ChatWindowSettings
presence
=
BlinkPresenceSettings
blink/preferences.py
View file @
1752d1af
This diff is collapsed.
Click to expand it.
resources/icons/avatar-nate.png
0 → 100644
View file @
1752d1af
7.99 KB
resources/icons/avatar-ruby.png
0 → 100644
View file @
1752d1af
7.57 KB
resources/preferences.ui
View file @
1752d1af
This diff is collapsed.
Click to expand it.
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