Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Justin Hornosty
gajim
Commits
4c24e292
Commit
4c24e292
authored
Jul 11, 2020
by
Justin Hornosty
Browse files
Make AvatarSize.ROSTER user configurable
parent
30d1d81e
Pipeline
#5923
failed with stages
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gajim/chat_control.py
View file @
4c24e292
...
...
@@ -1044,10 +1044,14 @@ class ChatControl(ChatControlBase):
return
label_str
def
get_tab_image
(
self
):
avatar_size_roster
=
app
.
config
.
get
(
'avatar_size_roster'
)
if
(
avatar_size_roster
==
-
1
):
avatar_size_roster
=
AvatarSize
.
ROSTER
scale
=
self
.
parent_win
.
window
.
get_scale_factor
()
return
app
.
contacts
.
get_avatar
(
self
.
account
,
self
.
contact
.
jid
,
A
vatar
S
ize
.
ROSTER
,
a
vatar
_s
ize
_roster
,
scale
,
self
.
contact
.
show
)
...
...
gajim/common/config.py
View file @
4c24e292
...
...
@@ -250,6 +250,7 @@ class Config:
'groupchat_roster_width'
:
[
opt_int
,
210
,
_
(
'Width of group chat roster in pixel'
)],
'dev_force_bookmark_2'
:
[
opt_bool
,
False
,
_
(
'Force Bookmark 2 usage'
)],
'show_help_start_chat'
:
[
opt_bool
,
True
,
_
(
'Shows an info bar with helpful hints in the Start / Join Chat dialog'
)],
'avatar_size_roster'
:
[
opt_int
,
-
1
,
_
(
'sets AvatarSize.ROSTER, -1 to disable and use defaults'
)],
},
{})
# type: Tuple[Dict[str, List[Any]], Dict[Any, Any]]
__options_per_key
=
{
...
...
gajim/groupchat_control.py
View file @
4c24e292
...
...
@@ -790,10 +790,14 @@ class GroupchatControl(ChatControlBase):
return
(
label_str
,
color
)
def
get_tab_image
(
self
):
avatar_size_roster
=
app
.
config
.
get
(
'avatar_size_roster'
)
if
(
avatar_size_roster
==
-
1
):
avatar_size_roster
=
AvatarSize
.
ROSTER
return
app
.
interface
.
avatar_storage
.
get_muc_surface
(
self
.
account
,
self
.
contact
.
jid
,
A
vatar
S
ize
.
ROSTER
,
a
vatar
_s
ize
_roster
,
self
.
scale_factor
)
def
_update_banner_state_image
(
self
):
...
...
gajim/roster_window.py
View file @
4c24e292
...
...
@@ -1343,9 +1343,14 @@ class RosterWindow:
def
_get_avatar_image
(
self
,
account
,
jid
):
if
not
app
.
config
.
get
(
'show_avatars_in_roster'
):
return
None
avatar_size_roster
=
app
.
config
.
get
(
'avatar_size_roster'
)
if
(
avatar_size_roster
==
-
1
):
avatar_size_roster
=
AvatarSize
.
ROSTER
scale
=
self
.
window
.
get_scale_factor
()
surface
=
app
.
contacts
.
get_avatar
(
account
,
jid
,
A
vatar
S
ize
.
ROSTER
,
scale
)
account
,
jid
,
a
vatar
_s
ize
_roster
,
scale
)
return
Gtk
.
Image
.
new_from_surface
(
surface
)
def
draw_avatar
(
self
,
jid
,
account
):
...
...
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