/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to logview.py

  • Committer: Aaron Bentley
  • Author(s): Aaron Bentley
  • Date: 2007-08-16 14:27:37 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070816142737-qejb84j26411tlu4
Add author support to gannotate and log viewer

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
            self.committer.set_text(revision.committer)
59
59
        else:
60
60
            self.committer.set_text("")
 
61
        author = revision.properties.get('author', '')
 
62
        if author != '':
 
63
            self.author.set_text(author)
 
64
            self.author.show()
 
65
            self.author_label.show()
 
66
        else:
 
67
            self.author.hide()
 
68
            self.author_label.hide()
 
69
 
61
70
        if revision.timestamp is not None:
62
71
            self.timestamp.set_text(format_date(revision.timestamp,
63
72
                                                revision.timezone))
170
179
        self.revision_id.show()
171
180
 
172
181
        align = gtk.Alignment(1.0, 0.5)
 
182
        self.author_label = gtk.Label()
 
183
        self.author_label.set_markup("<b>Author:</b>")
 
184
        align.add(self.author_label)
 
185
        self.table.attach(align, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
 
186
        align.show()
 
187
        self.author_label.show()
 
188
 
 
189
        align = gtk.Alignment(0.0, 0.5)
 
190
        self.author = gtk.Label()
 
191
        self.author.set_selectable(True)
 
192
        align.add(self.author)
 
193
        self.table.attach(align, 1, 2, 1, 2, gtk.EXPAND | gtk.FILL, gtk.FILL)
 
194
        align.show()
 
195
        self.author.show()
 
196
        self.author.hide()
 
197
 
 
198
        align = gtk.Alignment(1.0, 0.5)
173
199
        label = gtk.Label()
174
200
        label.set_markup("<b>Committer:</b>")
175
201
        align.add(label)
176
 
        self.table.attach(align, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
 
202
        self.table.attach(align, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
177
203
        align.show()
178
204
        label.show()
179
205
 
181
207
        self.committer = gtk.Label()
182
208
        self.committer.set_selectable(True)
183
209
        align.add(self.committer)
184
 
        self.table.attach(align, 1, 2, 1, 2, gtk.EXPAND | gtk.FILL, gtk.FILL)
 
210
        self.table.attach(align, 1, 2, 2, 3, gtk.EXPAND | gtk.FILL, gtk.FILL)
185
211
        align.show()
186
212
        self.committer.show()
187
213
 
189
215
        label = gtk.Label()
190
216
        label.set_markup("<b>Branch nick:</b>")
191
217
        align.add(label)
192
 
        self.table.attach(align, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
 
218
        self.table.attach(align, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
193
219
        label.show()
194
220
        align.show()
195
221
 
197
223
        self.branchnick_label = gtk.Label()
198
224
        self.branchnick_label.set_selectable(True)
199
225
        align.add(self.branchnick_label)
200
 
        self.table.attach(align, 1, 2, 2, 3, gtk.EXPAND | gtk.FILL, gtk.FILL)
 
226
        self.table.attach(align, 1, 2, 3, 4, gtk.EXPAND | gtk.FILL, gtk.FILL)
201
227
        self.branchnick_label.show()
202
228
        align.show()
203
229
 
205
231
        label = gtk.Label()
206
232
        label.set_markup("<b>Timestamp:</b>")
207
233
        align.add(label)
208
 
        self.table.attach(align, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
 
234
        self.table.attach(align, 0, 1, 4, 5, gtk.FILL, gtk.FILL)
209
235
        align.show()
210
236
        label.show()
211
237
 
213
239
        self.timestamp = gtk.Label()
214
240
        self.timestamp.set_selectable(True)
215
241
        align.add(self.timestamp)
216
 
        self.table.attach(align, 1, 2, 3, 4, gtk.EXPAND | gtk.FILL, gtk.FILL)
 
242
        self.table.attach(align, 1, 2, 4, 5, gtk.EXPAND | gtk.FILL, gtk.FILL)
217
243
        align.show()
218
244
        self.timestamp.show()
219
245