prevent some traceback. see #7152
This commit is contained in:
parent
fe3ccb1234
commit
d8f1eb99cb
|
@ -5059,7 +5059,10 @@ class RosterWindow:
|
|||
"""
|
||||
When a row is added, set properties for icon renderer
|
||||
"""
|
||||
type_ = model[titer][C_TYPE]
|
||||
try:
|
||||
type_ = model[titer][C_TYPE]
|
||||
except TypeError:
|
||||
return
|
||||
if type_ == 'account':
|
||||
self._set_account_row_background_color(renderer)
|
||||
renderer.set_property('xalign', 0)
|
||||
|
@ -5089,8 +5092,11 @@ class RosterWindow:
|
|||
"""
|
||||
When a row is added, set properties for name renderer
|
||||
"""
|
||||
try:
|
||||
type_ = model[titer][C_TYPE]
|
||||
except TypeError:
|
||||
return
|
||||
theme = gajim.config.get('roster_theme')
|
||||
type_ = model[titer][C_TYPE]
|
||||
if type_ == 'account':
|
||||
color = gajim.config.get_per('themes', theme, 'accounttextcolor')
|
||||
if color:
|
||||
|
@ -5152,7 +5158,10 @@ class RosterWindow:
|
|||
"""
|
||||
When a row is added, draw the respective pep icon
|
||||
"""
|
||||
type_ = model[titer][C_TYPE]
|
||||
try:
|
||||
type_ = model[titer][C_TYPE]
|
||||
except TypeError:
|
||||
return
|
||||
|
||||
# allocate space for the icon only if needed
|
||||
if not model[titer][data]:
|
||||
|
@ -5176,7 +5185,11 @@ class RosterWindow:
|
|||
"""
|
||||
When a row is added, set properties for avatar renderer
|
||||
"""
|
||||
type_ = model[titer][C_TYPE]
|
||||
try:
|
||||
type_ = model[titer][C_TYPE]
|
||||
except TypeError:
|
||||
return
|
||||
|
||||
if type_ in ('group', 'account'):
|
||||
renderer.set_property('visible', False)
|
||||
return
|
||||
|
@ -5208,7 +5221,11 @@ class RosterWindow:
|
|||
"""
|
||||
When a row is added, set properties for padlock renderer
|
||||
"""
|
||||
type_ = model[titer][C_TYPE]
|
||||
try:
|
||||
type_ = model[titer][C_TYPE]
|
||||
except TypeError:
|
||||
return
|
||||
|
||||
# allocate space for the icon only if needed
|
||||
if type_ == 'account' and model[titer][C_PADLOCK_PIXBUF]:
|
||||
renderer.set_property('visible', True)
|
||||
|
|
Loading…
Reference in New Issue