/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 branchwin.py

  • Committer: Erik Bagfors
  • Date: 2005-12-06 14:09:36 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: erik@bagfors.nu-20051206140936-4f638d9acf4b7678
Support for showing the branch nick

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        vbox.set_size_request(width, int(height / 2.5))
143
143
        vbox.show()
144
144
 
145
 
        self.table = gtk.Table(rows=4, columns=2)
 
145
        self.table = gtk.Table(rows=5, columns=2)
146
146
        self.table.set_row_spacings(6)
147
147
        self.table.set_col_spacings(6)
148
148
        vbox.pack_start(self.table, expand=False, fill=True)
182
182
 
183
183
        align = gtk.Alignment(0.0, 0.5)
184
184
        label = gtk.Label()
 
185
        label.set_markup("<b>Branch nick:</b>")
 
186
        align.add(label)
 
187
        self.table.attach(align, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
 
188
        label.show()
 
189
        align.show()
 
190
 
 
191
        align = gtk.Alignment(0.0, 0.5)
 
192
        self.branchnick_label = gtk.Label()
 
193
        self.branchnick_label.set_selectable(True)
 
194
        align.add(self.branchnick_label)
 
195
        self.table.attach(align, 1, 2, 2, 3, gtk.EXPAND | gtk.FILL, gtk.FILL)
 
196
        self.branchnick_label.show()
 
197
        align.show()
 
198
 
 
199
        align = gtk.Alignment(0.0, 0.5)
 
200
        label = gtk.Label()
185
201
        label.set_markup("<b>Timestamp:</b>")
186
202
        align.add(label)
187
 
        self.table.attach(align, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
 
203
        self.table.attach(align, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
188
204
        label.show()
189
205
        align.show()
190
206
 
192
208
        self.timestamp_label = gtk.Label()
193
209
        self.timestamp_label.set_selectable(True)
194
210
        align.add(self.timestamp_label)
195
 
        self.table.attach(align, 1, 2, 2, 3, gtk.EXPAND | gtk.FILL, gtk.FILL)
 
211
        self.table.attach(align, 1, 2, 3, 4, gtk.EXPAND | gtk.FILL, gtk.FILL)
196
212
        self.timestamp_label.show()
197
213
        align.show()
198
214
 
200
216
        label = gtk.Label()
201
217
        label.set_markup("<b>Parents:</b>")
202
218
        align.add(label)
203
 
        self.table.attach(align, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
 
219
        self.table.attach(align, 0, 1, 4, 5, gtk.FILL, gtk.FILL)
204
220
        label.show()
205
221
        align.show()
206
222
 
269
285
        self.fwd_button.set_sensitive(len(self.children[revision]) > 0)
270
286
 
271
287
        if revision.committer is not None:
 
288
            branchnick = ""
272
289
            committer = revision.committer
273
290
            timestamp = format_date(revision.timestamp, revision.timezone)
274
291
            message = revision.message
 
292
            try:
 
293
                branchnick = revision.properties['branch-nick']
 
294
            except KeyError:
 
295
                pass
 
296
 
275
297
        else:
276
298
            committer = ""
277
299
            timestamp = ""
278
300
            message = ""
 
301
            branchnick = ""
279
302
 
280
303
        self.revid_label.set_text(revision.revision_id)
 
304
        self.branchnick_label.set_text(branchnick)
 
305
 
281
306
        self.committer_label.set_text(committer)
282
307
        self.timestamp_label.set_text(timestamp)
283
308
        self.message_buffer.set_text(message)
286
311
            self.table.remove(widget)
287
312
 
288
313
        self.parents_widgets = []
289
 
        self.table.resize(4 + len(revision.parent_ids) - 1, 2)
 
314
        self.table.resize(5 + len(revision.parent_ids) - 1, 2)
290
315
        for idx, parent_id in enumerate(revision.parent_ids):
291
316
            self.table.set_row_spacing(idx + 3, 0)
292
317
 
293
318
            align = gtk.Alignment(0.0, 0.0)
294
319
            self.parents_widgets.append(align)
295
 
            self.table.attach(align, 1, 2, idx + 3, idx + 4,
 
320
            self.table.attach(align, 1, 2, idx + 4, idx + 5,
296
321
                              gtk.EXPAND | gtk.FILL, gtk.FILL)
297
322
            align.show()
298
323