Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Renamed IconFactory.get_icon() -> IconFactory.get()

This commit is contained in:
Einar Ryeng 2007-01-03 13:46:39 +00:00
parent d45ae4f480
commit 57e58e3910
2 changed files with 6 additions and 6 deletions

View File

@ -29,7 +29,7 @@ class IconFactory:
self._path = path
self._icons = {}
def get_icon(self, iconname):
def get(self, iconname):
"""Returns the gdk loaded PixBuf for the given icon.
Reads the icon from file if necessary."""

View File

@ -68,7 +68,7 @@ class Project:
parent_iter = None
# Add the function node to the tree
icon = fluents.icon_factory.get_icon("folder_grey")
icon = fluents.icon_factory.get("folder_grey")
it = self.data_tree_insert(parent_iter, fun, None, None, "black", icon)
# Add all returned datasets/plots/selections
@ -76,18 +76,18 @@ class Project:
# Any kind of dataset
if isinstance(d, dataset.Dataset):
if isinstance(d, dataset.GraphDataset):
icon = fluents.icon_factory.get_icon("graph_dataset")
icon = fluents.icon_factory.get("graph_dataset")
elif isinstance(d, dataset.CategoryDataset):
icon = fluents.icon_factory.get_icon("category_dataset")
icon = fluents.icon_factory.get("category_dataset")
else:
icon = fluents.icon_factory.get_icon("dataset")
icon = fluents.icon_factory.get("dataset")
self.add_dataset(d)
self.data_tree_insert(it, d.get_name(), d, None, "black", icon)
# Any kind of plot
elif isinstance(d, plots.Plot):
icon = fluents.icon_factory.get_icon("line_plot")
icon = fluents.icon_factory.get("line_plot")
self.data_tree_insert(it, d.get_title(), d, None, "black", icon)
d.set_selection_listener(self.set_selection)
self._selection_observers.append(d)