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

  • Committer: Daniel Schierbeck
  • Date: 2007-10-14 15:54:57 UTC
  • mto: This revision was merged to the branch mainline in revision 317.
  • Revision ID: daniel.schierbeck@gmail.com-20071014155457-m3ek29p4ima8ev7d
Added the new Window base class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
from cStringIO import StringIO
13
13
 
 
14
import pygtk
 
15
pygtk.require("2.0")
14
16
import gtk
15
17
import pango
16
18
import os
33
35
from bzrlib.diff import show_diff_trees
34
36
from bzrlib.errors import NoSuchFile
35
37
from bzrlib.trace import warning
36
 
 
37
 
 
38
 
class DiffWindow(gtk.Window):
 
38
from bzrlib.plugins.gtk.window import Window
 
39
 
 
40
class DiffWindow(Window):
39
41
    """Diff window.
40
42
 
41
43
    This object represents and manages a single window containing the
42
44
    differences between two revisions on a branch.
43
45
    """
44
46
 
45
 
    def __init__(self):
46
 
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
 
47
    def __init__(self, parent=None):
 
48
        Window.__init__(self, parent)
47
49
        self.set_border_width(0)
48
50
        self.set_title("bzrk diff")
49
51
 
172
174
        if specific_files == [ None ]:
173
175
            return
174
176
        elif specific_files == [ "" ]:
175
 
            specific_files = []
 
177
            specific_files = None
176
178
 
177
179
        s = StringIO()
178
180
        show_diff_trees(self.parent_tree, self.rev_tree, s, specific_files)