/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: Mateusz Korniak
  • Date: 2007-07-21 13:16:33 UTC
  • mto: This revision was merged to the branch mainline in revision 248.
  • Revision ID: matkor@laptop-hp-20070721131633-t40kxs20j1q2fvvc
Context menu "Remove and delete added"
Acts like "Remove" but also deletes file locally.

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