/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 nautilus-bzr.py

  • Committer: jbailey at ubuntu
  • Date: 2006-05-14 14:21:10 UTC
  • mto: (0.5.10 nautilus-bzr)
  • mto: This revision was merged to the branch mainline in revision 80.
  • Revision ID: jbailey@ubuntu.com-20060514142110-ba82cbd7cd558a0a
Add 'add' function.  Give framework for other callbacks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    def __init__(self):
9
9
        pass
10
10
 
11
 
    def add_cb(self, menu, files):
12
 
        return
13
 
 
14
 
    def ignore_cb(self, menu, files):
15
 
        return
16
 
 
17
 
    def unignore_cb(self, menu, files):
18
 
        return
19
 
 
20
 
    def log_cb(self, menu, files):
21
 
        return
22
 
 
23
 
    def diff_cb(self, menu, files):
24
 
        return
25
 
 
26
 
    def remove_cb(self, menu, files):
 
11
    def add_cb(self, menu, vfs_file):
 
12
        # We can only cope with local files
 
13
        if vfs_file.get_uri_scheme() != 'file':
 
14
            return
 
15
 
 
16
        file = vfs_file.get_uri()
 
17
        try:
 
18
            tree, path = WorkingTree.open_containing(file)
 
19
        except NotBranchError:
 
20
            return
 
21
 
 
22
        tree.add(path)
 
23
 
 
24
        return
 
25
 
 
26
    def ignore_cb(self, menu, vfs_file):
 
27
        # We can only cope with local files
 
28
        if vfs_file.get_uri_scheme() != 'file':
 
29
            return
 
30
 
 
31
        file = vfs_file.get_uri()
 
32
        try:
 
33
            tree, path = WorkingTree.open_containing(file)
 
34
        except NotBranchError:
 
35
            return
 
36
 
 
37
        return
 
38
 
 
39
    def unignore_cb(self, menu, vfs_file):
 
40
        # We can only cope with local files
 
41
        if vfs_file.get_uri_scheme() != 'file':
 
42
            return
 
43
 
 
44
        file = vfs_file.get_uri()
 
45
        try:
 
46
            tree, path = WorkingTree.open_containing(file)
 
47
        except NotBranchError:
 
48
            return
 
49
 
 
50
        return
 
51
 
 
52
    def unignore_cb(self, menu, vfs_file):
 
53
        # We can only cope with local files
 
54
        if vfs_file.get_uri_scheme() != 'file':
 
55
            return
 
56
 
 
57
        file = vfs_file.get_uri()
 
58
        try:
 
59
            tree, path = WorkingTree.open_containing(file)
 
60
        except NotBranchError:
 
61
            return
 
62
 
 
63
        return
 
64
 
 
65
    def unignore_cb(self, menu, vfs_file):
 
66
        # We can only cope with local files
 
67
        if vfs_file.get_uri_scheme() != 'file':
 
68
            return
 
69
 
 
70
        file = vfs_file.get_uri()
 
71
        try:
 
72
            tree, path = WorkingTree.open_containing(file)
 
73
        except NotBranchError:
 
74
            return
 
75
 
 
76
        return
 
77
 
 
78
    def log_cb(self, menu, vfs_file):
 
79
        # We can only cope with local files
 
80
        if vfs_file.get_uri_scheme() != 'file':
 
81
            return
 
82
 
 
83
        file = vfs_file.get_uri()
 
84
        try:
 
85
            tree, path = WorkingTree.open_containing(file)
 
86
        except NotBranchError:
 
87
            return
 
88
 
 
89
        return
 
90
 
 
91
    def unignore_cb(self, menu, vfs_file):
 
92
        # We can only cope with local files
 
93
        if vfs_file.get_uri_scheme() != 'file':
 
94
            return
 
95
 
 
96
        file = vfs_file.get_uri()
 
97
        try:
 
98
            tree, path = WorkingTree.open_containing(file)
 
99
        except NotBranchError:
 
100
            return
 
101
 
 
102
        return
 
103
 
 
104
    def diff_cb(self, menu, vfs_file):
 
105
        # We can only cope with local files
 
106
        if vfs_file.get_uri_scheme() != 'file':
 
107
            return
 
108
 
 
109
        file = vfs_file.get_uri()
 
110
        try:
 
111
            tree, path = WorkingTree.open_containing(file)
 
112
        except NotBranchError:
 
113
            return
 
114
 
 
115
        return
 
116
 
 
117
    def unignore_cb(self, menu, vfs_file):
 
118
        # We can only cope with local files
 
119
        if vfs_file.get_uri_scheme() != 'file':
 
120
            return
 
121
 
 
122
        file = vfs_file.get_uri()
 
123
        try:
 
124
            tree, path = WorkingTree.open_containing(file)
 
125
        except NotBranchError:
 
126
            return
 
127
 
 
128
        return
 
129
 
 
130
    def remove_cb(self, menu, vfs_file):
 
131
        # We can only cope with local files
 
132
        if vfs_file.get_uri_scheme() != 'file':
 
133
            return
 
134
 
 
135
        file = vfs_file.get_uri()
 
136
        try:
 
137
            tree, path = WorkingTree.open_containing(file)
 
138
        except NotBranchError:
 
139
            return
 
140
 
 
141
        return
 
142
 
 
143
    def unignore_cb(self, menu, vfs_file):
 
144
        # We can only cope with local files
 
145
        if vfs_file.get_uri_scheme() != 'file':
 
146
            return
 
147
 
 
148
        file = vfs_file.get_uri()
 
149
        try:
 
150
            tree, path = WorkingTree.open_containing(file)
 
151
        except NotBranchError:
 
152
            return
 
153
 
27
154
        return
28
155
 
29
156
    def get_file_items(self, window, files):