diff --git a/data/guake.schemas b/data/guake.schemas
index 9ccbd6791..dec327399 100644
--- a/data/guake.schemas
+++ b/data/guake.schemas
@@ -706,6 +706,30 @@
+
+ /schemas/apps/guake/keybindings/local/increase_height
+ /apps/guake/keybindings/local/increase_height
+ guake
+ string
+ <Control>Down
+
+ Increase height.
+ Increase the screen height.
+
+
+
+
+ /schemas/apps/guake/keybindings/local/decrease_height
+ /apps/guake/keybindings/local/decrease_height
+ guake
+ string
+ <Control>Up
+
+ Decrease height.
+ Decrease the screen height.
+
+
+
/schemas/apps/guake/keybindings/local/clipboard_copy
/apps/guake/keybindings/local/clipboard_copy
diff --git a/src/guake b/src/guake
index 57b6d5f65..0368852fa 100755
--- a/src/guake
+++ b/src/guake
@@ -395,7 +395,7 @@ class GConfKeyHandler(object):
keys = ['toggle_fullscreen', 'new_tab', 'close_tab', 'rename_current_tab',
'previous_tab', 'next_tab', 'clipboard_copy', 'clipboard_paste',
- 'quit', 'zoom_in', 'zoom_out', "search_on_web",
+ 'quit', 'zoom_in', 'zoom_out', 'increase_height', 'decrease_height', "search_on_web",
'switch_tab1', 'switch_tab2', 'switch_tab3', 'switch_tab4', 'switch_tab5',
'switch_tab6', 'switch_tab7', 'switch_tab8', 'switch_tab9', 'switch_tab10'
]
@@ -492,6 +492,16 @@ class GConfKeyHandler(object):
self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE,
self.guake.accel_zoom_out)
+ key, mask = gtk.accelerator_parse(gets('increase_height'))
+ if key > 0:
+ self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE,
+ self.guake.accel_increase_height)
+
+ key, mask = gtk.accelerator_parse(gets('decrease_height'))
+ if key > 0:
+ self.accel_group.connect_group(key, mask, gtk.ACCEL_VISIBLE,
+ self.guake.accel_decrease_height)
+
for tab in xrange(1, 11):
key, mask = gtk.accelerator_parse(gets('switch_tab%d' % tab))
if key > 0:
@@ -1228,6 +1238,28 @@ class Guake(SimpleGladeApp):
term.decrease_font_size()
return True
+ def accel_increase_height(self, *args):
+ """Callback to increase height.
+ """
+ try:
+ height = self.client.get_float(KEY('/general/window_height'))
+ except:
+ height = self.client.get_int(KEY('/general/window_height'))
+
+ self.client.set_int(KEY('/general/window_height'), int(height) + 2)
+ return True
+
+ def accel_decrease_height(self, *args):
+ """Callback to decrease height.
+ """
+ try:
+ height = self.client.get_float(KEY('/general/window_height'))
+ except:
+ height = self.client.get_int(KEY('/general/window_height'))
+
+ self.client.set_int(KEY('/general/window_height'), int(height) - 2)
+ return True
+
def accel_add(self, *args):
"""Callback to add a new tab. Called by the accel key.
"""
diff --git a/src/prefs.py b/src/prefs.py
index 1f2a3ae29..1eb50896a 100644
--- a/src/prefs.py
+++ b/src/prefs.py
@@ -116,6 +116,10 @@
'label': 'Zoom in'},
{'key': LKEY('zoom_in_alt'),
'label': 'Zoom in (alternative)'},
+ {'key': LKEY('increase_height'),
+ 'label': 'Increase height'},
+ {'key': LKEY('decrease_height'),
+ 'label': 'Decrease height'},
]},
{'label': 'Clipboard',