45
46
# Create the widgets
46
47
self._scrolledwindow = gtk.ScrolledWindow()
47
48
self._treeview = gtk.TreeView()
48
self._label_diff3 = gtk.Label(_("External utility:"))
49
self._label_diff3 = gtk.Label(_i18n("External utility:"))
49
50
self._entry_diff3 = gtk.Entry()
50
51
self._image_diff3 = gtk.Image()
51
52
self._button_diff3 = gtk.Button()
96
97
if len(self.wt.conflicts()) == 0:
97
98
self.model = gtk.ListStore(gobject.TYPE_STRING)
98
99
self._treeview.set_model(self.model)
99
self._treeview.append_column(gtk.TreeViewColumn(_('Conflicts'),
100
self._treeview.append_column(gtk.TreeViewColumn(_i18n('Conflicts'),
100
101
gtk.CellRendererText(), text=0))
101
102
self._treeview.set_headers_visible(False)
102
self.model.append([ _("No conflicts in working tree.") ])
103
self.model.append([ _i18n("No conflicts in working tree.") ])
104
self._button_diff3.set_sensitive(False)
104
106
self.model = gtk.ListStore(gobject.TYPE_STRING,
105
107
gobject.TYPE_STRING,
106
108
gobject.TYPE_STRING)
107
109
self._treeview.set_model(self.model)
108
self._treeview.append_column(gtk.TreeViewColumn(_('Path'),
110
self._treeview.append_column(gtk.TreeViewColumn(_i18n('Path'),
109
111
gtk.CellRendererText(), text=0))
110
self._treeview.append_column(gtk.TreeViewColumn(_('Type'),
112
self._treeview.append_column(gtk.TreeViewColumn(_i18n('Type'),
111
113
gtk.CellRendererText(), text=1))
112
114
self._treeview.set_search_column(0)
113
115
for conflict in self.wt.conflicts():
114
116
if conflict.typestring == 'path conflict':
115
t = _("path conflict")
117
t = _i18n("path conflict")
116
118
elif conflict.typestring == 'contents conflict':
117
t = _("contents conflict")
119
t = _i18n("contents conflict")
118
120
elif conflict.typestring == 'text conflict':
119
t = _("text conflict")
121
t = _i18n("text conflict")
120
122
elif conflict.typestring == 'duplicate id':
121
t = _("duplicate id")
123
t = _i18n("duplicate id")
122
124
elif conflict.typestring == 'duplicate':
125
t = _i18n("duplicate")
124
126
elif conflict.typestring == 'parent loop':
127
t = _i18n("parent loop")
126
128
elif conflict.typestring == 'unversioned parent':
127
t = _("unversioned parent")
129
t = _i18n("unversioned parent")
128
130
elif conflict.typestring == 'missing parent':
129
t = _("missing parent")
131
t = _i18n("missing parent")
130
132
elif conflict.typestring == 'deleting parent':
131
t = _("deleting parent")
133
t = _i18n("deleting parent")
133
t = _("unknown type of conflict")
135
t = _i18n("unknown type of conflict")
135
137
self.model.append([ conflict.path, t, conflict.typestring ])
159
161
self._set_diff3(self._entry_diff3.get_text())
160
162
selected = self._get_selected_file()
161
163
if selected is None:
162
error_dialog(_('No file was selected'),
163
_('Please select a file from the list.'))
164
error_dialog(_i18n('No file was selected'),
165
_i18n('Please select a file from the list.'))
165
167
elif self._get_selected_type() == 'text conflict':
166
168
base = self.wt.abspath(selected) + '.BASE'
167
169
this = self.wt.abspath(selected) + '.THIS'
168
170
other = self.wt.abspath(selected) + '.OTHER'
169
os.system(self._entry_diff3.get_text() + ' ' + base + ' ' + this + ' ' + other)
172
p = subprocess.Popen([ self._entry_diff3.get_text(), base, this, other ])
175
warning_dialog(_i18n('Call to external utility failed'), str(e))
171
warning_dialog(_('Cannot resolve conflict'),
172
_('Only conflicts on the text of files can be resolved with Olive at the moment. Content conflicts, on the structure of the tree, need to be resolved using the command line.'))
177
warning_dialog(_i18n('Cannot resolve conflict'),
178
_i18n('Only conflicts on the text of files can be resolved with Olive at the moment. Content conflicts, on the structure of the tree, need to be resolved using the command line.'))