2008-02-22 Raphael Ackermann <raphael.ackermann@gmail.com>

* various (294 files)
	pep8 doc fixes & pylint fixes

svn: r10103
This commit is contained in:
Raphael Ackermann
2008-02-24 13:55:55 +00:00
parent 2180fa02cb
commit c962d5e6e1
294 changed files with 2925 additions and 2571 deletions

View File

@@ -21,7 +21,7 @@
# $Id$
"""
Provides the interface to allow a person to add a media object to the database.
Provide the interface to allow a person to add a media object to the database.
"""
#-------------------------------------------------------------------------
@@ -80,7 +80,7 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
def __init__(self, dbstate, uistate, track, mediaobj, callback=None):
"""
Creates and displays the dialog box
Create and displays the dialog box
db - the database in which the new object is to be stored
The mediaobject is updated with the information, and on save, the

View File

@@ -124,7 +124,7 @@ class EditAddress(EditSecondary):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
@@ -144,7 +144,7 @@ class EditAddress(EditSecondary):
notebook.show_all()
self.top.get_widget('vbox').pack_start(notebook,True)
def build_menu_names(self,obj):
def build_menu_names(self, obj):
return (_('Address'),_('Address Editor'))
def save(self,*obj):

View File

@@ -128,7 +128,7 @@ class EditChildRef(EditSecondary):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
notebook = gtk.Notebook()
@@ -150,10 +150,10 @@ class EditChildRef(EditSecondary):
def _post_init(self):
self.ok_button.grab_focus()
def build_menu_names(self,obj):
def build_menu_names(self, obj):
return (_('Child Reference'),_('Child Reference Editor'))
def edit_child(self,obj,event):
def edit_child(self, obj,event):
if button_activated(event, _LEFT_BUTTON):
from _EditPerson import EditPerson
handle = self.obj.ref

View File

@@ -149,7 +149,7 @@ class EditEvent(EditPrimary):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
notebook = gtk.Notebook()

View File

@@ -165,7 +165,7 @@ class EditEventRef(EditReference):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
@@ -223,7 +223,7 @@ class EditEventRef(EditReference):
submenu_label = _('New Event')
return (_('Event Reference Editor'),submenu_label)
def ok_clicked(self,obj):
def ok_clicked(self, obj):
trans = self.db.transaction_begin()
if self.source.handle:

View File

@@ -367,7 +367,7 @@ class EditMediaRef(EditReference):
def build_menu_names(self, person):
"""
Provides the information needed by the base class to define the
Provide the information needed by the base class to define the
window management menu entries.
"""
if self.source:
@@ -403,7 +403,7 @@ class EditMediaRef(EditReference):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
notebook_ref = self.top.get_widget('notebook_ref')

View File

@@ -157,7 +157,7 @@ class EditName(EditSecondary):
else :
self.group_as.force_value(self.obj.get_surname())
format_list = [(name,number) for (number,name,fmt_str,act)
format_list = [(name, number) for (number, name,fmt_str,act)
in name_displayer.get_name_format(also_default=True)]
self.sort_as = MonitoredMenu(
@@ -268,16 +268,16 @@ class EditName(EditSecondary):
self.global_group_set = True
def build_menu_names(self,name):
def build_menu_names(self, name):
if name:
ntext = name_displayer.display_name(name)
submenu_label = '%s: %s' % (_('Name'),ntext)
submenu_label = '%s: %s' % (_('Name'), ntext)
else:
submenu_label = _('New Name')
menu_label = _('Name Editor')
return (menu_label,submenu_label)
def update_group_as(self,obj):
def update_group_as(self, obj):
"""Callback if surname changes on GUI
If overwrite is not set, we change the group name too
"""
@@ -302,7 +302,7 @@ class EditName(EditSecondary):
self.group_over.set_active(False)
self.group_as.enable(False)
def on_group_over_toggled(self,obj):
def on_group_over_toggled(self, obj):
""" group over changes, if activated, enable edit,
if unactivated, go back to surname.
"""

View File

@@ -249,7 +249,7 @@ class EditNote(EditPrimary):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
notebook = self.top.get_widget("note_notebook")
@@ -355,7 +355,7 @@ class EditNote(EditPrimary):
def build_menu_names(self, person):
"""
Provides the information needed by the base class to define the
Provide the information needed by the base class to define the
window management menu entries.
"""
return (_('Edit Note'), self.get_menu_title())

View File

@@ -21,7 +21,7 @@
# $Id$
"""
EditPerson Dialog. Provides the interface to allow the GRAMPS program
EditPerson Dialog. Provide the interface to allow the GRAMPS program
to edit information about a particular Person.
"""

View File

@@ -118,7 +118,7 @@ class EditPersonRef(EditSecondary):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
@@ -138,7 +138,7 @@ class EditPersonRef(EditSecondary):
notebook.show_all()
self.top.get_widget('vbox').pack_start(notebook,True)
def build_menu_names(self,obj):
def build_menu_names(self, obj):
return (_('Person Reference'),_('Person Reference Editor'))
def save(self,*obj):

View File

@@ -211,7 +211,7 @@ class EditPlace(EditPrimary):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""

View File

@@ -162,7 +162,7 @@ class EditReference(ManagedWindow.ManagedWindow):
if notebook.get_current_page() != page_no:
notebook.set_current_page(page_no)
def _add_tab(self,notebook,page):
def _add_tab(self, notebook,page):
notebook.insert_page(page, page.get_tab_widget())
page.add_db_signal_callback(self._add_db_signal)
page.label.set_use_underline(True)

View File

@@ -138,7 +138,7 @@ class EditRepoRef(EditReference):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
@@ -187,7 +187,7 @@ class EditRepoRef(EditReference):
submenu_label = _('New Repository')
return (_('Repo Reference Editor'),submenu_label)
def ok_clicked(self,obj):
def ok_clicked(self, obj):
trans = self.db.transaction_begin()
if self.source.handle:

View File

@@ -30,7 +30,7 @@ class EditSecondary(ManagedWindow.ManagedWindow):
HEIGHT_KEY = None
def __init__(self, state, uistate, track, obj, callback=None):
"""Creates an edit window. Associates a person with the window."""
"""Create an edit window. Associates a person with the window."""
self.obj = obj
self.dbstate = state
@@ -80,7 +80,7 @@ class EditSecondary(ManagedWindow.ManagedWindow):
def _create_tabbed_pages(self):
pass
def build_window_key(self,obj):
def build_window_key(self, obj):
return id(obj)
def _setup_notebook_tabs(self, notebook):
@@ -108,7 +108,7 @@ class EditSecondary(ManagedWindow.ManagedWindow):
if notebook.get_current_page() != page_no:
notebook.set_current_page(page_no)
def _add_tab(self,notebook,page):
def _add_tab(self, notebook,page):
notebook.insert_page(page, page.get_tab_widget())
page.add_db_signal_callback(self._add_db_signal)
page.label.set_use_underline(True)

View File

@@ -143,7 +143,7 @@ class EditSourceRef(EditReference):
def _create_tabbed_pages(self):
"""
Creates the notebook tabs and inserts them into the main
Create the notebook tabs and inserts them into the main
window.
"""
notebook_src = self.top.get_widget('notebook_src')
@@ -197,7 +197,7 @@ class EditSourceRef(EditReference):
submenu_label = _('New Source')
return (_('Source Reference Editor'),submenu_label)
def ok_clicked(self,obj):
def ok_clicked(self, obj):
trans = self.db.transaction_begin()
if self.source.handle:

View File

@@ -94,7 +94,7 @@ class EditUrl(EditSecondary):
self.obj.set_type,
self.obj.get_type, self.db.readonly)
def build_menu_names(self,obj):
def build_menu_names(self, obj):
etitle =_('Internet Address Editor')
return (etitle, etitle)