Merge pull request #314 from mattrose/zoom-all-keybind
issue 271: add keybindings to zoom all terminals at once
This commit is contained in:
commit
e40f9fe651
|
@ -130,6 +130,9 @@ DEFAULTS = {
|
||||||
'zoom_in' : '<Control>plus',
|
'zoom_in' : '<Control>plus',
|
||||||
'zoom_out' : '<Control>minus',
|
'zoom_out' : '<Control>minus',
|
||||||
'zoom_normal' : '<Control>0',
|
'zoom_normal' : '<Control>0',
|
||||||
|
'zoom_in_all' : '',
|
||||||
|
'zoom_out_all' : '',
|
||||||
|
'zoom_normal_all' : '',
|
||||||
'new_tab' : '<Shift><Control>t',
|
'new_tab' : '<Shift><Control>t',
|
||||||
'cycle_next' : '<Control>Tab',
|
'cycle_next' : '<Control>Tab',
|
||||||
'cycle_prev' : '<Shift><Control>Tab',
|
'cycle_prev' : '<Shift><Control>Tab',
|
||||||
|
|
|
@ -105,6 +105,9 @@ class PrefsEditor:
|
||||||
keybindingnames = { 'zoom_in' : _('Increase font size'),
|
keybindingnames = { 'zoom_in' : _('Increase font size'),
|
||||||
'zoom_out' : _('Decrease font size'),
|
'zoom_out' : _('Decrease font size'),
|
||||||
'zoom_normal' : _('Restore original font size'),
|
'zoom_normal' : _('Restore original font size'),
|
||||||
|
'zoom_in_all' : _('Increase font size on all terminals'),
|
||||||
|
'zoom_out_all' : _('Decrease font size on all terminals'),
|
||||||
|
'zoom_normal_all' : _('Restore original font size on all terminals'),
|
||||||
'new_tab' : _('Create a new tab'),
|
'new_tab' : _('Create a new tab'),
|
||||||
'cycle_next' : _('Focus the next terminal'),
|
'cycle_next' : _('Focus the next terminal'),
|
||||||
'cycle_prev' : _('Focus the previous terminal'),
|
'cycle_prev' : _('Focus the previous terminal'),
|
||||||
|
|
|
@ -1783,6 +1783,15 @@ class Terminal(Gtk.VBox):
|
||||||
# a function of Terminator. It would be cleaner if TerminatorTerm
|
# a function of Terminator. It would be cleaner if TerminatorTerm
|
||||||
# has absolutely no reference to Terminator.
|
# has absolutely no reference to Terminator.
|
||||||
# N (next) - P (previous) - O (horizontal) - E (vertical) - W (close)
|
# N (next) - P (previous) - O (horizontal) - E (vertical) - W (close)
|
||||||
|
def key_zoom_in_all(self):
|
||||||
|
self.terminator.zoom_in_all()
|
||||||
|
|
||||||
|
def key_zoom_out_all(self):
|
||||||
|
self.terminator.zoom_out_all()
|
||||||
|
|
||||||
|
def key_zoom_normal_all(self):
|
||||||
|
self.terminator.zoom_orig_all()
|
||||||
|
|
||||||
def key_cycle_next(self):
|
def key_cycle_next(self):
|
||||||
self.key_go_next()
|
self.key_go_next()
|
||||||
|
|
||||||
|
|
|
@ -633,4 +633,15 @@ class Terminator(Borg):
|
||||||
|
|
||||||
return(layout)
|
return(layout)
|
||||||
|
|
||||||
|
def zoom_in_all(self):
|
||||||
|
for term in self.terminals:
|
||||||
|
term.zoom_in()
|
||||||
|
|
||||||
|
def zoom_out_all(self):
|
||||||
|
for term in self.terminals:
|
||||||
|
term.zoom_out()
|
||||||
|
|
||||||
|
def zoom_orig_all(self):
|
||||||
|
for term in self.terminals:
|
||||||
|
term.zoom_orig()
|
||||||
# vim: set expandtab ts=4 sw=4:
|
# vim: set expandtab ts=4 sw=4:
|
||||||
|
|
Loading…
Reference in New Issue