diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-02 17:24:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-03 17:51:57 +0100 |
commit | fd2cbd4f6b7908a2d71da46526f6919668d4f153 (patch) | |
tree | 88328ac7bfe42629bed40a305ebe1fc867eb7120 /bitbake/lib/bb | |
parent | d86fdf1307aa388a47289c84f462fba5c940a690 (diff) | |
download | ast2050-yocto-poky-fd2cbd4f6b7908a2d71da46526f6919668d4f153.zip ast2050-yocto-poky-fd2cbd4f6b7908a2d71da46526f6919668d4f153.tar.gz |
ui/crumbs/runningbuild: add optional readonly mode, default off
In b947e7aa405966262c0614cae02e7978ec637095 Bob started to introduce code
for a right-click menu, whilst most of the code is non-invasive it does
enable the editable property of the gtk.TreeView which can be confusing.
This change adds a readonly parameter, defaulting to False, to the
RunningBuildTreeView which if True will prevent the editable property from
being set.
CC: Bob Foerster <robert@erafx.com>
(Bitbake rev: d1d6bfab1789d8c0a4faa109bcc06b3cefe62620)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index c4d6d33..2399ff3 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py @@ -277,8 +277,9 @@ class RunningBuildTreeView (gtk.TreeView): __gsignals__ = { "button_press_event" : "override" } - def __init__ (self): + def __init__ (self, readonly=False): gtk.TreeView.__init__ (self) + self.readonly = readonly # The icon that indicates whether we're building or failed. renderer = gtk.CellRendererPixbuf () @@ -290,7 +291,7 @@ class RunningBuildTreeView (gtk.TreeView): self.message_renderer = gtk.CellRendererText () self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3) self.message_column.add_attribute(self.message_renderer, 'background', 5) - self.message_renderer.set_property('editable', 5) + self.message_renderer.set_property('editable', (not self.readonly)) self.append_column (self.message_column) def do_button_press_event(self, event): |