parent
1aa437d6e3
commit
0d362fc0f5
|
@ -1045,6 +1045,9 @@ class Terminal(Gtk.VBox):
|
|||
menu = TerminalPopupMenu(self)
|
||||
menu.show(widget, event)
|
||||
|
||||
def do_readonly_toggle(self):
|
||||
self.vte.props.input_enabled = not self.vte.props.input_enabled
|
||||
|
||||
def do_scrollbar_toggle(self):
|
||||
"""Show or hide the terminal scrollbar"""
|
||||
self.toggle_widget_visibility(self.scrollbar)
|
||||
|
|
|
@ -234,6 +234,11 @@ class TerminalPopupMenu(object):
|
|||
menu.append(item)
|
||||
menu.append(Gtk.SeparatorMenuItem())
|
||||
|
||||
item = self.menu_item(Gtk.CheckMenuItem, 'toggle_readonly', '_read only')
|
||||
item.set_active(not(terminal.vte.get_input_enabled()))
|
||||
item.connect('toggled', lambda x: terminal.do_readonly_toggle())
|
||||
menu.append(item)
|
||||
|
||||
item = self.menu_item(Gtk.CheckMenuItem, 'toggle_scrollbar',
|
||||
'Show _scrollbar')
|
||||
item.set_active(terminal.scrollbar.get_property('visible'))
|
||||
|
|
Loading…
Reference in New Issue