summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-02 17:24:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-03 17:51:57 +0100
commitfd2cbd4f6b7908a2d71da46526f6919668d4f153 (patch)
tree88328ac7bfe42629bed40a305ebe1fc867eb7120 /bitbake/lib
parentd86fdf1307aa388a47289c84f462fba5c940a690 (diff)
downloadpoky-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')
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py5
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 c4d6d33de5..2399ff3943 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):
277 __gsignals__ = { 277 __gsignals__ = {
278 "button_press_event" : "override" 278 "button_press_event" : "override"
279 } 279 }
280 def __init__ (self): 280 def __init__ (self, readonly=False):
281 gtk.TreeView.__init__ (self) 281 gtk.TreeView.__init__ (self)
282 self.readonly = readonly
282 283
283 # The icon that indicates whether we're building or failed. 284 # The icon that indicates whether we're building or failed.
284 renderer = gtk.CellRendererPixbuf () 285 renderer = gtk.CellRendererPixbuf ()
@@ -290,7 +291,7 @@ class RunningBuildTreeView (gtk.TreeView):
290 self.message_renderer = gtk.CellRendererText () 291 self.message_renderer = gtk.CellRendererText ()
291 self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3) 292 self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=3)
292 self.message_column.add_attribute(self.message_renderer, 'background', 5) 293 self.message_column.add_attribute(self.message_renderer, 'background', 5)
293 self.message_renderer.set_property('editable', 5) 294 self.message_renderer.set_property('editable', (not self.readonly))
294 self.append_column (self.message_column) 295 self.append_column (self.message_column)
295 296
296 def do_button_press_event(self, event): 297 def do_button_press_event(self, event):