Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Fixed some excessively long lines.

This commit is contained in:
Einar Ryeng 2007-02-21 11:08:20 +00:00
parent 2cc4e86b0a
commit c5c4f13a19
1 changed files with 9 additions and 7 deletions

View File

@ -68,9 +68,9 @@ class IdListController:
self._dimension = dimname self._dimension = dimname
def set_annotation(self, annotation): def set_annotation(self, annotation):
"""Set the displayed annotation to annotation. """Set the displayed annotation to annotation. If annotation is None,
If annotation is None, the annotation column is hidden. Otherwise the annotation the annotation column is hidden. Otherwise the annotation column is
column is shown and filled with values from the given annotation field.""" shown and filled with values from the given annotation field."""
if annotation == self._annotation: if annotation == self._annotation:
return return
@ -91,8 +91,8 @@ class IdListController:
idlist = list(selection[self._dimension]) idlist = list(selection[self._dimension])
if self._annotation[self._dimension] != None: if self._annotation[self._dimension] != None:
annlist = annotations.get_dim_annotations(self._dimension, annlist = annotations.get_dim_annotations(self._dimension,
self._annotation[self._dimension], self._annotation[self._dimension],
idlist) idlist)
for id, ann in zip(idlist, annlist): for id, ann in zip(idlist, annlist):
self._idstore.append((id, ann)) self._idstore.append((id, ann))
else: else:
@ -103,7 +103,7 @@ class IdListController:
## Private interface ## Private interface
## ##
def _update_annotations_menu(self): def _update_annotations_menu(self):
"""Updates the annotations menu with the available annotations for the """Updates the annotations menu with the available annotations for the
current dim.""" current dim."""
dim_h = annotations.get_dim_handler(self._dimension) dim_h = annotations.get_dim_handler(self._dimension)
@ -113,7 +113,9 @@ class IdListController:
else: else:
annotations_menu = gtk.Menu() annotations_menu = gtk.Menu()
self._menu_ann.set_sensitive(True) self._menu_ann.set_sensitive(True)
ann_names = annotations.get_dim_handler(self._dimension).get_annotation_names() dh = annotations.get_dim_handler(self._dimension)
ann_names = dh.get_annotation_names()
for ann in ann_names: for ann in ann_names:
item = gtk.MenuItem(ann) item = gtk.MenuItem(ann)
item.connect('activate', self._on_annotation_activated, ann) item.connect('activate', self._on_annotation_activated, ann)