Commit 8b7ce5e1 authored by Kai Willadsen's avatar Kai Willadsen

filediff: Fix sensitivity setting for Open External action in FileDiff

parent edccf8db
......@@ -774,16 +774,26 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self.textview[new_pane].scroll_to_mark(
new_buf.get_insert(), 0.1, True, 0.5, 0.5)
def _set_external_action_sensitivity(self):
have_file = self.focus_pane is not None
try:
self.main_actiongroup.get_action("OpenExternal").set_sensitive(
have_file)
except AttributeError:
pass
def on_textview_focus_in_event(self, view, event):
self.focus_pane = view
self.findbar.textview = view
self.on_cursor_position_changed(view.get_buffer(), None, True)
self._set_save_action_sensitivity()
self._set_merge_action_sensitivity()
self._set_external_action_sensitivity()
self.update_text_actions_sensitivity()
def on_textview_focus_out_event(self, view, event):
self._set_merge_action_sensitivity()
self._set_external_action_sensitivity()
def _after_text_modified(self, buffer, startline, sizechange):
if self.num_panes > 1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment