/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: Jelmer Vernooij
  • Date: 2007-07-15 18:12:57 UTC
  • Revision ID: jelmer@samba.org-20070715181257-g264qus2zyi3v39z
Add RevisionSelectionBox widget, use in TagDialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005 Dan Loda <danloda@gmail.com>
 
2
# Copyright (C) 2007 Jelmer Vernooij <jelmer@samba.org>
2
3
 
3
4
# This program is free software; you can redistribute it and/or modify
4
5
# it under the terms of the GNU General Public License as published by
29
30
    start.
30
31
    """
31
32
 
32
 
    def __init__(self, revision=None):
33
 
        gtk.ScrolledWindow.__init__(self)
34
 
        self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
 
33
    def __init__(self, revision=None, scroll=True):
 
34
        super(LogView, self).__init__()
 
35
        if scroll:
 
36
            self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
 
37
        else:
 
38
            self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER)
35
39
        self.set_shadow_type(gtk.SHADOW_NONE)
36
40
        self._create()
37
41
        self._show_callback = None
50
54
    def set_revision(self, revision):
51
55
        self._revision = revision
52
56
        self.revision_id.set_text(revision.revision_id)
53
 
        self.committer.set_text(revision.committer)
54
 
        self.timestamp.set_text(format_date(revision.timestamp,
55
 
                                            revision.timezone))
 
57
        if revision.committer is not None:
 
58
            self.committer.set_text(revision.committer)
 
59
        else:
 
60
            self.committer.set_text("")
 
61
        if revision.timestamp is not None:
 
62
            self.timestamp.set_text(format_date(revision.timestamp,
 
63
                                                revision.timezone))
56
64
        self.message_buffer.set_text(revision.message)
57
65
        try:
58
66
            self.branchnick_label.set_text(revision.properties['branch-nick'])