diff --git a/src/gui/utils.py b/src/gui/utils.py index 33663019d..502efb8fa 100644 --- a/src/gui/utils.py +++ b/src/gui/utils.py @@ -237,6 +237,7 @@ class ProgressMeter(object): Reset for another pass. Provide a new header and define number of steps to be used. """ + import gtk self.__mode = mode self.__pbar_max = total @@ -259,8 +260,11 @@ class ProgressMeter(object): gtk.main_iteration() def step(self): - """Click the progress bar over to the next value. Be paranoid - and insure that it doesn't go over 100%.""" + """ + Click the progress bar over to the next value. Be paranoid + and insure that it doesn't go over 100%. + """ + import gtk if self.__mode is ProgressMeter.MODE_FRACTION: self.__pbar_index = self.__pbar_index + 1.0 diff --git a/src/gui/widgets/undoablebuffer.py b/src/gui/widgets/undoablebuffer.py index 78078ae3f..4cd8951bc 100644 --- a/src/gui/widgets/undoablebuffer.py +++ b/src/gui/widgets/undoablebuffer.py @@ -118,12 +118,15 @@ class UndoableBuffer(gtk.TextBuffer): def on_insert_text_undoable(self, textbuffer, text_iter, text, length): def can_be_merged(prev, cur): - """see if we can merge multiple inserts here + """ + see if we can merge multiple inserts here will try to merge words or whitespace can't merge if prev and cur are not mergeable in the first place can't merge when user set the input bar somewhere else - can't merge across word boundaries""" + can't merge across word boundaries + """ + WHITESPACE = (' ', '\t') if not cur.mergeable or not prev.mergeable: return False @@ -159,12 +162,14 @@ class UndoableBuffer(gtk.TextBuffer): def on_delete_range_undoable(self, text_buffer, start_iter, end_iter): def can_be_merged(prev, cur): - """see if we can merge multiple deletions here + """ + see if we can merge multiple deletions here will try to merge words or whitespace can't merge if prev and cur are not mergeable in the first place can't merge if delete and backspace key were both used - can't merge across word boundaries""" + can't merge across word boundaries + """ WHITESPACE = (' ', '\t') if not cur.mergeable or not prev.mergeable: diff --git a/src/gui/widgets/undoableentry.py b/src/gui/widgets/undoableentry.py index 3282dd0fc..e1a22dfa2 100644 --- a/src/gui/widgets/undoableentry.py +++ b/src/gui/widgets/undoableentry.py @@ -132,12 +132,15 @@ class UndoableEntry(gtk.Entry): def _on_insert_text(self, editable, text, length, positionptr): def can_be_merged(prev, cur): - """see if we can merge multiple inserts here + """ + see if we can merge multiple inserts here will try to merge words or whitespace can't merge if prev and cur are not mergeable in the first place can't merge when user set the input bar somewhere else - can't merge across word boundaries""" + can't merge across word boundaries + """ + WHITESPACE = (' ', '\t') if not cur.mergeable or not prev.mergeable: return False @@ -175,12 +178,14 @@ class UndoableEntry(gtk.Entry): def _on_delete_text(self, editable, start, end): def can_be_merged(prev, cur): - """see if we can merge multiple deletions here + """ + see if we can merge multiple deletions here will try to merge words or whitespace can't merge if prev and cur are not mergeable in the first place can't merge if delete and backspace key were both used - can't merge across word boundaries""" + can't merge across word boundaries + """ WHITESPACE = (' ', '\t') if not cur.mergeable or not prev.mergeable: diff --git a/src/plugins/drawreport/DescendTree.py b/src/plugins/drawreport/DescendTree.py index 76b904879..1f5140c1b 100644 --- a/src/plugins/drawreport/DescendTree.py +++ b/src/plugins/drawreport/DescendTree.py @@ -75,8 +75,10 @@ from libtreebase import * # #------------------------------------------------------------------------ class DescendantBoxBase(BoxBase): - """ Base for all descendant boxes. - Set the boxstr and some new attributes that are needed """ + """ + Base for all descendant boxes. + Set the boxstr and some new attributes that are needed + """ def __init__(self, boxstr): BoxBase.__init__(self) @@ -116,8 +118,10 @@ class FamilyBox(DescendantBoxBase): self.level = level class PlaceHolderBox(BoxBase): - """ I am a box that does not print. I am used to make sure information - does not run over areas that we don't wnat information (boxes) """ + """ + I am a box that does not print. I am used to make sure information + does not run over areas that we don't wnat information (boxes) + """ def __init__(self, level): BoxBase.__init__(self) diff --git a/src/plugins/lib/libholiday.py b/src/plugins/lib/libholiday.py index d275eb23b..fa388e4c8 100644 --- a/src/plugins/lib/libholiday.py +++ b/src/plugins/lib/libholiday.py @@ -141,9 +141,11 @@ class HolidayTable(object): self.__init_table() def __find_holiday_files(self): - """ Looks in multiple places for holidays.xml files + """ + Looks in multiple places for holidays.xml files It will search for the file in user;s plugin directories first, - then it will search in program's plugins directories. """ + then it will search in program's plugins directories. + """ holiday_file = 'holidays.xml' diff --git a/src/plugins/lib/libtreebase.py b/src/plugins/lib/libtreebase.py index be5075b57..22be2b6dd 100644 --- a/src/plugins/lib/libtreebase.py +++ b/src/plugins/lib/libtreebase.py @@ -485,7 +485,8 @@ class Canvas(Page): for tmp in range(start_page): list_title.insert(0, "") list_title.append("") - list_title.append("") #one extra for security. doesn't hurt. + #one extra for security. doesn't hurt. + list_title.append("") x_page = 0 for title in list_title: