pychecker fixes
svn: r6407
This commit is contained in:
@@ -36,7 +36,6 @@ import RelLib
|
||||
import PageView
|
||||
import DisplayModels
|
||||
import const
|
||||
import Utils
|
||||
import Errors
|
||||
from QuestionDialog import QuestionDialog, ErrorDialog
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gettext import gettext as _
|
||||
import gc
|
||||
import re
|
||||
import cgi
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -13,9 +11,7 @@ import cgi
|
||||
# GTK/Gnome modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gobject
|
||||
import gtk
|
||||
import pango
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -25,12 +21,13 @@ import pango
|
||||
import RelLib
|
||||
import PageView
|
||||
import NameDisplay
|
||||
import Utils
|
||||
import DateHandler
|
||||
import ImgManip
|
||||
import Config
|
||||
import GrampsWidgets
|
||||
import Errors
|
||||
import GrampsDb
|
||||
|
||||
from PluginUtils import ReportUtils
|
||||
|
||||
_GenderCode = {
|
||||
@@ -397,7 +394,6 @@ class FamilyView(PageView.PersonNavView):
|
||||
pname = self.place_name(phandle)
|
||||
else:
|
||||
pname = None
|
||||
date_str = DateHandler.displayer.display(dobj)
|
||||
|
||||
value = {
|
||||
'date' : DateHandler.displayer.display(dobj),
|
||||
@@ -473,7 +469,7 @@ class FamilyView(PageView.PersonNavView):
|
||||
family = self.dbstate.db.get_family_from_handle(family_handle)
|
||||
if not family:
|
||||
return
|
||||
self.write_label("%s:" % _('Parents'), family, True),
|
||||
self.write_label("%s:" % _('Parents'), family, True)
|
||||
self.write_person(_('Father'), family.get_father_handle())
|
||||
if self.show_details:
|
||||
value = self.info_string(family.get_father_handle())
|
||||
@@ -609,7 +605,6 @@ class FamilyView(PageView.PersonNavView):
|
||||
pname = self.place_name(phandle)
|
||||
else:
|
||||
pname = None
|
||||
date_str = DateHandler.displayer.display(dobj)
|
||||
|
||||
value = {
|
||||
'date' : DateHandler.displayer.display(dobj),
|
||||
@@ -716,7 +711,8 @@ class FamilyView(PageView.PersonNavView):
|
||||
family = dialog.run()
|
||||
|
||||
if family:
|
||||
person = self.dbstate.db.get_person_from_handle(self.dbstate.active.handle)
|
||||
active_handle = self.dbstate.active.handle
|
||||
child = self.dbstate.db.get_person_from_handle(active_handle)
|
||||
GrampsDb.add_child_to_family(family, child,
|
||||
RelLib.ChildRef(),
|
||||
RelLib.ChildRef())
|
||||
@@ -738,14 +734,12 @@ class FamilyView(PageView.PersonNavView):
|
||||
|
||||
def delete_family(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
import GrampsDb
|
||||
GrampsDb.remove_parent_from_family(self.dbstate.db,
|
||||
self.dbstate.active.handle,
|
||||
handle)
|
||||
|
||||
def delete_parent_family(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
import GrampsDb
|
||||
GrampsDb.remove_child_from_family(self.dbstate.db,
|
||||
self.dbstate.active.handle,
|
||||
handle)
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#-------------------------------------------------------------------------
|
||||
from gettext import gettext as _
|
||||
import gc
|
||||
import re
|
||||
import logging
|
||||
import os
|
||||
import math
|
||||
@@ -48,7 +47,6 @@ import gtk.gdk
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import RelLib
|
||||
import PageView
|
||||
import const
|
||||
|
||||
|
@@ -78,7 +78,7 @@ class MediaView(PageView.ListView):
|
||||
def define_actions(self):
|
||||
PageView.ListView.define_actions(self)
|
||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
'_Column Editor', callback=self.column_editor),
|
||||
'_Column Editor', callback=self.column_editor)
|
||||
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
@@ -145,11 +145,6 @@ class MediaView(PageView.ListView):
|
||||
</popup>
|
||||
</ui>'''
|
||||
|
||||
def on_double_click(self,obj,event):
|
||||
handle = self.first_selected()
|
||||
if handle:
|
||||
media_obj = self.dbstate.db.get_object_from_handle(handle)
|
||||
|
||||
def add(self,obj):
|
||||
"""Add a new media object to the media list"""
|
||||
import AddMedia
|
||||
|
@@ -119,7 +119,7 @@ class PersonView(PageView.PersonNavView):
|
||||
self.add_toggle_action('Filter', None, '_Filter', None, None,
|
||||
self.filter_toggle)
|
||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
'_Column Editor', callback=self.column_editor),
|
||||
'_Column Editor', callback=self.column_editor)
|
||||
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
@@ -85,7 +85,7 @@ class PlaceView(PageView.ListView):
|
||||
def define_actions(self):
|
||||
PageView.ListView.define_actions(self)
|
||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
'_Column Editor', callback=self.column_editor),
|
||||
'_Column Editor', callback=self.column_editor)
|
||||
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
@@ -90,7 +90,7 @@ class RepositoryView(PageView.ListView):
|
||||
def define_actions(self):
|
||||
PageView.ListView.define_actions(self)
|
||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
'_Column Editor', callback=self.column_editor),
|
||||
'_Column Editor', callback=self.column_editor)
|
||||
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
@@ -84,7 +84,7 @@ class SourceView(PageView.ListView):
|
||||
def define_actions(self):
|
||||
PageView.ListView.define_actions(self)
|
||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||
'_Column Editor', callback=self.column_editor),
|
||||
'_Column Editor', callback=self.column_editor)
|
||||
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
Reference in New Issue
Block a user