Bug 3018: ImportGrdb: remove calls to keys() dictionary method where possible

svn: r12572
This commit is contained in:
Gerald Britton
2009-05-26 20:48:09 +00:00
parent 51f65aa02f
commit 5eb7e18dc6
47 changed files with 134 additions and 199 deletions

View File

@@ -426,9 +426,9 @@ class StyledTextBuffer(gtk.TextBuffer):
def _remove_style_from_selection(self, style):
start, end = self._get_selection()
tags = self._get_tag_from_range(start.get_offset(), end.get_offset())
for tag_name in tags.keys():
for tag_name, tag_data in tags.iteritems():
if tag_name.startswith(str(style)):
for start, end in tags[tag_name]:
for start, end in tag_data:
self.remove_tag_by_name(tag_name,
self.get_iter_at_offset(start),
self.get_iter_at_offset(end+1))