From baef4d76a4c417d3603905ef962498a1f6413fbe Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Mon, 9 Feb 2009 23:37:40 +0000 Subject: [PATCH] fixed indentation issues and mix of tabs and spaces. svn: r11943 --- src/DataViews/GeoView.py | 8 ++++---- src/DataViews/__init__.py | 2 +- src/Editors/_EditLocation.py | 2 +- src/Filters/Rules/Person/_HasAddress.py | 2 +- src/Filters/Rules/Person/_HasAssociation.py | 2 +- src/Filters/Rules/_HasGalleryBase.py | 2 +- src/Filters/Rules/_HasLDSBase.py | 2 +- src/GrampsLogger/_ErrorReportAssistant.py | 6 +++--- src/Models/_FastFilterModel.py | 2 +- src/Models/_FastModel.py | 6 +++--- src/RecentFiles.py | 4 ++-- src/Relationship.py | 4 ++-- src/gen/lib/date.py | 2 +- src/gen/proxy/private.py | 2 +- src/plugins/drawreport/Calendar.py | 2 +- src/plugins/gramplet/FanChartGramplet.py | 8 ++++---- src/plugins/webreport/WebCal.py | 2 +- src/test/test_util.py | 2 +- 18 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/DataViews/GeoView.py b/src/DataViews/GeoView.py index 6a44206cd..37e7b670e 100644 --- a/src/DataViews/GeoView.py +++ b/src/DataViews/GeoView.py @@ -1063,9 +1063,9 @@ class GeoView(HtmlView): if maxlong < 0.1 : zoomlong = 13 if zoomlat < zoomlong: - self.zoom = zoomlat + self.zoom = zoomlat else: - self.zoom = zoomlong + self.zoom = zoomlong self.zoom -= 1 if self.zoom < 2: self.zoom = 2 @@ -1100,8 +1100,8 @@ class GeoView(HtmlView): longt = self.minlon+self.centerlon # for all maps, 0.0 for longitude and latitude means no location. if latit == 0.0 and longt == 0.0: - latit = 0.00000001 - longt = 0.00000001 + latit = 0.00000001 + longt = 0.00000001 LOG.debug( "self.maxlon = %f\n" % self.maxlon) LOG.debug("self.minlon = %f\n" % self.minlon) diff --git a/src/DataViews/__init__.py b/src/DataViews/__init__.py index dba34318b..33d4ee09a 100644 --- a/src/DataViews/__init__.py +++ b/src/DataViews/__init__.py @@ -78,7 +78,7 @@ except AttributeError: NoteView, ] if geopresent: - DATA_VIEWS.append(GeoView) + DATA_VIEWS.append(GeoView) def get_views(): """ diff --git a/src/Editors/_EditLocation.py b/src/Editors/_EditLocation.py index af14eecda..84a8a9e39 100644 --- a/src/Editors/_EditLocation.py +++ b/src/Editors/_EditLocation.py @@ -114,7 +114,7 @@ class EditLocation(EditSecondary): def save(self,*obj): if self.callback: - self.callback(self.obj) + self.callback(self.obj) self.close() diff --git a/src/Filters/Rules/Person/_HasAddress.py b/src/Filters/Rules/Person/_HasAddress.py index 6722e5a7f..cc90fbf86 100755 --- a/src/Filters/Rules/Person/_HasAddress.py +++ b/src/Filters/Rules/Person/_HasAddress.py @@ -52,7 +52,7 @@ class HasAddress(Rule): def prepare(self, db): # things we want to do just once, not for every handle if self.list[1] == _('lesser than'): - self.count_type = 0 + self.count_type = 0 elif self.list[1] == _('greater than'): self.count_type = 2 else: diff --git a/src/Filters/Rules/Person/_HasAssociation.py b/src/Filters/Rules/Person/_HasAssociation.py index 788cedb88..5d2b1583b 100755 --- a/src/Filters/Rules/Person/_HasAssociation.py +++ b/src/Filters/Rules/Person/_HasAssociation.py @@ -51,7 +51,7 @@ class HasAssociation(Rule): def prepare(self, db): # things we want to do just once, not for every handle if self.list[1] == _('lesser than'): - self.count_type = 0 + self.count_type = 0 elif self.list[1] == _('greater than'): self.count_type = 2 else: diff --git a/src/Filters/Rules/_HasGalleryBase.py b/src/Filters/Rules/_HasGalleryBase.py index f7acde660..1a2e63861 100755 --- a/src/Filters/Rules/_HasGalleryBase.py +++ b/src/Filters/Rules/_HasGalleryBase.py @@ -48,7 +48,7 @@ class HasGalleryBase(Rule): def prepare(self, db): # things we want to do just once, not for every handle if self.list[1] == _('lesser than'): - self.count_type = 0 + self.count_type = 0 elif self.list[1] == _('greater than'): self.count_type = 2 else: diff --git a/src/Filters/Rules/_HasLDSBase.py b/src/Filters/Rules/_HasLDSBase.py index 4b6237ff6..779fd498d 100755 --- a/src/Filters/Rules/_HasLDSBase.py +++ b/src/Filters/Rules/_HasLDSBase.py @@ -51,7 +51,7 @@ class HasLDSBase(Rule): def prepare(self, db): # things we want to do just once, not for every handle if self.list[1] == _('lesser than'): - self.count_type = 0 + self.count_type = 0 elif self.list[1] == _('greater than'): self.count_type = 2 else: diff --git a/src/GrampsLogger/_ErrorReportAssistant.py b/src/GrampsLogger/_ErrorReportAssistant.py index 8d06a1aaf..dd908c2d2 100644 --- a/src/GrampsLogger/_ErrorReportAssistant.py +++ b/src/GrampsLogger/_ErrorReportAssistant.py @@ -372,7 +372,7 @@ class ErrorReportAssistant: # side_label = gtk.Label(_("This is the completed bug report. The next page "\ # "of the assistant will help you to send the report "\ # "to the bug report mailing list.")) - + side_label = gtk.Label(_("This is the completed bug report. The next page "\ "of the assistant will help you to file a bug "\ " on the Gramps bug tracking system website.")) @@ -484,10 +484,10 @@ class ErrorReportAssistant: outer_frame.get_label_widget().set_use_markup(True) outer_frame.add(inner_align) - + # side_label = gtk.Label(_("This is the final step. Use the buttons on this " # "page to transfer the bug report to your email client.")) - + side_label = gtk.Label(_("This is the final step. Use the buttons on this " "page to start a web browser and file a bug " "report on the Gramps bug tracking system.")) diff --git a/src/Models/_FastFilterModel.py b/src/Models/_FastFilterModel.py index 4761e84a9..ea6f22035 100644 --- a/src/Models/_FastFilterModel.py +++ b/src/Models/_FastFilterModel.py @@ -41,7 +41,7 @@ class FastFilterModel(gtk.GenericTreeModel): def __init__(self,db,data_filter): gtk.GenericTreeModel.__init__(self) - self._db = db + self._db = db self._data_filter = data_filter self._fetch_func = self._get_fetch_func(db) diff --git a/src/Models/_FastModel.py b/src/Models/_FastModel.py index 85b1445d7..34ff4d35e 100644 --- a/src/Models/_FastModel.py +++ b/src/Models/_FastModel.py @@ -41,9 +41,9 @@ class FastModel(gtk.GenericTreeModel): def __init__(self,db): gtk.GenericTreeModel.__init__(self) - self._db = db - self._table = self._get_table(db) - self._cursor = self._get_cursor(db) + self._db = db + self._table = self._get_table(db) + self._cursor = self._get_cursor(db) self._object_class = self._get_object_class(db) self._length = self._get_length(db) diff --git a/src/RecentFiles.py b/src/RecentFiles.py index b99e342a6..fdb3066fb 100644 --- a/src/RecentFiles.py +++ b/src/RecentFiles.py @@ -113,8 +113,8 @@ class RecentFiles: def rename_filename(self,filename, new_filename): - # First we need to walk the existing items to see - # if our item is already there + # First we need to walk the existing items to see + # if our item is already there found = False for index in range(len(self.gramps_recent_files)): if self.gramps_recent_files[index].get_name() == filename: diff --git a/src/Relationship.py b/src/Relationship.py index cda4270b5..3bec4ffd6 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -2063,8 +2063,8 @@ def _testsibling(rc): (gen.lib.Person.FEMALE, 'female'), (gen.lib.Person.UNKNOWN, 'unknown')]: for inlaw in [False, True]: - for sibt, str in vals: - print FMT % rc.get_sibling_relationship_string( + for sibt, str in vals: + print FMT % rc.get_sibling_relationship_string( sibt, gen.lib.Person.MALE, gendr, in_law_a = inlaw) + ' |info:', str, strgen diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index ed3f13e0f..232a0ba23 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -1,4 +1,4 @@ - # +# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham diff --git a/src/gen/proxy/private.py b/src/gen/proxy/private.py index 70400077c..32df90b07 100644 --- a/src/gen/proxy/private.py +++ b/src/gen/proxy/private.py @@ -568,7 +568,7 @@ def copy_lds_ords(db, original_obj,clean_obj): """ for lds_ord in original_obj.get_lds_ord_list(): if not lds_ord.get_privacy(): - clean_obj.add_lds_ord( lds_ord ) + clean_obj.add_lds_ord( lds_ord ) def copy_addresses(db, original_obj,clean_obj): """ diff --git a/src/plugins/drawreport/Calendar.py b/src/plugins/drawreport/Calendar.py index 0d2043a59..759b32085 100644 --- a/src/plugins/drawreport/Calendar.py +++ b/src/plugins/drawreport/Calendar.py @@ -291,7 +291,7 @@ class Calendar(Report): 'person' : short_name, 'relation' : ""} else: - text = (ngettext('%(person)s, %(age)d%(relation)s', + text = (ngettext('%(person)s, %(age)d%(relation)s', '%(person)s, %(age)d%(relation)s', nyears) % {'person' : short_name, 'age' : nyears, diff --git a/src/plugins/gramplet/FanChartGramplet.py b/src/plugins/gramplet/FanChartGramplet.py index f7ea77d46..7bdee3385 100644 --- a/src/plugins/gramplet/FanChartGramplet.py +++ b/src/plugins/gramplet/FanChartGramplet.py @@ -169,7 +169,7 @@ class FanChartWidget(gtk.Widget): line_style=gdk.SOLID, join_style=gdk.JOIN_ROUND) - self.window.set_user_data(self) + self.window.set_user_data(self) self.style.attach(self.window) self.style.set_background(self.window, gtk.STATE_NORMAL) self.window.move_resize(*self.allocation) @@ -178,9 +178,9 @@ class FanChartWidget(gtk.Widget): """ Overridden method to handle size request events. """ - width, height = self.layout.get_size() - requisition.width = (width // pango.SCALE + self.BORDER_WIDTH*4)* 1.45 - requisition.height = (3 * height // pango.SCALE + self.BORDER_WIDTH*4) * 1.2 + width, height = self.layout.get_size() + requisition.width = (width // pango.SCALE + self.BORDER_WIDTH*4)* 1.45 + requisition.height = (3 * height // pango.SCALE + self.BORDER_WIDTH*4) * 1.2 def do_size_allocate(self, allocation): """ diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index 7ccee6c16..197f276d5 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -913,7 +913,7 @@ class WebCalReport(Report): for cal_year in range(self.start_year, (self.end_year + 1)): - # generate progress pass for year ???? + # generate progress pass for year ???? self.progress.set_pass(_('Creating year %d calendars') % cal_year, '') # initialize the holidays dict to fill: diff --git a/src/test/test_util.py b/src/test/test_util.py index f802ed118..b6451c968 100644 --- a/src/test/test_util.py +++ b/src/test/test_util.py @@ -183,7 +183,7 @@ class TestLogger(): """get current content of logfile as list of lines""" txt = [] if self.lfname and os.path.isfile(self.lfname): - txt = open(self.lfname).readlines() + txt = open(self.lfname).readlines() return txt #===eof===