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