A few Deprecation warnings handled
This commit is contained in:
parent
55c99fe718
commit
d77f0562e8
@ -71,8 +71,9 @@ from ..actiongroup import ActionGroup
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
if has_display():
|
if has_display():
|
||||||
HAND_CURSOR = Gdk.Cursor.new(Gdk.CursorType.HAND2)
|
display = Gdk.Display.get_default()
|
||||||
REGULAR_CURSOR = Gdk.Cursor.new(Gdk.CursorType.XTERM)
|
HAND_CURSOR = Gdk.Cursor.new_for_display(display, Gdk.CursorType.HAND2)
|
||||||
|
REGULAR_CURSOR = Gdk.Cursor.new_for_display(display, Gdk.CursorType.XTERM)
|
||||||
|
|
||||||
FORMAT_TOOLBAR = '''
|
FORMAT_TOOLBAR = '''
|
||||||
<ui>
|
<ui>
|
||||||
|
@ -289,7 +289,7 @@ class VCardParser:
|
|||||||
# Included cause VCards made by Gramps have this prop.
|
# Included cause VCards made by Gramps have this prop.
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
LOG.warn("Token >%s< unknown. line skipped: %s" %
|
LOG.warning("Token >%s< unknown. line skipped: %s" %
|
||||||
(fields[0],line))
|
(fields[0],line))
|
||||||
|
|
||||||
def finish_person(self):
|
def finish_person(self):
|
||||||
@ -303,8 +303,8 @@ class VCardParser:
|
|||||||
"""A VCard for another person is started."""
|
"""A VCard for another person is started."""
|
||||||
if self.person is not None:
|
if self.person is not None:
|
||||||
self.finish_person()
|
self.finish_person()
|
||||||
LOG.warn("BEGIN property not properly closed by END property, "
|
LOG.warning("BEGIN property not properly closed by END property, "
|
||||||
"Gramps can't cope with nested VCards.")
|
"Gramps can't cope with nested VCards.")
|
||||||
self.person = Person()
|
self.person = Person()
|
||||||
self.formatted_name = ''
|
self.formatted_name = ''
|
||||||
self.name_parts = ''
|
self.name_parts = ''
|
||||||
@ -333,15 +333,15 @@ class VCardParser:
|
|||||||
Returns True on success, False on failure.
|
Returns True on success, False on failure.
|
||||||
"""
|
"""
|
||||||
if not self.name_parts.strip():
|
if not self.name_parts.strip():
|
||||||
LOG.warn("VCard is malformed missing the compulsory N property, "
|
LOG.warning("VCard is malformed missing the compulsory N property,"
|
||||||
"so there is no name; skip it.")
|
" so there is no name; skip it.")
|
||||||
return False
|
return False
|
||||||
if not self.formatted_name:
|
if not self.formatted_name:
|
||||||
LOG.warn("VCard is malformed missing the compulsory FN property, "
|
LOG.warning("VCard is malformed missing the compulsory FN property"
|
||||||
"get name from N alone.")
|
", get name from N alone.")
|
||||||
data_fields = self.split_unescaped(self.name_parts, ';')
|
data_fields = self.split_unescaped(self.name_parts, ';')
|
||||||
if len(data_fields) != 5:
|
if len(data_fields) != 5:
|
||||||
LOG.warn("VCard is malformed wrong number of name components.")
|
LOG.warning("VCard is malformed wrong number of name components.")
|
||||||
|
|
||||||
name = Name()
|
name = Name()
|
||||||
name.set_type(NameType(NameType.BIRTH))
|
name.set_type(NameType(NameType.BIRTH))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user