sync a few files in gramps40 and trunk

svn: r21604
This commit is contained in:
Paul Franklin 2013-03-10 21:52:07 +00:00
parent 1a5ad3b6f7
commit af3e34fef5
5 changed files with 8 additions and 15 deletions

View File

@ -760,7 +760,8 @@ class DbBsddbRead(DbReadBase, Callback):
return self.get_from_handle(handle, Tag, self.tag_map)
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):
val = val.encode('utf-8')
try:
@ -1529,6 +1530,8 @@ class DbBsddbRead(DbReadBase, Callback):
"""
Helper method for get_raw_<object>_data methods
"""
if table is None:
return None ## trying to get object too early
if isinstance(handle, UNITYPE):
handle = handle.encode('utf-8')
try:

View File

@ -377,7 +377,6 @@ class PluginData(object):
self._toolclass = None
self._tool_modes = [TOOL_MODE_GUI]
#DOCGEN attr
self._basedocclass = None
self._paper = True
self._style = True
self._extension = ''
@ -679,14 +678,6 @@ class PluginData(object):
tool_modes = property(_get_tool_modes, _set_tool_modes)
#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):
if not self._ptype == DOCGEN:
raise ValueError('paper may only be set for DOCGEN plugins')
@ -717,7 +708,6 @@ class PluginData(object):
def _get_extension(self):
return self._extension
basedocclass = property(_get_basedocclass, _set_basedocclass)
paper = property(_get_paper, _set_paper)
style = property(_get_style, _set_style)
extension = property(_get_extension, _set_extension)

View File

@ -266,7 +266,7 @@ class Tags(DbGUIElement):
# Make the dialog modal so that the user can't start another
# database transaction while the one setting tags is still running.
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"),
total_steps=len(selected),
interval=len(selected)//20)

View File

@ -1178,7 +1178,7 @@ class GrampletPane(Gtk.ScrolledWindow):
return # something is the matter
filename = self.configfile
try:
fp = io.open(filename, "w", encoding='utf-8')
fp = io.open(filename, "w", encoding='utf-8')
except IOError as err:
LOG.warn("Failed to open %s because $s; gramplets not saved",
filename, str(err))

View File

@ -14,10 +14,10 @@
# the Free Software Foundation; either version 2 of the License, or
# (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
# 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
# along with this program; if not, write to the Free Software