/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:
1
 
#!/usr/bin/python
2
1
# -*- coding: UTF-8 -*-
3
2
"""Difference window.
4
3
 
12
11
 
13
12
from cStringIO import StringIO
14
13
 
 
14
import pygtk
 
15
pygtk.require("2.0")
15
16
import gtk
16
17
import pango
17
18
import os
34
35
from bzrlib.diff import show_diff_trees
35
36
from bzrlib.errors import NoSuchFile
36
37
from bzrlib.trace import warning
37
 
 
38
 
 
39
 
class DiffWindow(gtk.Window):
 
38
from bzrlib.plugins.gtk.window import Window
 
39
 
 
40
class DiffWindow(Window):
40
41
    """Diff window.
41
42
 
42
43
    This object represents and manages a single window containing the
43
44
    differences between two revisions on a branch.
44
45
    """
45
46
 
46
 
    def __init__(self):
47
 
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
 
47
    def __init__(self, parent=None):
 
48
        Window.__init__(self, parent)
48
49
        self.set_border_width(0)
49
50
        self.set_title("bzrk diff")
50
51
 
173
174
        if specific_files == [ None ]:
174
175
            return
175
176
        elif specific_files == [ "" ]:
176
 
            specific_files = []
 
177
            specific_files = None
177
178
 
178
179
        s = StringIO()
179
180
        show_diff_trees(self.parent_tree, self.rev_tree, s, specific_files)