diff options
Diffstat (limited to 'tutorius/editor.py')
-rw-r--r-- | tutorius/editor.py | 54 |
1 files changed, 13 insertions, 41 deletions
diff --git a/tutorius/editor.py b/tutorius/editor.py index 7f2cc8e..9d2effe 100644 --- a/tutorius/editor.py +++ b/tutorius/editor.py @@ -23,11 +23,9 @@ import gobject #import gconf from gettext import gettext as _ -from sugar.graphics.window import Window from .gtkutils import register_signals_numbered, get_children - class WidgetIdentifier(gtk.Window): """ Tool that allows identifying widgets. @@ -128,26 +126,12 @@ class WidgetIdentifier(gtk.Window): typecol = gtk.TreeViewColumn(_("Widget"), typerendr, text=1, background=1, foreground=1) explorer.append_column(typecol) - - if isinstance(self._activity, Window): - self.__populate_treestore( - tree, #tree - tree.append(None, ["0",str(self._activity)]), #parent - self._activity, #widget - "0" #path - ) - else: - # Assume it is the frame - for win in [self._activity._left_panel,\ - self._activity._right_panel,\ - self._activity._top_panel,\ - self._activity._bottom_panel]: - self.__populate_treestore( - tree, #tree - tree.append(None, ["0",str(self._activity)]), #parent - win, #widget - "0" #path - ) + self.__populate_treestore( + tree, #tree + tree.append(None, ["0",self._activity.get_name()]), #parent + self._activity, #widget + "0" #path + ) explorer.set_expander_column(typecol) @@ -174,25 +158,13 @@ class WidgetIdentifier(gtk.Window): typecol2 = gtk.TreeViewColumn(_("Widget"), typerendr2, text=1, background=1, foreground=1) explorer2.append_column(typecol2) - if isinstance(self._activity, Window): - self.__populate_gobject_treestore( - tree2, #tree - tree2.append(None, ["activity",str(self._activity)]), #parent - self._activity, #widget - "activity" #path - ) - else: - # Assume it is the frame - for win in [self._activity._left_panel,\ - self._activity._right_panel,\ - self._activity._top_panel,\ - self._activity._bottom_panel]: - self.__populate_gobject_treestore( - tree2, #tree - tree2.append(None, ["activity",str(self._activity)]), #parent - win, #widget - "activity" #path - ) + self.__populate_gobject_treestore( + tree2, #tree + tree2.append(None, ["activity",self._activity.get_name()]), #parent + self._activity, #widget + "activity" #path + ) + explorer2.set_expander_column(typecol2) swd3 = gtk.ScrolledWindow() |