1
#####################################################
2
# leonov - The Launchpad Desktop Client
3
# Copyright (C) 2008 Siegfried-A. Gevatter
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License along
16
# with this program; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
#####################################################
22
from leonov.gtk.objects.treeview import SimplifiedTreeView
24
class BugInfoWidgetBranches(gtk.ScrolledWindow):
27
gtk.ScrolledWindow.__init__(self)
31
self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
32
self._model = gtk.ListStore(str, str)
33
treeview = SimplifiedTreeView(self._model)
34
treeview.add_columns('Branch', 'Status')
36
self.add_with_viewport(treeview)
38
def showBug(self, bug = None):
43
for branch in bug.branches:
44
self._model.append([branch.title, branch.status])
45
self._branches.append(branch.url)