sync a few files in gramps40 and trunk
svn: r21604
This commit is contained in:
parent
1a5ad3b6f7
commit
af3e34fef5
@ -760,7 +760,8 @@ class DbBsddbRead(DbReadBase, Callback):
|
|||||||
return self.get_from_handle(handle, Tag, self.tag_map)
|
return self.get_from_handle(handle, Tag, self.tag_map)
|
||||||
|
|
||||||
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
||||||
if isinstance(tbl, dict): return None ## trying to get object too early
|
if isinstance(tbl, dict):
|
||||||
|
return None ## trying to get object too early
|
||||||
if isinstance(val, UNITYPE):
|
if isinstance(val, UNITYPE):
|
||||||
val = val.encode('utf-8')
|
val = val.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
@ -1529,6 +1530,8 @@ class DbBsddbRead(DbReadBase, Callback):
|
|||||||
"""
|
"""
|
||||||
Helper method for get_raw_<object>_data methods
|
Helper method for get_raw_<object>_data methods
|
||||||
"""
|
"""
|
||||||
|
if table is None:
|
||||||
|
return None ## trying to get object too early
|
||||||
if isinstance(handle, UNITYPE):
|
if isinstance(handle, UNITYPE):
|
||||||
handle = handle.encode('utf-8')
|
handle = handle.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
|
@ -377,7 +377,6 @@ class PluginData(object):
|
|||||||
self._toolclass = None
|
self._toolclass = None
|
||||||
self._tool_modes = [TOOL_MODE_GUI]
|
self._tool_modes = [TOOL_MODE_GUI]
|
||||||
#DOCGEN attr
|
#DOCGEN attr
|
||||||
self._basedocclass = None
|
|
||||||
self._paper = True
|
self._paper = True
|
||||||
self._style = True
|
self._style = True
|
||||||
self._extension = ''
|
self._extension = ''
|
||||||
@ -679,14 +678,6 @@ class PluginData(object):
|
|||||||
tool_modes = property(_get_tool_modes, _set_tool_modes)
|
tool_modes = property(_get_tool_modes, _set_tool_modes)
|
||||||
|
|
||||||
#DOCGEN attributes
|
#DOCGEN attributes
|
||||||
def _set_basedocclass(self, basedocclass):
|
|
||||||
if not self._ptype == DOCGEN:
|
|
||||||
raise ValueError('basedocclass may only be set for DOCGEN plugins')
|
|
||||||
self._basedocclass = basedocclass
|
|
||||||
|
|
||||||
def _get_basedocclass(self):
|
|
||||||
return self._basedocclass
|
|
||||||
|
|
||||||
def _set_paper(self, paper):
|
def _set_paper(self, paper):
|
||||||
if not self._ptype == DOCGEN:
|
if not self._ptype == DOCGEN:
|
||||||
raise ValueError('paper may only be set for DOCGEN plugins')
|
raise ValueError('paper may only be set for DOCGEN plugins')
|
||||||
@ -717,7 +708,6 @@ class PluginData(object):
|
|||||||
def _get_extension(self):
|
def _get_extension(self):
|
||||||
return self._extension
|
return self._extension
|
||||||
|
|
||||||
basedocclass = property(_get_basedocclass, _set_basedocclass)
|
|
||||||
paper = property(_get_paper, _set_paper)
|
paper = property(_get_paper, _set_paper)
|
||||||
style = property(_get_style, _set_style)
|
style = property(_get_style, _set_style)
|
||||||
extension = property(_get_extension, _set_extension)
|
extension = property(_get_extension, _set_extension)
|
||||||
|
@ -266,7 +266,7 @@ class Tags(DbGUIElement):
|
|||||||
# Make the dialog modal so that the user can't start another
|
# Make the dialog modal so that the user can't start another
|
||||||
# database transaction while the one setting tags is still running.
|
# database transaction while the one setting tags is still running.
|
||||||
pmon = progressdlg.ProgressMonitor(progressdlg.GtkProgressDialog,
|
pmon = progressdlg.ProgressMonitor(progressdlg.GtkProgressDialog,
|
||||||
("", self.uistate.window, Gtk.DialogFlags.MODAL), popup_time=2)
|
("", self.uistate.window, Gtk.DialogFlags.MODAL), popup_time=2)
|
||||||
status = progressdlg.LongOpStatus(msg=_("Adding Tags"),
|
status = progressdlg.LongOpStatus(msg=_("Adding Tags"),
|
||||||
total_steps=len(selected),
|
total_steps=len(selected),
|
||||||
interval=len(selected)//20)
|
interval=len(selected)//20)
|
||||||
|
@ -1178,7 +1178,7 @@ class GrampletPane(Gtk.ScrolledWindow):
|
|||||||
return # something is the matter
|
return # something is the matter
|
||||||
filename = self.configfile
|
filename = self.configfile
|
||||||
try:
|
try:
|
||||||
fp = io.open(filename, "w", encoding='utf-8')
|
fp = io.open(filename, "w", encoding='utf-8')
|
||||||
except IOError as err:
|
except IOError as err:
|
||||||
LOG.warn("Failed to open %s because $s; gramplets not saved",
|
LOG.warn("Failed to open %s because $s; gramplets not saved",
|
||||||
filename, str(err))
|
filename, str(err))
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful, calendar
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.calendar
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
|
Loading…
Reference in New Issue
Block a user