mirror of
https://github.com/GNOME/gedit
synced 2024-06-30 23:15:01 +00:00
externaltools plugin: continue port to TeplPanel
The previous implementation checked the panel visibility before showing it. But it's easier to just show it: if it is already visible it's harmless.
This commit is contained in:
parent
c8034d31c8
commit
775e5210bb
|
@ -294,9 +294,7 @@ def capture_menu_action(action, parameter, window, panel, node):
|
|||
|
||||
|
||||
def capture_stderr_line_panel(capture, line, panel):
|
||||
if not panel.visible():
|
||||
panel.show()
|
||||
|
||||
panel.show()
|
||||
panel.write(line, panel.error_tag)
|
||||
|
||||
|
||||
|
|
|
@ -139,10 +139,6 @@ class OutputPanel(UniqueById):
|
|||
self['view'].get_buffer().set_text("")
|
||||
self.links = []
|
||||
|
||||
def visible(self):
|
||||
panel = self.window.get_bottom_panel()
|
||||
return panel.props.visible and panel.props.visible_child == self.panel
|
||||
|
||||
def write(self, text, tag=None):
|
||||
buffer = self['view'].get_buffer()
|
||||
|
||||
|
@ -179,9 +175,9 @@ class OutputPanel(UniqueById):
|
|||
GLib.idle_add(self.scroll_to_end)
|
||||
|
||||
def show(self):
|
||||
panel = self.window.get_bottom_panel()
|
||||
panel.props.visible_child = self.panel
|
||||
panel.show()
|
||||
bottom_panel = self.window.get_bottom_panel()
|
||||
#bottom_panel.set_active() # TODO
|
||||
bottom_panel.show()
|
||||
|
||||
def update_cursor_style(self, view, x, y):
|
||||
if self.get_link_at_location(view, x, y) is not None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user